This very useful Linux utility is a good way to get real-time Linux system information, and compare various activity on a system such as disk reads and writes, or network activity.
ubuntu ~ $ dstat You did not select any stats, using -cdngy by default. ----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system-- usr sys idl wai hiq siq| read writ| recv send| in out | int csw 0 0 100 0 0 0| 594B 5612B| 0 0 | 0 0 | 11 35 0 0 100 0 0 0| 0 0 | 40B 1186B| 0 0 | 17 57 0 0 100 0 0 0| 0 0 | 40B 436B| 0 0 | 14 43 0 0 100 0 0 0| 0 128k| 40B 436B| 0 0 | 28 42 0 0 100 0 0 0| 0 0 | 40B 436B| 0 0 | 13 39 0 0 100 0 0 0| 0 0 | 40B 436B| 0 0 | 14 41 0 0 100 0 0 0| 0 0 | 40B 436B| 0 0 | 13 39 0 0 100 0 0 0| 0 0 | 40B 436B| 0 0 | 16 41 0 0 100 0 0 0| 0 0 | 40B 436B| 0 0 | 15 43 0 1 99 0 0 0| 0 0 | 40B 436B| 0 0 | 19 47 0 0 100 0 0 0| 0 0 | 40B 346B| 0 0 | 16 39 0 0 100 0 0 0| 0 0 | 40B 436B| 0 0 | 14 39 0 0 100 0 0 0| 0 0 | 40B 436B| 0 0 | 14 41 0 0 100 0 0 0| 0 0 | 40B 346B| 0 0 | 12 35 |
Show which program is using the most CPU power and is the most demanding on the hard disk.
ubuntu ~ $ dstat -c --top-cpu -dn --top-mem ----total-cpu-usage---- -most-expensive- -dsk/total- -net/total- --most-expensive- usr sys idl wai hiq siq| cpu process | read writ| recv send| memory process 0 0 100 0 0 0|mysqld 0.0| 594B 5612B| 0 0 |mysqld 42.0M 0 0 100 0 0 0| | 0 0 | 120B 1170B|mysqld 42.0M 0 0 100 0 0 0| | 0 0 | 40B 420B|mysqld 42.0M 1 0 99 0 0 0| | 0 0 | 40B 420B|mysqld 42.0M 0 0 100 0 0 0| | 0 0 | 40B 420B|mysqld 42.0M 0 1 99 0 0 0| | 0 0 | 40B 420B|mysqld 42.0M 1 0 99 0 0 0| | 0 32k| 40B 420B|mysqld 42.0M |
List the free space on your Linux system in real time.
ubuntu ~ $ dstat --freespace -----/----------/dev--------/run------/systemd- used free: used free: used free: used free 13.7G 15.7G:12.0k 491M: 468k 98.8M: 0 0 13.7G 15.7G:12.0k 491M: 468k 98.8M: 0 0 13.7G 15.7G:12.0k 491M: 468k 98.8M: 0 0 13.7G 15.7G:12.0k 491M: 468k 98.8M: 0 0 13.7G 15.7G:12.0k 491M: 468k 98.8M: 0 0 13.7G 15.7G:12.0k 491M: 468k 98.8M: 0 0 13.7G 15.7G:12.0k 491M: 468k 98.8M: 0 0 13.7G 15.7G:12.0k 491M: 468k 98.8M: 0 0 13.7G 15.7G:12.0k 491M: 468k 98.8M: 0 0 13.7G 15.7G:12.0k 491M: 468k 98.8M: 0 0 13.7G 15.7G:12.0k 491M: 468k 98.8M: 0 0 |
You can even list the NTP properties with this command. Making it very useful. This is definitely something to install to keep watch on your Linux machine.
This example shows memory usage on your Linux machine.
ubuntu ~ $ dstat --mem ------memory-usage----- used buff cach free 319M 553M 52.0M 68.4M 319M 553M 52.1M 68.4M 319M 553M 52.1M 68.4M 319M 553M 52.1M 68.4M 319M 553M 52.1M 68.4M 319M 553M 52.1M 68.4M 319M 553M 52.1M 68.4M 319M 553M 52.1M 68.4M |
Give this command a try yourself, this really works well. Get detailed system information that is updated in real-time in a terminal window.
Live information about network packets transferred to and fro.
jason@jason-desktop:~$ dstat --net-packets -pkt/total- #recv #send 0 0 0 0 0 0 1 1 0 1 5 4 21 19 15 17 46 43 2 2 17 13 |