dstat command

LINUX-Frequently used commands

dstat command Display the contents of a file
Syntax
dstat  [Option] 
Dstat is a command that can display CPU load by core, IO load by disk, and network transfer rate by interface.
Resources that are monitored using top, iostat, and netstat can be monitored with a single command.
Frequently used options
-tDisplay the time.
-cDisplays the percentage of CPU time used.
-mDisplay memory status
-vmDisplays the status of virtual memory usage.
-sDisplays the status of the swap usage.
-gDisplays the number of page inputs and outputs.
-dDisplay the status of the disk
-rNumber of read/write requests to disk (IOPS)
-iDisplays the status of interrupt processing.
-lDisplay load average status
-pDisplay the status of the process.
-yDisplay system status
-lockShow file lock status..
-nDisplay network status
-ipcDisplays the status of interprocess communication.
-unixDisplay the status of UNIX domain sockets
-tcpDisplay the number of bytes in TCP communication
-udpDisplay the number of bytes in UDP communication.
–floatInclude the decimal point in the display.
–noheadersMake the header display only once
Example: Network and disk status.
# dstat  -Tclmdrnt

--epoch--- --total-cpu-usage-- ---load-avg--- ------memory-usage----- -dsk/total- --io/total- -net/total-
  epoch   |usr sys idl wai stl| 1m   5m  15m | used  free  buff  cach| read writ| read writ| recv  send
1548760630|  2   3  93   3   0|0.92 1.91 2.14|1613M 71.1M 13.4M  180M|1178k  415k|97.8  46.6 |   0     0
1548760631|  2   7  86   5   0|0.92 1.91 2.14|1613M 69.4M 13.7M  182M|2304k  140k| 313  22.0 |   0     0
1548760632|  5   4  90   1   0|0.92 1.91 2.14|1613M 69.3M 13.7M  182M|  20k   64k|5.00  11.0 |2628B 1490
Example: Show CPU and memory related
# dstat  -Tclm

--epoch--- --total-cpu-usage-- ---load-avg--- ------memory-usage-----
  epoch   |usr sys idl wai stl| 1m   5m  15m | used  free  buff  cach
1548760014|  2   3  93   3   0|0.95 2.01 2.11|1618M 61.9M 12.3M  181M
1548760015|  3  13  82   2   0|0.95 2.01 2.11|1616M 81.6M 12.0M  167M
Example: View CPU usage by core.
# dstat  -c -C 0,1,total

-----cpu0-usage----------cpu1-usage-------total-cpu-usage--
usr sys idl wai stl:usr sys idl wai stl:usr sys idl wai stl
  1   3  93   3   0:  2   3  92   3   0:  2   3  93   3   0
 10  30   3  56   0: 20  25   0  56   0: 15  27   2  56   0
Example: Output the execution result log to a file.
# dstat  –output dstat.csv
タイトルとURLをコピーしました