$ dstat -h -t, --time enable time/date output -a, --all equals -cdngy (default) -f, --full automatically expand -C, -D, -I, -N and -S lists
-d | --disk | -cdngyと同じ。オプションなしはこれになる |
-t | --time | 時刻を表示 |
-c | --cpu | CPU使用率を表示 |
-d | --disk | Disk IOを表示 |
-g | --page | ページIN/OUTを表示 |
-y | --sys | 割り込み回数とコンテキストスイッチの回数を表示 |
-l | --load | ロードアベレージを表示 |
-m | --mem | メモリの使用量を表示 |
-n | --net | ネットワークIOを表示 単位はB/s |
-s | --swap | スワップのused/freeを表示 |
メモリー含めて見やすいので、オススメです。まずはこれを実行しましょう。
$ dstat -vt ---procs--- ------memory-usage----- ---paging-- -dsk/total- ---system-- ----total-cpu-usage---- ----system---- run blk new| used buff cach free| in out | read writ| int csw |usr sys idl wai hiq siq| time 0 0 6.8| 272M 4180k 224M 240M| 0 0 | 846k 95k| 383 430 | 1 1 97 1 0 0|02-08 23:45:46 0 0 0| 272M 4180k 224M 240M| 0 0 | 0 0 | 226 211 | 0 0 100 0 0 0|02-08 23:45:47 0 0 0| 272M 4180k 224M 240M| 0 0 | 0 8192B| 267 263 | 1 1 98 0 0 0|02-08 23:45:48 0 0 0| 272M 4180k 224M 240M| 0 0 | 0 4096B| 231 228 | 0 0 99 1 0 0|02-08 23:45:49 0 0 0| 272M 4180k 224M 240M| 0 0 | 0 4096B| 238 230 | 1 1 99 0 0 0|02-08 23:45:50 0 0 0| 272M 4180k 224M 240M| 0 0 | 0 0 | 240 222 | 0 0 100 0 0 0|02-08 23:45:51 0 0 0| 273M 4180k 224M 239M| 0 0 | 0 486k| 252 249 | 1 1 98 1 0 0|02-08 23:45:52 0 0 0| 272M 4180k 224M 240M| 0 0 | 0 4096B| 247 233 | 1 0 99 0 0 0|02-08 23:45:53 0 0 0| 272M 4180k 224M 240M| 0 0 | 0 4096B| 227 229 | 1 1 98 1 0 0|02-08 23:45:54 0 0 0| 272M 4180k 224M 240M| 0 0 | 0 4096B| 211 217 | 0 0 100 0 0 0|02-08 23:45:55 0 0 0| 272M 4180k 224M 240M| 0 0 | 0 4096B| 222 215 | 1 1 99 0 0 0|02-08 23:45:56 0 0 0| 272M 4180k 224M 240M| 0 0 | 0 4096B| 248 235 | 1 0 99 1 0 0|02-08 23:45:57 0 0 0| 272M 4180k 224M 240M| 0 0 | 0 0 | 273 245 | 1 0 99 0 0 0|02-08 23:45:58 0 0 0| 272M 4180k 224M 240M| 0 0 | 0 0 | 246 221 | 0 1 99 0 0 0|02-08 23:45:59 0 0 0| 272M 4180k 224M 240M| 0 0 | 0 0 | 253 241 | 1 0 99 0 0 0|02-08 23:46:00 0 0 1.0| 272M 4180k 224M 240M| 0 0 | 0 17k| 306 243 | 1 0 99 0 0 0|02-08 23:46:01
dstat -taだと、メモリーわからないです。
$ dstat -ta ----system---- ----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system-- time |usr sys idl wai hiq siq| read writ| recv send| in out | int csw 18-09 01:05:44| 1 0 98 0 0 0| 157k 34k| 0 0 | 24k 10k| 134 137 18-09 01:05:45| 0 0 100 0 0 0| 0 0 |1336B 150B| 0 0 | 56 71 18-09 01:05:46| 0 0 100 0 0 0| 0 0 |1777B 1578B| 0 0 | 61 61 18-09 01:05:47| 0 0 100 0 0 0| 0 0 |1522B 54B| 0 0 | 52 60 18-09 01:05:48| 0 0 100 0 0 0| 0 0 | 636B 1122B| 0 0 | 58 101 18-09 01:05:49| 0 0 100 0 0 0| 0 0 |1416B 139B| 0 0 | 52 60 18-09 01:05:50| 0 0 100 0 0 0| 0 0 |1140B 422B| 0 0 | 60 80 18-09 01:05:51| 0 0 100 0 0 0| 0 0 |1166B 422B| 0 0 | 49 60 18-09 01:05:52| 0 0 100 0 0 0| 0 0 |1217B 844B| 0 0 | 51 71
$ dstat -ta --top-cpu ----system---- ----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system-- -most-expensive- time |usr sys idl wai hiq siq| read writ| recv send| in out | int csw | cpu process 18-09 01:06:38| 1 0 98 0 0 0| 157k 34k| 0 0 | 24k 10k| 134 137 |rngd 0.0 18-09 01:06:39| 0 0 100 0 0 0| 0 0 |2508B 150B| 0 0 | 85 77 | 18-09 01:06:40| 1 1 99 1 0 0| 584k 352k|1388B 1094B| 568k 0 | 145 178 | 18-09 01:06:41| 1 0 100 0 0 0| 0 0 |2104B 1649B| 0 0 | 77 94 | 18-09 01:06:42| 1 0 100 0 0 0| 0 0 |4034B 1051B| 0 0 | 130 100 |xfsaild/dm-0 0.5 18-09 01:06:43| 1 0 100 0 0 0| 0 0 |1192B 602B| 0 0 | 70 80 |tuned 0.5 18-09 01:06:44| 0 0 100 0 0 0| 0 0 |1194B 74B| 0 0 | 73 83 | 18-09 01:06:45| 1 0 99 0 0 0| 32k 0 |2980B 5993B| 32k 0 | 100 97 | 18-09 01:06:46| 4 1 96 0 0 0|8192B 12k|2312B 24k| 0 0 | 207 201 |php-fpm: pool3.5 18-09 01:06:47| 0 0 100 0 0 0| 0 0 |1534B 1984B| 0 0 | 80 104 |
1秒間隔で、10回を繰り返す。
$while true; do dstat -ta --top-cpu 1 10 ; done ----system---- ----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system-- -most-expensive- time |usr sys idl wai hiq siq| read writ| recv send| in out | int csw | cpu process 03-08 00:05:13| 0 0 99 0 0 0| 173k 72k| 0 0 | 0 0 | 279 285 |mysqld 0.2 03-08 00:05:14| 1 1 98 1 0 0| 0 4096B| 60B 1078B| 0 0 | 273 263 |mysqld 0.5 03-08 00:05:15| 1 0 99 0 0 0| 0 0 | 60B 470B| 0 0 | 350 343 |zabbix_server0.5 03-08 00:05:16| 1 1 98 0 0 0| 0 4096B| 60B 454B| 0 0 | 332 288 |docker-contai0.5 03-08 00:05:17| 2 0 98 0 0 0| 0 4096B| 60B 470B| 0 0 | 323 279 |mysqld 0.5 03-08 00:05:18| 1 1 98 1 0 0| 0 458k| 60B 470B| 0 0 | 334 331 | 03-08 00:05:19| 1 1 98 1 0 0| 0 4096B| 60B 454B| 0 0 | 316 279 | 03-08 00:05:20| 2 1 97 0 0 0| 0 4096B| 60B 454B| 0 0 | 330 318 |mysqld 1.0 03-08 00:05:21| 1 1 98 1 0 0|4096B 8192B| 60B 470B| 0 0 | 315 282 | 03-08 00:05:22| 1 1 98 0 0 0| 0 4096B| 60B 470B| 0 0 | 316 279 |kworker/0:2 0.5 03-08 00:05:23| 1 1 98 1 0 0| 0 4096B| 60B 470B| 0 0 | 321 267 | ----system---- ----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system-- -most-expensive- time |usr sys idl wai hiq siq| read writ| recv send| in out | int csw | cpu process 03-08 00:05:23| 0 0 99 0 0 0| 172k 72k| 0 0 | 0 0 | 280 285 |mysqld 0.2 03-08 00:05:24| 0 0 100 0 0 0| 0 4096B| 60B 1078B| 0 0 | 280 277 | 03-08 00:05:25| 1 1 98 1 0 0| 0 4096B| 60B 454B| 0 0 | 320 278 |docker-contai0.5 03-08 00:05:26| 1 1 98 1 0 0| 0 4096B| 60B 470B| 0 0 | 324 286 |dockerd-curre0.5 03-08 00:05:27| 1 1 97 1 0 1| 0 907k| 60B 470B| 0 0 | 384 364 |mysqld 1.0 03-08 00:05:28| 1 1 98 0 0 0| 0 4096B| 235B 470B| 0 0 | 371 321 |zabbix_server0.5 03-08 00:05:29| 1 1 98 1 0 0| 0 4096B| 60B 470B| 0 0 | 309 284 |zabbix_server0.5 03-08 00:05:30| 1 1 98 0 0 0| 0 4096B| 120B 530B| 0 0 | 335 279 |zabbix_server0.5 03-08 00:05:31| 2 1 98 0 0 0| 0 0 | 60B 470B| 0 0 | 298 252 |zabbix_server0.5 03-08 00:05:32| 1 0 99 1 0 0| 0 4096B| 60B 454B| 0 0 | 315 258 |dockerd-curre0.5
$ dstat -t -gs --mem --vm --ipc ----system---- ---paging-- ----swap--- ------memory-usage----- -----virtual-memory---- --sysv-ipc- time | in out | used free| used buff cach free|majpf minpf alloc free|msg sem shm 08-07 22:49:40| 0 0 | 0 820M| 275M 4180k 231M 231M| 4 2007 1318 1492 | 0 2 8 08-07 22:49:41| 0 0 | 0 820M| 275M 4180k 231M 231M| 0 4 4 5 | 0 2 8 08-07 22:49:42| 0 0 | 0 820M| 275M 4180k 231M 231M| 0 15 95 93 | 0 2 8 08-07 22:49:43| 0 0 | 0 820M| 275M 4180k 231M 231M| 0 1 2 2 | 0 2 8
$ dstat -tdng --file --lock --top-io --top-bio ----system---- -dsk/total- -net/total- ---paging-- --filesystem- ---file-locks-- ----most-expensive---- ----most-expensive---- time | read writ| recv send| in out |files inodes|pos lck rea wri| i/o process | block i/o process 08-07 22:50:29| 649k 86k| 0 0 | 0 0 | 1568 15455 | 42 4.0 0 46|systemd 45k 109k|mysqld 159k 62k 08-07 22:50:30| 0 4096B| 720B 1788B| 0 0 | 1568 15605 | 42 4.0 0 46|snmpd 4412B 0 |mysqld 0 4096B 08-07 22:50:31| 0 4096B| 60B 518B| 0 0 | 1568 15605 | 42 4.0 0 46|mysqld 732B 3067B|mysqld 0 4096B 08-07 22:50:32| 0 0 | 152B 654B| 0 0 | 1568 15605 | 42 4.0 0 46|mysqld 654B 1152B| 08-07 22:50:33| 0 4096B| 60B 502B| 0 0 | 1568 15605 | 42 4.0 0 46|zabbix_agen1142B 0 |mysqld 0 4096B 08-07 22:50:34| 0 4096B| 120B 578B| 0 0 | 1568 15605 | 42 4.0 0 46|mysqld 793B 2527B|mysqld 0 4096B
$ 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 1 0 99 1 0 0| 244k 121k| 0 0 | 0 0 | 106 227 1 0 99 0 0 0| 0 4096B| 60B 114B| 0 0 | 97 186 0 0 100 0 0 0| 0 4096B| 60B 106B| 0 0 | 95 196 0 1 98 1 0 0| 0 970k| 60B 98B| 0 0 | 130 283 1 0 98 1 0 0| 0 4096B| 60B 114B| 0 0 | 100 206 0 0 100 0 0 0| 0 4096B| 60B 98B| 0 0 | 84 174 0 0 100 0 0 0| 0 4096B| 60B 98B| 0 0 | 81 154 0 0 100 0 0 0| 0 0 | 60B 98B| 0 0 | 66 140 1 0 99 0 0 0| 0 0 | 60B 98B| 0 0 | 78 152 0 0 100 0 0 0| 0 0 | 60B 98B| 0 0 | 70 147 0 0 99 1 0 0| 0 4096B| 60B 98B| 0 0 | 76 156
$ dstat -taf ----system---- -------cpu0-usage------ --dsk/sda-- -net/enp0s3 ---paging-- ---system-- time |usr sys idl wai hiq siq| read writ| recv send| in out | int csw 11-04 23:41:43| 1 0 99 0 0 0| 221k 116k| 0 0 | 0 0 | 104 222 11-04 23:41:44| 0 0 100 0 0 0| 0 4096B| 120B 170B| 0 0 | 89 162 11-04 23:41:45| 1 0 99 0 0 0| 0 4096B| 60B 106B| 0 0 | 70 159 11-04 23:41:46| 0 0 99 1 0 0| 0 650k| 60B 98B| 0 0 | 90 184 11-04 23:41:47| 0 0 100 0 0 0| 0 0 | 60B 106B| 0 0 | 94 175 11-04 23:41:48| 1 0 98 1 0 0| 0 4096B| 120B 166B| 0 0 | 102 240 11-04 23:41:49| 0 1 99 0 0 0| 0 4096B| 60B 106B| 0 0 | 73 154
関連ページ