



System Monitoring
Linux offers many tools for monitoring your system, most of which are available through the shell.
The /proc file system is used as a gateway to view kernel processes, and many applications use the
information available in /proc to view the status of the kernel.
Each process is assigned a Process ID (PID) by the kernel, for example if you start Gedit, it will
be assigned a PID e.g. 3924. The ps command displays a list of all the current process, their PID
and some other information.
The kill command is used to stop a process. It is supplied at the command line with the PID of the
process you wish to stop. There are lots of alternative options that can be used with kill - see the
kill man pages.
Niceness is a measure of the priority of a process. Computer systems have finite resources and
therefore some way of proiritising the processes which are all vieying for the resources - this
is measured by niceness. Niceness values range from -20 (highest priority) to 19 (lowest priority).
When starting a process from the command line it is possible to assign its niceness value also. the
renice command is used to reassign the niceness value to a process without the need to stop the process.
The top command displays a table of all the currently running processes and several items of
information about them, and the system in general. It automatically updates ever few seconds.
System memory usage can be displayed using the free command. This information is static but can be
changed to dynamic by using the watch command like this
watch free
watch tells the shell to update the free command every 2 seconds
vmstat is another command that displays virtual memory statistics.
uptime displays how long the computer has been running since the last reboot and gives load averages.
A GUI for the GNOME desktop enviironment that shows all useful system information in realtime is
gnome-system-monitor. It has two different types of display - list and graph. Lots of useful things
can be achieved with this programme, such as changing process niceness and killing processes.