Next: uname
Up: Linux System Calls
Previous: readlink: Reading Symbolic Links
Contents
- The sysinfo system call fills a structure with system statistics. Its only argument is a pointer to a struct sysinfo.
- Some of the more interesting fields of struct sysinfo
that are filled include these:
- uptime Time elapsed since the system booted, in seconds.
- totalram Total available physical RAM
- freeram Free physical RAM
- procs Number of processes on the system
- The http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/sysinfo.c program in Fig. 8.8 prints some statistics about the current system.
Figure 8.8:
Print System Statistics.
 |
Cem Ozdogan
2007-05-16