next up previous contents
Next: Secure Programming Up: The /proc File System Previous: Drives, Mounts, and File   Contents

System Statistics

Two entries in /proc contain useful system statistics. The following http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/print-uptime.cprogram (see Fig. 10.7) extracts the uptime and idle time from the system and displays them in friendly units.
Figure 10.7: Print the System Uptime and Idle Time.
\begin{figure}\begin{center}
\small
\begin{verbatim}...

next up previous contents
Next: Secure Programming Up: The /proc File System Previous: Drives, Mounts, and File   Contents
Cem Ozdogan 2007-05-16