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

System Statistics

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

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