Chapter – 23 Monitoring System Information
Objectives: At the end of this module, you would have gained fair knowledge on: •System Processes •Monitoring system processes •Monitoring file systems
System Processes
The ps –ax command displays a list of current system processes, including processes owned by other users. To display the owner of the processes along with the processes use the command ps aux.
You can use the ps command in combination with the grep command to see if a process is running. For example, to determine if Gnome-RPM is running, use the following command: # ps ax | grep gnorpm
If you would like to use a graphical interface with free, you can use the GNOME System Monitor. To start it on the GNOME desktop, go to the Main Menu Button => Programs => System => System Monitor or type gtop at a shell prompt withing X window.
File systems
The df command reports the system's disk space usage. If you type the command df at a shell prompt, the output looks similar to the following: Filesystem 1k-blocks Used Available Use% Mounted on/dev/hda2 10325716 2902060 6899140 30% //dev/hda1 15554 8656 6095 59% /boot/dev/hda3 20722644 2664256 17005732 14% /home
To view the system's disk space usage in a graphical format, use the Filesystems tab in the GNOME System Monitor. To start it on the GNOME desktop, go to the Main Menu Button (on the Panel) => Programs => System => System Monitor or type gtop at a shell prompt from within any X Window System desktop. Then choose the Filesystems tab.
Monitoring File systems
Red Hat Linux provides a utility called diskcheck that monitors the amount of free disk space on the system. Based on the configuration file, it will send email to the system administrator when one or more disk drives reach a specified capacity. This utility is run as an hourly cron task.
The following variables can be defined in /etc/diskcheck.conf: •defaultCutoff •cutoff[/dev/partition] •cutoff[/mountpoint] •exclude •ignore
Hardware
If you are having trouble configuring your hardware or just want to know what hardware is in your system, you can use the Hardware Browser application to display the hardware that can be probed.
To start the program, type hwbrowser at a shell prompt. As shown in the figure given below it displays your CD-ROM devices, floppy disks, hard drives and their partitions, network devices, pointing devices, system devices, and video cards.
Click on the category name in the left menu, and the information will be displayed.
You can also use the lspci command to list all PCI devices. Use the command lspci -v for more verbose information or lspci -vv for very verbose output.