2011-02-12 05:22:29 +00:00
|
|
|
#ifndef _SYS_SYSINFO_H
|
|
|
|
#define _SYS_SYSINFO_H
|
|
|
|
|
2011-11-11 01:40:06 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2011-02-12 05:22:29 +00:00
|
|
|
#define SI_LOAD_SHIFT 16
|
|
|
|
|
|
|
|
struct sysinfo {
|
2012-06-08 02:58:19 +00:00
|
|
|
unsigned long uptime;
|
2011-02-12 05:22:29 +00:00
|
|
|
unsigned long loads[3];
|
2012-06-08 03:06:04 +00:00
|
|
|
unsigned long totalram;
|
|
|
|
unsigned long freeram;
|
|
|
|
unsigned long sharedram;
|
|
|
|
unsigned long bufferram;
|
|
|
|
unsigned long totalswap;
|
|
|
|
unsigned long freeswap;
|
2012-06-08 02:58:19 +00:00
|
|
|
unsigned short procs, pad;
|
2012-06-08 03:06:04 +00:00
|
|
|
unsigned long totalhigh;
|
|
|
|
unsigned long freehigh;
|
2012-06-08 02:58:19 +00:00
|
|
|
unsigned mem_unit;
|
2011-02-12 05:22:29 +00:00
|
|
|
char __reserved[256];
|
|
|
|
};
|
|
|
|
|
|
|
|
int sysinfo (struct sysinfo *);
|
|
|
|
int get_nprocs_conf (void);
|
|
|
|
int get_nprocs (void);
|
2012-06-08 03:06:04 +00:00
|
|
|
long get_phys_pages (void);
|
|
|
|
long get_avphys_pages (void);
|
2011-02-12 05:22:29 +00:00
|
|
|
|
2011-11-11 01:40:06 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2011-02-12 05:22:29 +00:00
|
|
|
#endif
|