This article is part 2 in a series of 3 articles regarding 18 Linux System monitoring tools you should know.
In this article we’re going to cover some built-in system monitoring tools as well as some free add-on tools which will make your life easier when troubleshooting issues regarding your System.
You can find the other articles here:
18 Linux System Monitoring Tools – part 1 – Memory and Processes
18 Linux System Monitoring Tools – part 3 – Networking
Most Linux distributions are equipped with many monitoring tools. These tools provide metrics which can be used to get information about system activities. You can use these tools to find the possible causes of a performance issue. The commands discussed in this article are some of the most basic commands when it comes to system analysis and debugging server issues such as:
- Finding out bottlenecks.
- Disk (storage) bottlenecks.
- CPU and memory bottlenecks.
- Network bottlenecks.
The commands we’re going to cover in this article are:
Table of Contents
#1 : sar – Collect and Report System Activity
The sar command is used to collect, report and save system activity information. To see network counter, enter:
# sar -n DEV |more
You can display real time usage using sar:
# sar 4 5
#2 : iostat – Average CPU Load, Disk Activity
The command iostat reports CPU statistics and input/output statistics for devices, partitions and network filesystems (NFS).
#3 : uptime – Tell how long the system has been running – system monitoring
The uptime command can be used to see how long the server has been running. The current time, how long the system has been running, how many users are currently logged on and the system load averages for the past 1, 5 and 15 minutes.
1 can be considered as optimal load value. The load can change from system to system. For a single CPU system 1 – 3 and SMP systems 6 – 10 load value might be acceptable.
#4 : strace – System Calls
Trace system calls and signals. This is useful for debugging webserver and other server problems.
This tools allows you to see what happens in the background when debugging a specific program for example.
You can find more information in my article 7 strace exmaples.
#16 : /Proc File System – Various Kernel Statistics
/proc file system provides detailed information about various hardware devices and other Linux kernel information.
See Linux kernel / proc documentations for further details.
Common /proc exmaples:
# cat /proc/cpuinfo # cat /proc/meminfo # cat /proc/zoneinfo # cat /proc/mounts
Please continue reading part 3 regarding system monitoring tools which will help you troubleshoot issues regarding your Networking.
Feel free to leave comments or ask questions.