There are plenty of tools is available in Linux to monitor system resources & performance analysis but why we are explaining about collectl ? collectl is a feature rich command line utility which collect all the possible data from the system with varies aspect but most of the other monitoring tools have certain limitation to log the metrics.
Unlike most of the monitoring tools that collect the small set of statistics by running interactively or as a daemon but not both. Collectl doing on both way to collect the statistics in effective manner.
Collectl offers verity of options which help users to identify any kind of system performance issues, also it save the data for later analysis, unlike other tools. Possible to get the output with two formats summary & detailed one.
Many times you may struggle to get yourself for good performance monitoring tool, if so, i will advise you to try collectl then you came to know, how much it’s useful for you.
Collectl included benchmarking, monitoring a system’s general heath, monitor system resources, performance analysis, etc. You can monitor broad set of system resources like cpu, disk, inodes, infiniband, lustre, memory, network, nfs, processes, quadrics, slabs, sockets and tcp.
You can generate the same/equivalent output of sar, iostat, mpstat, netstat, nfsstat, perfquery, ps, top & vmstat With help of collectl. Started using collectl may be a little challenge for newbies because of its many options.
All raw data is recorded in a single compressed file with the extension raw.gz if the perl compression library has been installed. If that library is not there it will be written to a non-compressed file with the extension raw.
Periodically collectl logs various types of messages to its own message log @
/var/log/collect and configuration file located @
Record Mode – read data from live system and write to file or display on terminal.
Playback Mode – read data from one or more raw data files and display on terminal.
How to Install Collectl
Most of the distribution (Debian, Ubuntu, Mint, Fedora, suse, openSUSE, Arch Linux, Manjaro, Mageia, etc.) has the collectl package by default, so we can easily install it from distribution official repository. For CentOS/RHEL we need to enable EPEL Repository.
[Install Collectl on Debian/Ubuntu/LinuxMint] $ sudo apt-get install collectl [Install Collectl on RHEL/CentOS] $ sudo yum install collectl [Install Collectl on Fedora] $ sudo dnf install collectl [Install Collectl on openSUSE] $ sudo zypper install collectl [Install Collectl on Mageia] $ sudo urpmi collectl [Install Collectl on Arch Linux based system] $ sudo pacman -S collectl
How to Install latest Collectl
When you installing collectl from distribution official repository, you may get bit older version. If you preferring for latest one, then get it installed by manual method. This also not a tricky one and straight forwarded. Make sure you have download the latest version from the Collectl webpage before proceeding the installation.
# wget https://sourceforge.net/projects/collectl/files/collectl/collectl-4.1.0/collectl-4.1.0.src.tar.gz # tar -xvzf collectl-4.1.0.src.tar.gz # cd collectl-4.1.0 # ./INSTALL
Collectl Subsystems identifier
Refer the Collectl Subsystems identifier which will help you to generate required output.
SUMMARY SUBSYSTEMS b - buddy info (memory fragmentation) c - CPU d - Disk f - NFS V3 Data i - Inode and File System j - Interrupts l - Lustre m - Memory n - Networks s - Sockets t - TCP x - Interconnect y - Slabs (system object caches) DETAIL SUBSYSTEMS C - CPU D - Disk E - Environmental data (fan, power, temp), via ipmitool F - NFS Data J - Interrupts L - Lustre OST detail OR client Filesystem detail M - Memory node data, which is also known as numa data N - Networks T - 65 TCP counters only available in plot format X - Interconnect Y - Slabs (system object caches) Z - Processes