Tuesday, 7 August 2007

Who am I?

The linux kernel has a wonderful piece of magic called the virtual proc filesystem. It is basically a directory on which the kernel dumps a bunch of low level system details.

It is also an interface for the applications to request special actions be taken by the kernel (these are called sysctl calls). For instance, enabling a running kernel to activate network routing between two network interfaces can be controlled by the file /proc/sys/net/ipv4/ip_forward.

I am currently being faced by a challenge. The organization I am working at the moment has a bunch of linux servers in their network. There are lots of variants of the linux kernel, customizations, distributions, let alone the speed at which they get updated by many different sysops, it is virtually impossible to keep track of what is running on each of those systems.

I am in the process of writing a tool which based on the /proc filesystem will collect as much data as possible from the system to come up with a report.

The linux kernel has an excellent document about the proc filesystem (Documents/filesystems/proc.txt). I can't seem to find the latest version online, it seems it is not being maintained any longer.

The lspci is also another valuable tool which combined with the -vv flag emits just everything that the PCI devices have to say from their eproms.

No comments: