1 #ifndef _SYS_SYSINFO_H 2 #define _SYS_SYSINFO_H 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 #ifndef _LINUX_KERNEL_H 9 #define SI_LOAD_SHIFT 16 10 11 struct sysinfo { 12 unsigned long uptime; 13 unsigned long loads[3]; 14 unsigned long totalram; 15 unsigned long freeram; 16 unsigned long sharedram; 17 unsigned long bufferram; 18 unsigned long totalswap; 19 unsigned long freeswap; 20 unsigned short procs, pad; 21 unsigned long totalhigh; 22 unsigned long freehigh; 23 unsigned mem_unit; 24 char __reserved[256]; 25 }; 26 #endif 27 28 int sysinfo (struct sysinfo *); 29 int get_nprocs_conf (void); 30 int get_nprocs (void); 31 long get_phys_pages (void); 32 long get_avphys_pages (void); 33 34 #ifdef __cplusplus 35 } 36 #endif 37 38 #endif 39