Get a window into the soul of your Linux box,

Page 1  2  3
Another thing I use the proc fs for is to confirm that I have proper device support in the kernel for multiple CPUs when I rev to a new version of the Linux kernel. (This makes sure I've configured it properly.) For instance, when I type in

cat /proc/cpuinfo

I get this result on my server (in columns for the Web, but in practice it is single-column output):

processor: 0
vendor_id: GenuineIntel
cpu family: 6
model: 5
model name: Pentium II (Deschutes)
stepping: 3
cpu MHz : 397.335
cache size: 512 KB
fdiv_bug: no
hlt_bug: no
sep_bug: no
f00f_bug: no
coma_bug: no
fpu: yes
fpu_exception: yes
cpuid level: 2
wp: yes
flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr
bogomips: 792.99
processor: 1
vendor_id: GenuineIntel
cpu family: 6
model: 5
model name: Pentium II (Deschutes)
stepping: 3
cpu MHz: 397.335
cache size: 512 KB
fdiv_bug: no
hlt_bug: no
sep_bug: no
f00f_bug: no
coma_bug: no
fpu: yes
fpu_exception: yes
cpuid level: 2
wp: yes
flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr
bogomips: 792.99


Note that this shows that I have two Pentium II 400-MHz processors recognized by the operating system, which is what I wanted.

Another handy use of the proc filesystem is for determining who is running what and how. In the proc filesystem, you have a bunch of numbered directories that correspond to the processes running on the system. For instance, proc fs has a directory number 1 that is the "init" program -- the first program run to set up the system environment. Inside these numbered directories there is a number of files that tell you about the program that is running, including memory information, the environment in which is was started, how it was invoked, and so on. On the show, I'll walk you through some of these features.

Page 1  2  3