Apart from the directories associated to 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 gives the following:
$ ls -d [a-z]* apm dma interrupts loadavg mounts rtc swaps bus/ fb ioports locks mtrr scsi/ sys/ cmdline filesystems kcore meminfo net/ self/ tty/ cpuinfo fs/ kmsg misc partitions slabinfo uptime devices ide/ ksyms modules pci stat version $ |
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 chase down a conflict, look at the contents of these three files:
$ cat interrupts CPU0 0: 127648 XT-PIC timer 1: 5191 XT-PIC keyboard 2: 0 XT-PIC cascade 5: 1402 XT-PIC xirc2ps_cs 8: 1 XT-PIC rtc 10: 0 XT-PIC ESS Solo1 12: 2631 XT-PIC PS/2 Mouse 13: 1 XT-PIC fpu 14: 73434 XT-PIC ide0 15: 80234 XT-PIC ide1 NMI: 0 $ cat ioports 0000-001f : dma1 0020-003f : pic1 0040-005f : timer 0060-006f : keyboard 0070-007f : rtc 0080-008f : dma page reg 00a0-00bf : pic2 00c0-00df : dma2 00f0-00ff : fpu 0170-0177 : ide1 01f0-01f7 : ide0 0300-030f : xirc2ps_cs 0376-0376 : ide1 03c0-03df : vga+ 03f6-03f6 : ide0 03f8-03ff : serial(auto) 1050-1057 : ide0 1058-105f : ide1 1080-108f : ESS Solo1 10c0-10cf : ESS Solo1 10d4-10df : ESS Solo1 10ec-10ef : ESS Solo1 $ cat dma 4: cascade $ |
Or, more simply, use the lsdev command, which gathers information from these files and sorts them by peripheral, which is undoubtedly more convenient.[25]:
$ lsdev Device DMA IRQ I/O Ports ------------------------------------------------ cascade 4 2 dma 0080-008f dma1 0000-001f dma2 00c0-00df ESS 1080-108f 10c0-10cf 10d4-10df 10ec-10ef fpu 13 00f0-00ff ide0 14 01f0-01f7 03f6-03f6 1050-1057 ide1 15 0170-0177 0376-0376 1058-105f keyboard 1 0060-006f Mouse 12 pic1 0020-003f pic2 00a0-00bf rtc 8 0070-007f serial 03f8-03ff Solo1 10 timer 0 0040-005f vga+ 03c0-03df xirc2ps_cs 5 0300-030f $ |
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 same information as what is reported by the lsmod command.
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), the remaining battery life in minutes. 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. Notice that it is easier modifying those options through a higher level application , like the ones included in the acpid and kacpi packages.
The most interesting entries are:
shows how many batteries are in the laptop, and related information as current remaining life, maximum capacity, etc.
Allows you to control actions associated to “special” buttons like power, sleep, lid, etc.
Displays 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 about the fans in your machine depends of the motherboard.
There 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 offer none of these possibilities.