process.h File Reference

Go to the source code of this file.

Functions

int get_process_info (ProcInfo_T p)
 Get the proc infomation (CPU percentage, MEM in MByte and percent, status).

int get_process_info_sysdep (ProcInfo_T p)
int init_process_info_sysdep (void)
int read_proc_file (char *buf, int buf_size, char *name, int pid)
 Reads an process dependent entry or the proc files system.

double get_float_time (void)
 Get the actual time as a floating point number.


Function Documentation

double get_float_time void   
 

Get the actual time as a floating point number.

Returns:
time in seconds

Definition at line 114 of file common.c.

Referenced by get_process_info().

int get_process_info ProcInfo_T    p
 

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

Parameters:
p  proc information structure to work with.
Returns:
TRUE if succeeded otherwise FALSE.

Definition at line 129 of file common.c.

References myprocinfo::cpu_percent, myprocinfo::cputime, myprocinfo::cputime_prev, get_float_time(), get_process_info_sysdep(), and myprocinfo::time_prev.

Referenced by update_process_data().

int get_process_info_sysdep ProcInfo_T    p
 

int init_process_info_sysdep void   
 

Referenced by init_process_info().

int read_proc_file char *    buf,
int    buf_size,
char *    name,
int    pid
 

Reads an process dependent entry or the proc files system.

Parameters:
buf  buffer to write to
buf_size  size of buffer "buf"
name  name of proc service
pid  pid number of the process
Returns:
TRUE if succeeded otherwise FALSE.

Definition at line 76 of file common.c.