Under Linux, you can use ldd to find out an executable’s library dependency, you can use top to find out the current processes and their relevant information. In this article, some third party software will be introduced for easier management under terminal session.
Processes
htop
Besides the built-in top which we can use for monitoring current processes’ status, we have a much better tool htop. User can see how much workload each of your cpu is doing, you can sort the list in every column and you can press t for tree view for main and forked/sub processes relationships. There are a few things htop doesn’t show on default screen, such as used buffer size and cache size etc, but you can always use free -k or top as supplements.
File systems
du and df
There are a few tools I need to take this note down. The default built-in df and du utility are great tools. Man page is always helpful in detail.
iostat
This comes with the package sysstat in RPM based Linux distributions (CentOS/Fedora/etc), available at their main repositories. Not so sure for the deb people. I always use the command
iostat -dmx /dev/sda 3
to check sda’s usage every 3 seconds.
iotop
iotop is a simple I/O monitor, this package is written by Python 2.x and it requires root privilege to run. It is really simple but it does the job. Check out --help
for a bit more functionality.
ftop
ftop shows processes of open files and file systems. This software is now 5 years old and hasn’t been updated, but it does the job, and I like this better than iotop. For CentOS people, this package comes from rpmforge, you’ll have to add the repository first to your box.
Networking monitoring
Networking is another very important thing that needs to be mornitored. netstat does a fairly good job for a fixed point of time’s status, don’t we need a bit more than that?
iftop
iftop can show current port and ip of the host and the destination, provided this you can use netstat to find out what process is behind a typical service. This can also show in bars how heavily a service is using the network.
It needs root privilege to run, it also has a .iftoprc file available for configuring defaults.
nload
nload doesn’t need root privilege to run, so the functionality is even simpler. Just monitoring the load on network. Press F2 for its configuration.
nload is available in rpmforge for CentOS.
Overall, these are the basic level system monitoring tools, and there are many more like those. For enterprise environment monitoring, there are much more sophisticated tools available.
In recent releases of GNOME, KDE and maybe others, they provide a GUI based system monitoring tools too. See what fits you the most.