Install and Use collectl Performance Monitoring Tool on Ubuntu 20.04

This tutorial exists for these OS versions

On this page

  1. Prerequisites
  2. Install Collectl
  3. How to Use Collectl
  4. Conclusion

If you are a system administrator and responsible for benchmarking and monitoring a system performance then you will need to know the best tool to perform this task. Collectl is a light-weight performance monitoring tool that can be used to collect performance data that describes the current system status. Compared to other monitoring tools, collectl gather information on many different types of system resources such as cpu, disk, memory, network, sockets, tcp, inodes, infiniband, lustre, memory, nfs, processes, quadrics, slabs and buddyinfo. It can run interactively or as a daemon and has the ability to record and playback the captured data. It also allows you to export the data in various file formats.

In this tutorial, we will show you how to install and use Collectl on Ubuntu 20.04.

Prerequisites

  • A server running Ubuntu 20.04.
  • A root password is configured on the server.

Install Collectl

By default, Collectl package is available in the Ubuntu default repository. You can install it by running the following command:

apt-get install collectl -y

A brief explanation of each option of the Collectl command as shown below:

  • C : CPU information.
  • D : Disk information.
  • E : Environmental data such as, fan, power, temp, etc.
  • F : NFS data.
  • J : Interrupts.
  • L : Filesystem information.
  • N : Network information.
  • X : Interconnect.
  • Y : System object caches.
  • Z : Process information.

How to Use Collectl

You can run Collectl command without any option will print information on cpu, disk and network stats in human readable format.

collectl

You should see the following screen:

Collectl Monitoring

If you want to print statistics for all subsystems, run the command with the --all option:

collectl --all

You should see the following screen:

collectl --all

To use Collectl command work as the top utility, run the following command:

collectl --top

You should see the following screen:

collectl --top

If you want to monitor all resource together, run the following command:

collectl -scmd

You should see the following screen:

collectl -scmd

To display the memory usage of your system, run the command with -sm option:

collectl -sm

You should see the following screen:

collectl -sm

You can display the information of cpu, disks and network data with the following command:

collectl -scdn

You should see the following screen:

collectl -scdn

To get the information about TCP and CPU, run the following command:

collectl -stc

You should see the following screen:

collectl -stc

To get information about processes in your system, run the following command:

collectl -c1 -sZ -i:1

You should see the following screen:

collectl -c1 -sZ -i:1

Conclusion

In the above guide, you learned how to use Collectl command-line utility to monitor your system performance. I hope this will helps you troubleshoot any performance related issues.

Share this page:

0 Comment(s)