Open In App

Collectl – Performance Analysis Tool in Linux

There are a variety of situations in which you will need performance data. Benchmarking, tracking a system’s overall health, and attempting to find out what the system was doing in the past are examples of these. You may just want to know what the machine is doing at the moment. Depending on what you’re doing, you can find yourself using a variety of resources, each tailored to a particular situation.

Unlike other monitoring tools, collectl attempts to do everything. It focuses on a limited collection of statistics, formats its output in only one way, and runs interactively or as a daemon but not both. Buddyinfo, CPU, disc, inodes, Infiniband, luster, memory, network, nfs, processes, quadrics, slabs, sockets, and tcp are only a few of the subsystems that can be monitored.



Installing Collectl

The collectl package is included by default in most distributions (Debian, Ubuntu, Mint, Fedora, suse, openSUSE, Arch Linux, Manjaro, Mageia, and so on), so we can easily install it from the distribution official repository.

$ sudo apt-get install collectl

Installing collectl

During installation, a popup will show select web server apach2:



Select apache2

If you run the tool without any parameters, you’ll get the following result:

The -s flag can be used to measure the following categories in brief:

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

Monitor CPU usage

Simply add -sc to the collectl command to print a list of CPU usage.

$ collectl -sc

Monitor CPU usage

Simply add -sC to the collectl command to print detailed CPU usage:

$ collectl -sC

Detailed CPU usage

Monitor Memory usage

Simply add -sm to the collectl command to print a list of memory consumption.

$ collectl -sm

Monitor Memory usage

Simply use the -sM option with the collectl command to print detailed memory usage:

$ collectl -sM

Detailed memory usage

Monitor Network usage

Simply add -sn to the collectl command to print a list of network usage.

$ collectl -sn

Monitor Network usage

Simply use the -sN option with the collectl command to print detailed network usage.

$ collectl -sN

Detailed network usage

Collectl Utilities

The focus of collectl has always been efficient performance data collection and its display on a single machine. Colplot is a web-based plotting utility that uses gnuplot to generate plots against collectl-generated files that have been generated in plot format.

You can access colplot by http://localhost/colplot (or a valid IP address of your server).

Colplot

Article Tags :