Strip off version numbers from dir name
[dockapps.git] / wmSMPmon / wmSMPmon / standards.h
blobc1609d6fa47c98d948a47753d1096a764c58e0a1
1 /*######################################################################
2 # #
3 # This file contains the definitions of the functions that wmSMPmon #
4 # uses to determine CPU load, memory and swap information. #
5 # All functions should be implemented by any OS dependent module #
6 # that is added to wmSMPmon. See sysinfo-linux.c as an example. #
7 # #
8 # (c) 2004 Thomas Ribbrock <emgaron@gmx.net> #
9 # #
10 # This file is placed under the conditions of the GNU Library #
11 # General Public License, version 2, or any later version. #
12 # See file COPYING for information on distribution conditions. #
13 # #
14 ######################################################################*/
16 #ifndef WMSMP_STANDARDS_H
17 #define WMSMP_STANDARDS_H
19 #include <stdio.h>
20 #include <stdlib.h>
21 #include <unistd.h>
22 #include <errno.h>
23 #include <stdarg.h>
25 /*###### Valeurs de test ################################################*/
26 #define VRAI 1
27 #define FAUX 0
28 #define OK 0
29 #define ERREUR -1
31 /*###### Buffer Sizes ###################################################*/
32 #define SMLBUFSIZ 256
33 #define BIGBUFSIZ 2048
35 /*###### Image Size Definitions #########################################*/
36 #define TAILLE_T 44 /* Width Graph */
37 #define HAUTEUR 31 /* Max. height of CPU Load Bar+Graph */
39 /* Program name used in error messages */
40 char *Myname;
42 /* NumCPUs_DoInit returns the number of CPUs present in the system and
43 performs any initialization necessary for the sysinfo-XXX module */
44 unsigned int NumCpus_DoInit(void);
46 /* Get_CPU_Load returns an array of CPU loads, one for each CPU, scaled
47 to HAUTEUR. The array is defined and allocated by the main program
48 and passed to the function as '*load'. The number of CPUs present
49 is given in 'Cpu_tot' */
50 unsigned int *Get_CPU_Load(unsigned int *load, unsigned int Cpu_tot);
52 /* return current memory/swap usage on a scale from 0-100 */
53 unsigned int Get_Memory(void);
54 unsigned int Get_Swap(void);
56 #endif /* WMSMP_STANDARDS_H */