一、示例 #
1=> lsblk
2NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
3loop0 7:0 0 1G 0 loop /app/chroot/webconsole-promoted/shared
4vda 252:0 0 110G 0 disk
5├─vda1 252:1 0 1G 0 part /boot
6└─vda2 252:2 0 109G 0 part
7 ├─cl-root 253:0 0 10G 0 lvm /
8 ├─cl-swap 253:1 0 4G 0 lvm [SWAP]
9 ├─cl-home 253:2 0 6G 0 lvm
10 │ └─home 253:12 0 6G 0 crypt /home
11 ├─cl-app 253:3 0 15G 0 lvm
12 │ └─app 253:10 0 15G 0 crypt /app
13 ├─cl-package 253:4 0 8G 0 lvm
14 │ └─package 253:11 0 8G 0 crypt /package
15 ├─cl-data 253:5 0 20G 0 lvm /data
16 ├─cl-hislog 253:6 0 10G 0 lvm /hislog
17 ├─cl-cache 253:7 0 2G 0 lvm /cache
18 ├─cl-dap 253:8 0 89G 0 lvm /hislog/dap
19 └─cl-backup 253:9 0 25G 0 lvm
20 └─backup 253:13 0 25G 0 crypt /backup
21vdb 252:16 0 80G 0 disk
22└─vdb1 252:17 0 80G 0 part
23 ├─cl-data 253:5 0 20G 0 lvm /data
24 └─cl-dap 253:8 0 89G 0 lvm /hislog/dap
25=> cat /proc/diskstats
26 252 0 vda 159493845 2056576 5617078371 1552152184 65347508 13783484 1128522539 2070129280 0 886384887 3215786500 0 0 0 0
27 252 1 vda1 25353 2 4622370 323480 486 951 48720 50547 0 229456 371417 0 0 0 0
28 252 2 vda2 159468215 2056574 5612447569 1551825664 53970188 13782533 1128473819 1996831053 0 913941147 3332714673 0 0 0 0
29 252 16 vdb 3123909 59138 127128355 46849021 12110593 15158359 241115137 254789137 0 52500297 203906263 0 0 0 0
30 252 17 vdb1 3123367 59138 127104741 46841127 3897483 15027157 240056553 195792831 0 66678589 235705174 0 0 0 0
31 253 0 dm-0 81966850 0 2541179469 718368091 4835864 0 63945263 181587156 0 543304821 900869292 0 0 0 0
32 253 1 dm-1 39491681 0 315937056 354020275 31737102 0 253896816 2458965561 0 200331242 2823539969 0 0 0 0
33 253 2 dm-2 20568 0 1370523 286000 9033 0 116327 616974 0 686801 903014 0 0 0 0
34 253 3 dm-3 27092223 0 1347467400 330732281 1135223 0 23297583 56219835 0 204377309 387211171 0 0 0 0
35 253 4 dm-4 6419 0 68948 90293 19105 0 120956 717639 0 667774 807949 0 0 0 0
36 253 5 dm-5 2779789 0 507214559 36366385 25248746 0 464602835 704195339 0 347508715 740899295 0 0 0 0
37 253 6 dm-6 5251510 0 523996485 71587841 7380194 0 106399514 194806376 0 118078310 266540312 0 0 0 0
38 253 7 dm-7 1772 0 41329 34931 12184 0 218874 1010468 0 818229 1045418 0 0 0 0
39 253 8 dm-8 6203721 0 221744397 82963780 23626490 0 375040396 2117003466 0 80501448 2203736434 0 0 0 0
40 253 9 dm-9 1913762 0 280471928 27737018 3503920 0 160325095 124124824 0 81257167 151876112 0 0 0 0
41 253 10 dm-10 27091739 0 1347462526 415492329 1135223 0 26608603 87048745 0 238219337 502736856 0 0 0 0
42 253 11 dm-11 5942 0 64130 100222 19105 0 134204 811752 0 727465 912004 0 0 0 0
43 253 12 dm-12 20112 0 1365873 336612 9033 0 131175 739788 0 769232 1076503 0 0 0 0
44 253 13 dm-13 1913304 0 280467138 35087780 3503914 0 162938029 175455182 0 91516697 210566101 0 0 0 0
45 7 0 loop0 1470 0 103611 18992 248 0 5763 32870 0 18410 31578 0 0 0 0
二、数据解释 #
将数据格式化一下
major | minor | name | rio | rmerge | rsect | rtime spent(ms) | wio | wmerge | wsect | wtime spent(ms) | running | time spent doing I/O(ms) | weighted time spent doing I/Os (ms) |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
252 | 0 | vda | 159493845 | 2056576 | 5617078371 | 1552152184 | 65347508 | 13783484 | 1128522539 | 2070129280 | 0 | 886384887 | 3215786500 |
252 | 1 | vda1 | 25353 | 2 | 4622370 | 323480 | 486 | 951 | 48720 | 50547 | 0 | 229456 | 371417 |
252 | 2 | vda2 | 159468215 | 2056574 | 5612447569 | 1551825664 | 53970188 | 13782533 | 1128473819 | 1996831053 | 0 | 913941147 | 3332714673 |
252 | 16 | vdb | 3123909 | 59138 | 127128355 | 46849021 | 12110593 | 15158359 | 241115137 | 254789137 | 0 | 52500297 | 203906263 |
252 | 17 | vdb1 | 3123367 | 59138 | 127104741 | 46841127 | 3897483 | 15027157 | 240056553 | 195792831 | 0 | 66678589 | 235705174 |
253 | 0 | dm-0 | 81966850 | 0 | 2541179469 | 718368091 | 4835864 | 0 | 63945263 | 181587156 | 0 | 543304821 | 900869292 |
253 | 1 | dm-1 | 39491681 | 0 | 315937056 | 354020275 | 31737102 | 0 | 253896816 | 2458965561 | 0 | 200331242 | 2823539969 |
253 | 2 | dm-2 | 20568 | 0 | 1370523 | 286000 | 9033 | 0 | 116327 | 616974 | 0 | 686801 | 903014 |
253 | 3 | dm-3 | 27092223 | 0 | 1347467400 | 330732281 | 1135223 | 0 | 23297583 | 56219835 | 0 | 204377309 | 387211171 |
253 | 4 | dm-4 | 6419 | 0 | 68948 | 90293 | 19105 | 0 | 120956 | 717639 | 0 | 667774 | 807949 |
253 | 5 | dm-5 | 2779789 | 0 | 507214559 | 36366385 | 25248746 | 0 | 464602835 | 704195339 | 0 | 347508715 | 740899295 |
253 | 6 | dm-6 | 5251510 | 0 | 523996485 | 71587841 | 7380194 | 0 | 106399514 | 194806376 | 0 | 118078310 | 266540312 |
253 | 7 | dm-7 | 1772 | 0 | 41329 | 34931 | 12184 | 0 | 218874 | 1010468 | 0 | 818229 | 1045418 |
253 | 8 | dm-8 | 6203721 | 0 | 221744397 | 82963780 | 23626490 | 0 | 375040396 | 2117003466 | 0 | 80501448 | 2203736434 |
253 | 9 | dm-9 | 1913762 | 0 | 280471928 | 27737018 | 3503920 | 0 | 160325095 | 124124824 | 0 | 81257167 | 151876112 |
253 | 10 | dm-10 | 27091739 | 0 | 1347462526 | 415492329 | 1135223 | 0 | 26608603 | 87048745 | 0 | 238219337 | 502736856 |
253 | 11 | dm-11 | 5942 | 0 | 64130 | 100222 | 19105 | 0 | 134204 | 811752 | 0 | 727465 | 912004 |
253 | 12 | dm-12 | 20112 | 0 | 1365873 | 336612 | 9033 | 0 | 131175 | 739788 | 0 | 769232 | 1076503 |
253 | 13 | dm-13 | 1913304 | 0 | 280467138 | 35087780 | 3503914 | 0 | 162938029 | 175455182 | 0 | 91516697 | 210566101 |
7 | 0 | loop0 | 1470 | 0 | 103611 | 18992 | 248 | 0 | 5763 | 32870 | 0 | 18410 | 31578 |
取第一行详细解释
- major number (主设备号) - 252:这是设备的主设备号。
- minor mumber (次设备号) - 0:这是设备的次设备号。
- device name (设备名称) - vda:这是设备的名称,通常是虚拟磁盘。
- reads completed successfully (成功完成的读取次数) - 159493845:这是设备成功完成的读取次数。
- reads merged (合并的读取次数) - 2056576:这是合并的读取操作的次数,即相邻的读取请求被合并的次数。
- sectors read (读取的扇区数) - 5617078371:这是成功读取的扇区总数。
- time spent reading (ms) (读取花费的时间,单位为毫秒) - 1552152184:这是读取操作花费的总时间,单位为毫秒。
- writes completed (成功完成的写入次数) - 65347508:这是设备成功完成的写入次数。
- writes merged (合并的写入次数) - 13783484:这是合并的写入操作的次数。
- sectors written (写入的扇区数) - 1128522539:这是成功写入的扇区总数。
- time spent writing (ms) (写入花费的时间,单位为毫秒) - 2070129280:这是写入操作花费的总时间,单位为毫秒。
- I/Os currently in progress (当前正在进行的I/O操作数) - 0:这是当前正在进行的输入/输出操作的数量。
- time spent doing I/Os (ms) (进行I/O操作花费的时间,单位为毫秒) - 886384887:这是设备进行I/O操作花费的总时间,单位为毫秒。
- weighted time spent doing I/Os (ms) (进行I/O操作的加权时间,单位为毫秒) - 3215786500:这是进行I/O操作的加权时间,考虑了I/O操作的队列长度。
后面4个0作为保留字段,通常未使用