The Wondrous World of /proc

Linux servers, regardless of the distribution, all share a common thread that system administrators know about and use to monitor the server and troubleshoot hardware. That commonality is /proc, a truly unique and special file system that can give you all sorts of wondrous information about your dedicated server.

The proc filesystem is mounted at boot and remains available as long as the system is running. In it you will normally find kernel information about processes, some system services, and hardware. That information is stored in a series of hierarchal directories within the proc directory.

Some common examples of useful information in proc are:

  • cpuinfo – In this file you will find detailed information about the system’s processors, their current state, their speed, and capabilities.
  • uptime – The precise uptime of the server
  • meminfo – Like cpuinfo, memoinfo provides detailed information about memory
  • partitions – current partitions on your server’s hard drives, along with their sizes
  • devices – hardware and virtual devices connected to the system

It is easy to display the information held within proc using one of the standard Linux commands for viewing the contents of files. For example, type:

cat /proc/cpuinfo

to display the entire cpuinfo file. You can also use “more”, “less”, or any other command with similar functionality. The proc filesystem is dynamic, and you can track system processes as they change or use the information periodically to make sure your system is running properly.