#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include "pshandler.h"
#include "fast_merge_sort.h"
#include "sysinfo.h"
Defines | |
| #define | LESS_THAN_OR_EQUAL_PID(a, b) ( (a)->pid <= (b)->pid ) |
| #define | MEMINFO_FILE "/proc/meminfo" |
| Method:. | |
Functions | |
| aw_pshandler_t * | aw_create_pshandler (u_int32_t nregexs, aw_pshandler_regex_t *regexs, aw_pshandler_memfilter_t *memfilter, aw_pshandler_cpufilter_t *cpufilter, int32_t(*regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index), int32_t(*regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index), const aw_alarm_sched_t *sched, aw_logger_t *logger) |
| Create a ps handler. | |
| void | aw_free_pshandler (aw_pshandler_t *h) |
| Free handler and all associated resources. | |
| aw_handler_t * | aw_wire_pshandler (aw_wire_mkhandler_args_t *args) |
| Create a ps handler using "wire". See header doc for keyword documentation. | |
|
|
|
|
|
Method:. At start, create a sorted list of all pids, these become the 'up' list. Check for any mem or cpu events Regex match the 'up' list, remember those that matched and their 'command' in a 'watch' list. Each poll interval:
|
|
||||||||||||||||||||||||||||||||||||
|
Create a ps handler. aw_create_pshandler
|
|
|
Free handler and all associated resources. aw_free_pshandler
|
|
|
Create a ps handler using "wire". See header doc for keyword documentation. aw_wire_pshandler |