57 |
|
|
58 |
#define SMTP_TIMEOUT 30 |
#define SMTP_TIMEOUT 30 |
59 |
#define CHECK_TIMEOUT 30 |
#define CHECK_TIMEOUT 30 |
60 |
#define SSL_TIMEOUT 5 |
#define SSL_TIMEOUT 15 |
61 |
|
|
62 |
#define START_HTTP 1 |
#define START_HTTP 1 |
63 |
#define STOP_HTTP 2 |
#define STOP_HTTP 2 |
253 |
/** Defines procfs (or other mechanism) data */ |
/** Defines procfs (or other mechanism) data */ |
254 |
typedef struct myprocinfo { |
typedef struct myprocinfo { |
255 |
int pid; |
int pid; |
256 |
|
int ppid; |
257 |
int status_flag; |
int status_flag; |
258 |
long mem_kbyte; |
long mem_kbyte; |
259 |
int mem_percent; /**< pecentage * 10 */ |
int mem_percent; /**< pecentage * 10 */ |
260 |
int cpu_percent; /**< pecentage * 10 */ |
int cpu_percent; /**< pecentage * 10 */ |
261 |
|
|
262 |
|
int children; |
263 |
|
long total_mem_kbyte; |
264 |
|
int total_mem_percent; /**< pecentage * 10 */ |
265 |
|
|
266 |
/* private for calculating cpu_percent */ |
/* private for calculating cpu_percent */ |
267 |
double time_prev; /**< 1/10 seconds */ |
double time_prev; /**< 1/10 seconds */ |
268 |
long cputime; /**< 1/10 seconds */ |
long cputime; /**< 1/10 seconds */ |
324 |
struct myprocess *next_depend; /**< next depend process in chain */ |
struct myprocess *next_depend; /**< next depend process in chain */ |
325 |
} *Process_T; |
} *Process_T; |
326 |
|
|
327 |
|
/** Defines process tree */ |
328 |
|
typedef struct myprocesstree { |
329 |
|
|
330 |
|
int pid; |
331 |
|
int ppid; |
332 |
|
long mem_kbyte; |
333 |
|
|
334 |
|
int children_num; |
335 |
|
struct myprocesstree ** children; |
336 |
|
|
337 |
|
struct myprocesstree * parent; |
338 |
|
|
339 |
|
long mem_kbyte_sum; |
340 |
|
int children_sum; |
341 |
|
|
342 |
|
} ProcessTree_T; |
343 |
|
|
344 |
|
|
345 |
/* ------ Global variables ------------------------------------------------- */ |
/* ------ Global variables ------------------------------------------------- */ |
346 |
Process_T processlist; /**< The process list (created in p.y) */ |
Process_T processlist; /**< The process list (created in p.y) */ |