monit_process.c File Reference

General purpose /proc methods. More...

Go to the source code of this file.

Functions

int init_process_info (void)
 Initialize the proc information code.

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 update_loadavg (void)
 Updates the loadavg list.


Variables

char actionnames [][STRLEN] = {"ignore", "alert", "restart", "stop"}
char modenames [][STRLEN] = {"active", "passive", "manual"}
char operatorshortnames [][3] = {">", "<", "=", "!="}
char operatornames [][STRLEN]
int include_children = TRUE
int num_cpus = 1


Detailed Description

General purpose /proc methods.

Author:
Jan-Henrik Haukeland, <hauk@tildeslash.com> , Christian Hopp <chopp@iei.tu-clausthal.de>
Version:
$Id: monit_process.c,v 1.9 2002/12/21 13:56:04 hauk Exp $

Definition in file monit_process.c.


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] = {"ignore", "alert", "restart", "stop"}
 

Definition at line 76 of file monit_process.c.

int include_children = TRUE
 

Definition at line 82 of file monit_process.c.

char modenames[][STRLEN] = {"active", "passive", "manual"}
 

Definition at line 77 of file monit_process.c.

int num_cpus = 1
 

Definition at line 83 of file monit_process.c.

char operatornames[][STRLEN]
 

Initial value:

 {"greater than", "less than", "equal to",
                               "not equal to"}

Definition at line 79 of file monit_process.c.

char operatorshortnames[][3] = {">", "<", "=", "!="}
 

Definition at line 78 of file monit_process.c.