monit_process.h File Reference

Go to the source code of this file.

Defines

#define PROCESS_ZOMBIE   1
#define RESOURCE_ID_CPU_PERCENT   1
#define RESOURCE_ID_MEM_PERCENT   2
#define RESOURCE_ID_MEM_KBYTE   3
#define RESOURCE_ID_LOAD1   4
#define RESOURCE_ID_LOAD5   5
#define RESOURCE_ID_LOAD15   6

Functions

int update_process_data (Process_T p, pid_t pid)
 Get the proc infomation (CPU percentage, MEM in MByte and percent, status), enduser version.

int init_process_info (void)
 Initialize the proc information code.

int update_loadavg (void)
 Updates the loadavg list.


Variables

int include_children
char actionnames [][STRLEN]
char modenames [][STRLEN]
char operatornames [][STRLEN]
char operatorshortnames [][3]
int num_cpus


Define Documentation

#define PROCESS_ZOMBIE   1
 

Definition at line 29 of file monit_process.h.

#define RESOURCE_ID_CPU_PERCENT   1
 

Definition at line 38 of file monit_process.h.

Referenced by printprocess().

#define RESOURCE_ID_LOAD1   4
 

Definition at line 41 of file monit_process.h.

Referenced by printprocess().

#define RESOURCE_ID_LOAD15   6
 

Definition at line 43 of file monit_process.h.

Referenced by printprocess().

#define RESOURCE_ID_LOAD5   5
 

Definition at line 42 of file monit_process.h.

Referenced by printprocess().

#define RESOURCE_ID_MEM_KBYTE   3
 

Definition at line 40 of file monit_process.h.

Referenced by printprocess().

#define RESOURCE_ID_MEM_PERCENT   2
 

Definition at line 39 of file monit_process.h.

Referenced by printprocess().


Function Documentation

int init_process_info void   
 

Initialize the proc information code.

Returns:
TRUE if succeeded otherwise FALSE.

Definition at line 90 of file monit_process.c.

References init_process_info_sysdep().

int update_loadavg void   
 

Updates the loadavg list.

Returns:
TRUE if successful, otherwise FALSE

Definition at line 127 of file monit_process.c.

References myrun::loadavg, and Run.

Referenced by validate().

int update_process_data Process_T    p,
pid_t    pid
 

Get the proc infomation (CPU percentage, MEM in MByte and percent, status), enduser version.

Parameters:
p  A Process object
pid  The process id
Returns:
TRUE if succeeded otherwise FALSE.

Definition at line 104 of file monit_process.c.

References ASSERT, get_process_info(), myprocinfo::pid, and myprocess::procinfo.


Variable Documentation

char actionnames[][STRLEN]
 

Definition at line 32 of file monit_process.h.

int include_children
 

Definition at line 31 of file monit_process.h.

char modenames[][STRLEN]
 

Definition at line 33 of file monit_process.h.

int num_cpus
 

Definition at line 36 of file monit_process.h.

char operatornames[][STRLEN]
 

Definition at line 34 of file monit_process.h.

char operatorshortnames[][3]
 

Definition at line 35 of file monit_process.h.