Apart from the directories associated with the
different processes, /proc also contains a myriad of
information on the hardware present in your machine. A list of files from
the /proc directory shows the following:
$ ls -d [a-z]* apm devices interrupts loadavg partitions sysrq-trigger asound/ diskstats iomem locks pci sysvipc/ bluetooth/ dma ioports mdstat scsi/ tty/ buddyinfo driver/ irq/ meminfo self@ uptime bus/ execdomains kallsyms misc slabinfo version cmdline fb kcore modules splash vmstat cpufreq filesystems keys mounts@ stat cpuinfo fs/ key-users mtrr swaps crypto ide/ kmsg net/ sys/
For example, if we look
at the contents of /proc/interrupts, we can
see that it contains the list of interrupts currently used by the
system, along with the peripheral which uses them. Similarly,
ioports contains the list of input/output
address ranges currently busy, and lastly dma
does the same for DMA channels. Therefore, in order to track
down a conflict, look at the contents of these three files:
$ cat interrupts
CPU0
0: 73751906 IO-APIC-edge timer
2: 0 XT-PIC cascade
3: 44301 IO-APIC-edge NVidia CK8
9: 115618 IO-APIC-edge ohci_hcd
10: 7758240 IO-APIC-edge ohci_hcd, eth0
11: 218753 IO-APIC-edge libata, ehci_hcd
12: 1153980 IO-APIC-edge i8042
15: 3419 IO-APIC-edge ide1
NMI: 0
LOC: 73749577
ERR: 0
MIS: 0
$ cat ioports
0000-001f : dma1
0020-0021 : pic1
0040-0043 : timer0
0050-0053 : timer1
0060-006f : keyboard
0080-008f : dma page reg
00a0-00a1 : pic2
00c0-00df : dma2
00f0-00ff : fpu
0170-0177 : ide1
0376-0376 : ide1
0378-037a : parport0
037b-037f : parport0
03c0-03df : vesafb
03f8-03ff : serial
0970-0977 : 0000:00:0b.0
0970-0977 : sata_nv
09f0-09f7 : 0000:00:0b.0
09f0-09f7 : sata_nv
0b70-0b73 : 0000:00:0b.0
0b70-0b73 : sata_nv
0bf0-0bf3 : 0000:00:0b.0
0bf0-0bf3 : sata_nv
0cf8-0cff : PCI conf1
d000-d00f : 0000:00:0b.0
d000-d00f : sata_nv
d400-d47f : 0000:00:0b.0
d400-d47f : sata_nv
d800-d8ff : 0000:00:06.0
d800-d8ff : NVidia CK8
dc00-dc7f : 0000:00:06.0
dc00-dc7f : NVidia CK8
e000-e007 : 0000:00:04.0
e000-e007 : forcedeth
e400-e41f : 0000:00:01.1
f000-f00f : 0000:00:09.0
f000-f007 : ide0
f008-f00f : ide1
$ cat dma
4: cascadeOr, more simply, use the lsdev command, which gathers information from these files and sorts them by peripheral, which is undoubtedly more convenient.[29]:
lsdev Device DMA IRQ I/O Ports ------------------------------------------------ 0000:00:01.1 e400-e41f 0000:00:04.0 e000-e007 0000:00:06.0 d800-d8ff dc00-dc7f 0000:00:09.0 f000-f00f 0000:00:0b.0 0970-0977 09f0-09f7 0b70-0b73 0bf0-0bf3 d000-d00f d400-d47f cascade 4 2 CK8 3 dma 0080-008f dma1 0000-001f dma2 00c0-00df ehci_hcd 11 eth0 10 forcedeth e000-e007 fpu 00f0-00ff i8042 12 ide0 f000-f007 ide1 15 0170-0177 0376-0376 f008-f00f keyboard 0060-006f NVidia d800-d8ff dc00-dc7f ohci_hcd 9 parport0 0378-037a 037b-037f PCI 0cf8-0cff pic1 0020-0021 pic2 00a0-00a1 sata_nv 0970-0977 09f0-09f7 0b70-0b73 0bf0-0bf3 d000-d00f d400-d47f serial 03f8-03ff timer 0 timer0 0040-0043 timer1 0050-0053 vesafb 03c0-03df
An exhaustive listing of files would take too long, but here's the description of some of them:
cpuinfo: this file
contains, as its name says, information on the processor(s) present in
your machine.
modules: this file
contains the list of modules currently used by the kernel,
along with the usage count for each one. In fact, this is
the information used by the lsmod command which
displays it in a more readable form.
meminfo: this file
contains information on memory usage at the time you print its
contents. The free command will display the same
information in a easier-to-read format.
apm: if you
have a laptop, displaying the contents of this file allows you
to see the state of your battery. You can see whether the AC
is plugged in, the charge level of your battery, and if the
APM BIOS of your laptop supports it (unfortunately
this is not the case for all laptops), the remaining battery
life in minutes, etc. The file isn't very readable by itself,
therefore you want to use the apm command
instead, which gives the same information in a human readable
format.
Note that modern computers now provide ACPI support instead of APM. See below.
bus: this
subdirectory contains information on all peripherals found on
different buses in your machine. The information is usually not
readable, and for the most part it is reformatted with external
utilities: lspcidrake, lspnp, etc.
acpi: several of the files
provided in this directory are interesting especially for
laptops, where you can select several power-saving
options. Note that it is easier to modify those options
using a higher level application, such as the ones included
in the acpid package.
The most interesting entries are:
batteryShows how many batteries are in the laptop, and related information as current remaining life, maximum capacity, etc.
buttonAllows you to control actions associated to “special” buttons such as power, sleep, lid, etc.
fanDisplays the state of the fans on your computer, whether they are running or not, and enables you to start/stop them according to certain criteria. The amount of control of the fans in your machine depends of the motherboard.
processorThere is one subdirectory for each of the CPUs in your machine. Control options vary from one processor to another. Mobile processors have more features enabled, including:
Note that there are several processors that do not offer these possibilities.
thermal_zone