By Stephen Tweedie, Digital Equipment Corporation
Summary by Bruce Alan Wynn
We've all known that it was there for quite some time, but how many
of us ever even looked at the
In this presentation, Stephen described the wealth of
process-specific information that can be found in the
/proc filesystem. He explained why traditional UNIX
tools may report strange statistics on objects in this
filesystem-as Stephen says, "
stat() tells lies."
The reason for these seeming inconsistencies is the nature of the
/proc filesystem and its files. Although you can read
the directory for the names of the files, the actual file
"contents" are generated dynamically when you open the file for
reading. Hence, subsequent commands are actually accessing
/proc filesystem is currently read-only.
Therefore, system administrators can only use it to examine process
statistics, but not change them. Tools that access these files
display process information in textual form for ease of human
But what if you want to change these things and tune your system?
Stephen also spoke at length about using the
system call. Using
sysctl(), some process information
is writable, allowing tuning. Because
not need to convert the process information into human-readable
form (it is stored in well defined structures), access to the
process information is faster than using the
In conclusion, Stephen pointed out that Linux 2.1 is continuing to
sysctl() interface by migrating the
ability to configure
sysctl() at compile time.
Originally published in ;login: Vol. 22, No.2, April 1997.