Some useful utilities for accessing system information
- /proc: /proc is a pseudo file system that provides a file
interface to the operating system. Through /proc you can get
information about system-wide resource usage and about individual
processes running on the system. For example, cat'ing out the
/proc files meminfo, swapinfo, loadavg, will give you information
about a machine's memory usage, about its swap space usage, and
about its cpu load averages.
Each task has its own subdirecty in /proc containing information
about that task. For example:
$ ps -A
PID TTY TIME CMD
8284 pts/9 00:00:00 tcsh
9206 pts/9 00:00:00 ps
$ cd /proc/8284
$ cat status
State: S (sleeping)
See the man page for proc for more information (man 5 proc).
Also, see documentation with the linux source:
linux-188.8.131.52/Documentation/. Different entries
in /proc have documentation files in this subdirectory
- top: display information about linux tasks (man top).
- time: can get total wall time, system time and user time
for a process' execution.