Monitorare un sistema Linux con collectl
Di programmi per monitorare il nostro sistema Linux ne abbiamo veramente in quantità industriale.
Tra i tanti c'è anche collectl, che rispetto agli altri ha la pecurialità di monitorare praticamente tutto insieme.
Su Debian potete installarlo così:
# aptitude install collectl
Poi potete lanciarlo così:
# collectl
waiting for 1 second sample...
#<----CPU[HYPER]-----><----------Disks-----------><----------Network---------->
#cpu sys inter ctxsw KBRead Reads KBWrit Writes KBIn PktIn KBOut PktOut
0 0 1094 909 0 0 6977 458 0 0 0 0
2 1 839 1135 0 0 72 3 0 0 0 0
2 0 824 1360 4 1 88 3 0 0 0 0
1 0 877 1260 0 0 40 10 0 0 0 0
0 0 715 915 0 0 0 0 0 0 0 0
1 0 875 1624 0 0 0 0 0 0 0 0
Come vedete qui abbiamo tre voci monitorate:
- CPU
- Disks
- Network
Volendo possiamo anche sceglierle:
# collectl -scd
waiting for 1 second sample...
#<----CPU[HYPER]-----><----------Disks----------->
#cpu sys inter ctxsw KBRead Reads KBWrit Writes
0 0 669 790 0 0 0 0
1 0 1106 2507 0 0 68 2
0 0 975 2076 0 0 0 0
0 0 1535 2695 0 0 0 0
0 0 916 1350 0 0 0 0
0 0 731 998 0 0 0 0
1 0 1088 2517 0 0 0 0
Dove:
- s indica che vogliamo scegliere le voci da visualizzare
- c sta per cpu
- d sta per disks
Oppure per vedere tutto:
# collectl --all
waiting for 1 second sample...
#<----CPU[HYPER]-----><-----------------Int------------------><-----------------Memory-----------------><----------Disks-----------><----------Network----------><-------TCP--------><------Sockets-----><----Files---><------NFS Totals------>
#cpu sys inter ctxsw Cpu0 Cpu1 Cpu2 Cpu3 Cpu4 Cpu5 Cpu6 Cpu7 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
1 0 1018 2700 115 77 44 146 40 68 94 433 6G 82M 2G 1G 175M 2G lssokjeb58s 0 0 65 3 0 0 0 0 0 0 0 0 796 0 0 0 11360 59904 0 0 0 0
1 0 1181 3123 40 114 119 148 52 85 31 594 6G 82M 2G 1G 175M 2G mssokjeb58s 0 0 0 0 0 0 0 0 0 0 0 0 796 0 0 0 11360 59903 0 0 0 0
1 0 885 2013 72 23 117 193 25 96 52 308 6G 82M 2G 1G 175M 2G ossokjeb58s 0 0 0 0 0 0 0 0 0 0 0 0 796 0 0 0 11360 59904 0 0 0 0
Però non è molto leggibile.
Possiamo anche simulare TOP:
# collectl --top
Enjoy!
linux collectl
Commentami!