Collectl – Utility to collect Linux performance data
Sponsored Link
Unlike most monitoring tools that either focus on a small set of statistics, format their output in only one way, run either interactively or as a daemon but not both, collectl tries to do it all. You can choose to monitor any of a broad set of subsystems which currently include buddyinfo, cpu, disk, inodes, infiniband, lustre, memory, network, nfs, processes, quadrics, slabs, sockets and tcp.
Install Collectl on ubuntu
Open the terminal and run the following commnad
sudo apt-get install collectl
Using Collectl
Collectl Syntax
Record Mode -- read data from live system and write to file or display on terminal
collectl [-f file] [options]
Playback Mode -- read data from one or more raw data files and display on terminal
collectl -p file1 [file2 ...] [options]
Collectl Examples
collectl
waiting for 1 second sample...
#<--------CPU--------><----------Disks-----------><----------Network---------->
#cpu sys inter ctxsw KBRead Reads KBWrit Writes KBIn PktIn KBOut PktOut
0 0 50 99 0 0 48 3 0 0 0 0
0 0 35 96 4 1 0 0 0 1 0 2
0 0 58 120 96 3 104 19 0 1 0 2
0 0 33 73 0 0 0 0 0 1 0 2
0 0 46 81 0 0 0 0 0 1 0 2
0 0 35 77 0 0 0 0 0 1 0 2
0 0 47 96 0 0 36 2 0 1 0 2
0 0 35 78 0 0 0 0 0 1 0 2
1 1 46 90 0 0 0 0 0 1 0 2
0 0 35 74 0 0 0 0 0 1 0 2
collectl -sc
waiting for 1 second sample...
#<--------CPU-------->
#cpu sys inter ctxsw
0 0 47 84
1 1 43 97
0 0 36 76
0 0 36 78
0 0 48 105
0 0 36 74
collectl -sC
waiting for 1 second sample...
# SINGLE CPU STATISTICS
# Cpu User Nice Sys Wait IRQ Soft Steal Guest NiceG Idle
0 0 0 0 0 0 0 0 0 0 100
0 0 0 0 0 0 0 0 0 0 100
0 0 0 0 0 0 0 0 0 0 100
0 0 0 0 0 0 0 0 0 0 100
0 0 0 0 0 0 0 0 0 0 100
0 0 0 0 0 0 0 0 0 0 100
collectl -sm
#<-----------Memory----------->
#Free Buff Cach Inac Slab Map
32M 76M 191M 146M 46M 170M
32M 76M 191M 146M 46M 170M
32M 76M 191M 146M 46M 170M
32M 76M 191M 146M 46M 170M
32M 76M 191M 146M 46M 170M
collectl -sd
waiting for 1 second sample...
#<----------Disks----------->
#KBRead Reads KBWrit Writes
0 0 36 2
0 0 0 0
72 1 0 0
0 0 0 0
0 0 44 2
I prefer dstat, it’s pretty cool.
$ dstat -lcdnmspyt -D total,sda,sdb –top-bio-adv