How to Install Collectl in Ubuntu
To Install Collectl in Ubuntu
Collectl is a command line utility, used to collect performance data of the current system status. It has an ability to monitor any subsystem. It can run as a service to monitor an entire server cluster remotely. This article shows the installation process of Collectl in Ubuntu.
Features
- Display the output in many formats.
- Ability to record and playback the captured data.
- Export the data in various file formats.
- Display the data in the terminal.
Installation of Collectl
Utilize the following command, to install the Collectl software package.
root@linuxhelp1:~# apt-get install collectl -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
aglfn apache2 apache2-bin apache2-data apache2-utils colplot gnuplot gnuplot-tex gnuplot5-data gnuplot5-qt libapr1 libaprutil1
libaprutil1-dbd-sqlite3 libaprutil1-ldap libgetopt-simple-perl liblua5.1-0 libwxbase3.0-0v5 libwxgtk3.0-0v5 perl-tk
Suggested packages:
apache2-doc apache2-suexec-pristine | apache2-suexec-custom feedgnuplot gnuplot-doc libgnuplot-iostream-dev python-gnuplot
gnuplot5-doc
The following NEW packages will be installed:
aglfn apache2 apache2-bin apache2-data apache2-utils collectl colplot gnuplot gnuplot-tex gnuplot5-data gnuplot5-qt libapr1
libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libgetopt-simple-perl liblua5.1-0 libwxbase3.0-0v5 libwxgtk3.0-0v5 perl-tk
0 upgraded, 20 newly installed, 0 to remove and 429 not upgraded.
Need to get 10.5 MB of archives.
After this operation, 41.4 MB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 libapr1 amd64 1.5.2-3 [86.0 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 libaprutil1 amd64 1.5.4-1build1 [77.1 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 libaprutil1-dbd-sqlite3 amd64 1.5.4-1build1 [10.6 kB]
Get:4 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 libaprutil1-ldap amd64 1.5.4-1build1 [8,720 B]
Get:5 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 liblua5.1-0 amd64 5.1.5-8ubuntu1 [102 kB]
Get:6 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 apache2-bin amd64 2.4.18-2ubuntu3.1 [923 kB]
Get:7 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 apache2-utils amd64 2.4.18-2ubuntu3.1 [81.3 kB]
Get:8 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 apache2-data all 2.4.18-2ubuntu3.1 [162 kB]
.
.
.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
Setting up collectl (4.0.4-1) ...
Setting up perl-tk (1:804.033-1build1) ...
Setting up libgetopt-simple-perl (1.52-5) ...
Setting up aglfn (1.7-3) ...
Setting up gnuplot-tex (4.6.6-3) ...
Setting up gnuplot5-data (5.0.3+dfsg2-1) ...
Setting up libwxbase3.0-0v5:amd64 (3.0.2+dfsg-1.3) ...
Setting up libwxgtk3.0-0v5:amd64 (3.0.2+dfsg-1.3) ...
Setting up gnuplot5-qt (5.0.3+dfsg2-1) ...
update-alternatives: using /usr/bin/gnuplot5-qt to provide /usr/bin/gnuplot (gnuplot) in auto mode
update-alternatives: using /usr/bin/gnuplot5-qt to provide /usr/bin/gnuplot5 (gnuplot5) in auto mode
Setting up gnuplot (4.6.6-3) ...
Setting up colplot (5.0.1-3) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu4) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Commands List
Use the following command to display the information about the following subsystems, CPU, disks and network.
root@linuxhelp1:~# collectl
waiting for 1 second sample...
#
#cpu sys inter ctxsw KBRead Reads KBWrit Writes KBIn PktIn KBOut PktOut
3 2 219 412 0 0 16 2 117 79 3 42
1 0 213 396 0 0 0 0 114 77 4 52
2 0 271 494 0 0 0 0 127 86 3 44
1 1 390 731 0 0 0 0 141 95 3 48
2 2 284 465 0 0 3000 6 129 88 4 63
3 1 405 725 0 0 248 3 142 96 3 50
1 0 475 856 0 0 0 0 164 111 4 58
1 1 346 599 0 0 368 1 169 115 4 59
1 0 663 1127 0 0 0 0 208 141 5 72
3 1 666 1049 0 0 0 0 213 144 6 94
3 1 477 807 0 0 44 2 158 107 6 86
1 1 214 441 0 0 697 1 118 81 3 49
2 2 175 366 0 0 24 1 73 51 2 28
The ' --all' command display the statistics for all subsystems except slabs.
root@linuxhelp1:~# collectl --all
waiting for 1 second sample...
#
#cpu sys inter ctxsw Cpu0 Free Buff Cach Inac Slab Map Fragments KBRead Reads KBWrit Writes KBIn PktIn KBOut PktOut IP Tcp Udp Icmp Tcp Udp Raw Frag Handle Inodes Reads Writes Meta Comm
3 1 169 354 170 80M 28M 291M 86M 94M 532M kjrnlea5113 0 0 0 0 78 53 2 33 0 0 0 0 980 0 0 0 6592 33323 0 0 0 0
2 0 194 420 193 80M 28M 291M 86M 94M 532M jjrnlea5113 0 0 12 2 102 69 2 35 0 0 0 0 980 0 0 0 6592 33323 0 0 0 0
4 1 196 383 197 80M 28M 291M 86M 94M 532M jjrnlea5113 0 0 0 0 117 79 3 43 0 0 0 0 980 0 0 0 6592 33323 0 0 0 0
3 1 207 395 207 80M 28M 291M 86M 94M 532M jjrnlea5113 0 0 0 0 106 72 4 50 0 0 0 0 980 0 0 0 6592 33323 0 0 0 0
3 1 247 426 246 80M 28M 291M 86M 94M 532M jjrnlea5113 0 0 0 0 124 84 4 54 0 0 0 0 980 0 0 0 6592 33323 0 0 0 0
3 1 204 355 204 80M 28M 291M 86M 94M 532M jjrnlea5113 0 0 0 0 109 74 4 57 0 0 0 0 980 0 0 0 6592 33324 0 0 0 0
3 1 173 338 174 80M 28M 291M 86M 94M 532M jjrnlea5113 0 0 16 2 80 54 3 43 0 0 0 0 980 0 0 0 6592 33323 0 0 0 0
2 0 184 394 183 80M 28M 291M 86M 94M 532M jjrnlea5113 0 0 0 0 105 71 2 36 0 0 0 0 980 0 0 0 6592 33323 0 0 0 0
2 1 246 425 246 80M 28M 291M 86M 94M 532M jjrnlea5113 0 0 0 0 93 63 3 46 0 0 0 0 980 0 0 0 6592 33323 0 0 0 0
1 0 218 475 218 80M 28M 292M 86M 94M 532M jjrnlea5113 0 0 0 0 98 66 3 50 0 0 0 0 980 0 0 0 6592 33323 0 0 0 0
2 0 190 335 190 80M 28M 292M 86M 94M 532M jjrnlea5113 0 0 0 0 87 59 3 45 0 0 0 0 980 0 0 0 6592 33323 0 0 0 0
1 0 184 451 184 79M 28M 292M 86M 94M 532M jjqnlea5113
The ' -scdn' command allows you to monitor the summary of the CPU usage.
root@linuxhelp1:~# collectl -scdn
waiting for 1 second sample...
#
#cpu sys inter ctxsw KBRead Reads KBWrit Writes KBIn PktIn KBOut PktOut
3 1 155 307 0 0 12 2 65 44 2 35
2 1 164 348 0 0 0 0 83 56 2 33
1 0 163 320 0 0 0 0 75 51 2 35
2 2 164 325 0 0 44 2 91 62 2 37
2 0 171 302 0 0 0 0 71 48 3 47
2 0 139 274 0 0 24 2 50 35 2 35
2 2 131 284 0 0 0 0 44 30 2 29
3 1 138 284 0 0 0 0 55 37 2 24
3 1 166 389 28 4 0 0 55 37 2 35
3 1 157 336 68 4 0 0 67 45 2 27
3 1 273 500 0 0 52 2 81 55 2 29
0 0 383 657 0 0 0 0 107 72 4 51
1 1 173 379 0 0 0 0 71 48 3 48
The ' -sm' command collects the data about the memory.
root@linuxhelp1:~# collectl -sm
waiting for 1 second sample...
#
#Free Buff Cach Inac Slab Map
72M 29M 297M 88M 94M 534M
71M 29M 297M 88M 94M 534M
71M 29M 297M 88M 94M 534M
71M 29M 297M 88M 94M 534M
71M 29M 297M 88M 94M 534M
71M 29M 297M 88M 94M 534M
71M 29M 298M 88M 94M 534M
71M 29M 298M 88M 94M 534M
71M 29M 298M 88M 94M 534M
71M 29M 298M 88M 94M 534M
71M 29M 298M 88M 94M 534M
The ' -st' command collects the data about the TCP.
root@linuxhelp1:~# collectl -st
waiting for 1 second sample...
#
# IP Tcp Udp Icmp
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
The ' -stc' command combines the ' t' for TCP and ' c' for CPU.
root@linuxhelp1:~# collectl -stc
waiting for 1 second sample...
#
#cpu sys inter ctxsw IP Tcp Udp Icmp
2 0 168 350 0 0 0 0
1 0 196 357 0 0 0 0
2 1 195 404 0 0 0 0
3 2 202 418 0 0 0 0
1 1 220 389 0 0 0 0
3 1 223 442 0 0 0 0
1 0 227 443 0 0 0 0
5 4 256 457 0 0 0 0
2 0 266 432 0 0 0 0
4 2 307 590 0 0 0 0
5 2 440 944 0 0 0 0
The ' -sd' command to monitor the disk usage.
root@linuxhelp1:~# collectl -sd
waiting for 1 second sample...
#
#KBRead Reads KBWrit Writes
0 0 20 2
0 0 0 0
0 0 16 4
0 0 0 0
0 0 0 0
0 0 12 2
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
The ' -sD' command helps to collect the data on individual disks.
root@linuxhelp1:~# collectl -sD
waiting for 1 second sample...
# DISK STATISTICS (/sec)
# Pct
#Name KBytes Merged IOs Size Wait KBytes Merged IOs Size Wait RWSize QLen Wait SvcTim Util
sda 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
sda 0 0 0 0 0 20 3 2 10 2 10 1 2 2 0
sda 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
sda 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
sda 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
sda 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
sda 0 0 0 0 0 12 1 2 6 2 6 1 2 2 0
sda 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
sda 0 0 0 0 0 1193 1 2 596 10 596 1 10 6 1
sda 0 0 0 0 0 167 0 2 84 8 84 1 8 8 1
The ' -top' command is used to collect the information about TOP.
root@linuxhelp1:~# collectl &ndash top
# TOP PROCESSES sorted by time (counters are /sec) 02:04:01Pct AccuTime RKB WKB MajF MinF Commandn/perl
# PID User PR PPID THRD S VSZ RSS CP SysT UsrT Pct AccuTime RKB WKB MajF MinF Commandn/perl
6821 root 20 2938 0 R 74M 27M 0 0.02 0.09 11 00:01.80 0 0 0 0 /usr/bin/perl
6336 root 20 1 0 S 73M 25M 0 0.01 0.04 5 00:01.28 0 0 0 0 /usr/bin/perl
1123 root 20 1091 0 S 383M 43M 0 0.00 0.01 1 00:06.13 0 0 0 0 /usr/lib/xorg/Xorg
2069 user1 20 1831 4 S 1G 54M 0 0.00 0.01 1 00:06.71 0 0 0 0 compiz
6473 root 20 2 0 S 0 0 0 0.01 0.00 1 00:00.16 0 0 0 0 kworker/0:1
1 root 20 0 0 S 180M 5M 0 0.00 0.00 0 00:02.81 0 0 0 0 /sbin/init
2 root 20 0 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 kthreadd
3 root 20 2 0 S 0 0 0 0.00 0.00 0 00:02.44 0 0 0 0 ksoftirqd/0
4 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 kworker/0:0
5 root 0 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 kworker/0:0H
7 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.44 0 0 0 0 rcu_sched
8 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcu_bh
9 root RT 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 migration/0
10 root RT 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 watchdog/0
11 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 kdevtmpfs
12 root 0 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 netns
13 root 0 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 perf
14 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 khungtaskd
15 root 0 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 writeback
16 root 25 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 ksmd
The ' -c1 -sZ -i:1' command allows you to collect information about PS.
root@linuxhelp1:~# collectl -c1 -sZ -i:1
waiting for 1 second sample...
### RECORD 1 > > > linuxhelp1 < < < (1479933280.004) (Thu Nov 24 02:04:40 2016) ###
# PROCESS SUMMARY (counters are /sec)
# PID User PR PPID THRD S VSZ RSS CP SysT UsrT Pct AccuTime RKB WKB MajF MinF Command
1 root 20 0 0 S 180M 5M 0 0.00 0.00 0 00:02.82 0 0 0 0 /sbin/init
2 root 20 0 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 kthreadd
3 root 20 2 0 S 0 0 0 0.00 0.00 0 00:02.48 0 0 0 0 ksoftirqd/0
5 root 0 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 kworker/0:0H
7 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.45 0 0 0 0 rcu_sched
8 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcu_bh
9 root RT 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 migration/0
10 root RT 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 watchdog/0
11 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 kdevtmpfs
12 root 0 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 netns
13 root 0 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 perf
14 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 khungtaskd
15 root 0 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 writeback
16 root 25 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 ksmd
17 root 39 2 0 S 0 0 0 0.00 0.00 0 00:00.37 0 0 0 0 khugepaged
18 root 0 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 crypto
19 root 0 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 kintegrityd
Comments ( 0 )
No comments available