How to Install Collectl in CentOS
To Install Collectl in CentOS
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 CentOS.
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
First install the epel repository with the following command.
[root@linuxhelp1 Desktop]# yum install epel-release -y
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
Loading mirror speeds from cached hostfile
* base: mirror.fibergrid.in
* extras: mirror.fibergrid.in
* updates: mirror.fibergrid.in
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================
Installing:
epel-release noarch 7-6 extras 14 k
.
.
.
Running transaction
Installing : epel-release-7-6.noarch 1/1
Verifying : epel-release-7-6.noarch 1/1
Installed:
epel-release.noarch 0:7-6
Complete!
Once the repository is installed, run the ' yum' command to install the Collectl software.
[root@linuxhelp1 Desktop]# yum install collectl -y
Loaded plugins: fastestmirror, langpacks
epel/x86_64/metalink | 5.5 kB 00:00:00
epel | 4.3 kB 00:00:00
(1/3): epel/x86_64/group_gz | 170 kB 00:00:00
(2/3): epel/x86_64/updateinfo | 678 kB 00:00:02
(3/3): epel/x86_64/primary_db | 4.3 MB 00:00:12
Loading mirror speeds from cached hostfile
* base: centosmirror.go4hosting.in
* epel: kodeterbuka.beritagar.id
* extras: centosmirror.go4hosting.in
* updates: centosmirror.go4hosting.in
Resolving Dependencies
--> Running transaction check
---> Package collectl.noarch 0:4.1.0-1.el7 will be installed
--> Processing Dependency: perl(Sys::Syslog) for package: collectl-4.1.0-1.el7.noarch
--> Processing Dependency: perl(Compress::Zlib) for package: collectl-4.1.0-1.el7.noarch
--> Running transaction check
---> Package perl-IO-Compress.noarch 0:2.061-2.el7 will be installed
--> Processing Dependency: perl(Compress::Raw::Zlib) > = 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch
.
.
.
Installing : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 3/5
Installing : perl-IO-Compress-2.061-2.el7.noarch 4/5
Installing : collectl-4.1.0-1.el7.noarch 5/5
Verifying : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 1/5
Verifying : perl-Sys-Syslog-0.33-3.el7.x86_64 2/5
Verifying : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 3/5
Verifying : collectl-4.1.0-1.el7.noarch 4/5
Verifying : perl-IO-Compress-2.061-2.el7.noarch 5/5
Installed:
collectl.noarch 0:4.1.0-1.el7
Dependency Installed:
perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 perl-IO-Compress.noarch 0:2.061-2.el7
perl-Sys-Syslog.x86_64 0:0.33-3.el7
Complete!
Commands List
If the installed utility is executed without any option, then it displays the information about CPU, disks and network.
[root@linuxhelp1 Desktop]# collectl
waiting for 1 second sample...
#
#cpu sys inter ctxsw KBRead Reads KBWrit Writes KBIn PktIn KBOut PktOut
14 2 213 404 0 0 0 0 0 0 0 0
10 2 171 320 0 0 8 1 0 0 0 0
16 3 239 418 0 0 0 0 0 0 0 0
13 1 191 344 0 0 0 0 0 0 0 0
8 1 153 356 0 0 0 0 0 0 0 0
16 2 218 408 0 0 0 0 0 0 0 0
16 1 415 580 0 0 0 0 0 0 0 1
13 2 502 736 0 0 0 0 0 0 0 0
18 2 523 682 0 0 0 0 0 0 0 0
12 2 443 623 0 0 0 0 0 0 0 0
9 1 235 387 0 0 0 0 0 0 0 0
15 2 243 447 0 0 163 18 0 1 0 1
14 1 510 704 0 0 0 0 0 2 0 2
14 2 409 566 0 0 0 0 0 0 0 0
Use the following command to display the statistics for all subsystems except slabs.
[root@linuxhelp1 Desktop]# 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
13 2 192 353 192 157M 1M 723M 340M 268M 665M sssokjdba82 0 0 0 0 0 0 0 0 0 0 0 0 978 0 0 0 5824 112914 0 0 0 0
14 2 215 406 215 157M 1M 723M 340M 268M 665M sssokjdba82 0 0 0 0 0 0 0 0 0 0 0 0 978 0 0 0 5824 112914 0 0 0 0
17 3 306 498 306 157M 1M 723M 340M 268M 665M sssokjdba82 0 0 8 1 0 0 0 0 0 0 0 0 978 0 0 0 5824 112914 0 0 0 0
22 3 778 911 778 157M 1M 723M 340M 268M 665M sssokjdba82 0 0 0 0 0 0 0 0 0 0 0 0 978 0 0 0 5824 112914 0 0 0 0
17 2 610 807 610 157M 1M 723M 340M 268M 665M sssokjdba82 0 0 0 0 0 0 0 0 0 0 0 0 978 0 0 0 5824 112914 0 0 0 0
21 2 715 960 720 157M 1M 723M 340M 268M 665M sssokjdba82 0 0 0 0 0 0 0 0 0 0 0 0 978 0 0 0 5824 112914 0 0 0 0
18 2 622 792 617 157M 1M 723M 340M 268M 665M sssokjdba82 0 0 0 0 0 0 0 0 0 0 0 0 978 0 0 0 5824 112914 0 0 0 0
18 2 481 620 481 157M 1M 723M 340M 268M 665M sssokjdba82 0 0 0 0 0 0 0 0 0 0 0 0 978 0 0 0 5824 112909 0 0 0 0
17 3 439 622 439 157M 1M 723M 340M 268M 665M sssokjdba82 0 0 0 0 0 0 0 0 0 0 0 0 978 0 0 0 5824 112909
You can also monitor the summary of the CPU usage.
[root@linuxhelp1 Desktop]# collectl -scdn
waiting for 1 second sample...
#
#cpu sys inter ctxsw KBRead Reads KBWrit Writes KBIn PktIn KBOut PktOut
13 4 220 381 0 0 0 0 0 0 0 0
18 4 287 481 0 0 0 0 0 0 0 0
14 3 271 514 0 0 0 0 0 0 0 0
Use the following command to collect the data about the memory.
[root@linuxhelp1 Desktop]# collectl -sm
waiting for 1 second sample...
#
#Free Buff Cach Inac Slab Map
156M 1M 724M 340M 268M 665M
156M 1M 724M 340M 268M 665M
156M 1M 724M 340M 268M 665M
156M 1M 724M 340M 268M 665M
156M 1M 724M 340M 268M 665M
156M 1M 724M 340M 268M 665M
156M 1M 724M 340M 268M 665M
156M 1M 724M 340M 268M 665M
156M 1M 724M 340M 268M 665M
156M 1M 724M 340M 268M 665M
156M 1M 724M 340M 268M 665M
156M 1M 724M 340M 268M 665M
156M 1M 724M 340M 268M 665M
If you want to collect data about the TCP, run ' -st' command.
[root@linuxhelp1 Desktop]# 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
Following command helps you to combine, where ' t' for TCP and ' c' for CPU.
[root@linuxhelp1 Desktop]# collectl -stc
waiting for 1 second sample...
#
#cpu sys inter ctxsw IP Tcp Udp Icmp
8 1 151 356 0 0 0 0
15 2 238 441 0 0 0 0
11 2 167 341 0 0 0 0
10 1 167 353 0 0 0 0
15 3 214 408 0 0 0 0
10 1 182 351 0 0 0 0
16 2 227 433 0 0 0 0
15 2 221 405 0 0 0 0
15 1 442 624 0 0 0 0
12 1 194 383 0 0 0 0
13 3 224 380 0 0 0 0
10 1 219 397 0 0 0 0
Disk usage can be viewed by the following command.
[root@linuxhelp1 Desktop]# collectl -sd
waiting for 1 second sample...
#
#KBRead Reads KBWrit Writes
0 0 25 5
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 4 1
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
The ' -sD' option to collect data on individual disks.
[root@linuxhelp1 Desktop]# 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 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 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 7 0 1 8 1 8 1 1 1 0
sda 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
This command helps to collect the information about TOP.
[root@linuxhelp1 Desktop]# collect --top
# TOP PROCESSES sorted by time (counters are /sec) 06:34:39
# PID User PR PPID THRD S VSZ RSS CP SysT UsrT Pct AccuTime RKB WKB MajF MinF Command
1687 root 20 1021 0 R 172M 22M 0 0.02 0.09 11 00:02.40 0 0 0 0 /usr/bin/perl
9573 root 20 9353 6 S 1G 271M 0 0.00 0.03 3 01:59.83 0 0 0 0 /usr/bin/gnome-shell
1642 root 20 1547 0 S 217M 36M 0 0.01 0.01 2 00:38.62 0 0 0 0 /usr/bin/Xorg
9712 root 20 9353 1 S 440M 14M 0 0.00 0.01 1 00:00.10 0 0 0 0 abrt-applet
1 root 20 0 0 S 122M 6M 0 0.00 0.00 0 00:03.02 0 0 0 0 /usr/lib/systemd/systemd
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:05.02 0 0 0 0 ksoftirqd/0
7 root RT 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 migration/0
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 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/0
10 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/1
11 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/2
12 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/3
13 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/4
14 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/5
15 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/6
16 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/7
17 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/8
18 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/9
19 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/10
20 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/11
21 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/12
To collect information about PS, use following command.
[root@linuxhelp1 Desktop]# collectl -c1 -sZ -i:1
waiting for 1 second sample...
### RECORD 1 > > > linuxhelp1 < < < (1479863108.002) (Wed Nov 23 06:35:08 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 122M 6M 0 0.00 0.00 0 00:03.02 0 0 0 0 /usr/lib/systemd/systemd
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:05.03 0 0 0 0 ksoftirqd/0
7 root RT 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 migration/0
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 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/0
10 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/1
11 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/2
12 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/3
13 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/4
14 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/5
15 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/6
16 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/7
17 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/8
18 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/9
19 root 20 2 0 S 0 0 0 0.00 0.00 0 00:00.00 0 0 0 0 rcuob/10
Comments ( 0 )
No comments available