mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-23 00:29:59 +02:00
add iostat tests
This commit is contained in:
1
tests/fixtures/centos-7.7/iostat-1.json
vendored
Normal file
1
tests/fixtures/centos-7.7/iostat-1.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"percent_user":0.14,"percent_nice":0.0,"percent_system":0.16,"percent_iowait":0.0,"percent_steal":0.0,"percent_idle":99.7,"type":"cpu"},{"device":"sda","tps":0.24,"kb_read_s":5.24,"kb_wrtn_s":1.1,"kb_read":203305,"kb_wrtn":42533,"type":"device"},{"device":"dm-0","tps":0.25,"kb_read_s":4.39,"kb_wrtn_s":1.04,"kb_read":170325,"kb_wrtn":40464,"type":"device"},{"device":"dm-1","tps":0.0,"kb_read_s":0.06,"kb_wrtn_s":0.0,"kb_read":2204,"kb_wrtn":0,"type":"device"},{"percent_user":0.0,"percent_nice":0.0,"percent_system":0.0,"percent_iowait":0.0,"percent_steal":0.0,"percent_idle":100.0,"type":"cpu"},{"device":"sda","tps":0.0,"kb_read_s":0.0,"kb_wrtn_s":0.0,"kb_read":0,"kb_wrtn":0,"type":"device"},{"device":"dm-0","tps":0.0,"kb_read_s":0.0,"kb_wrtn_s":0.0,"kb_read":0,"kb_wrtn":0,"type":"device"},{"device":"dm-1","tps":0.0,"kb_read_s":0.0,"kb_wrtn_s":0.0,"kb_read":0,"kb_wrtn":0,"type":"device"},{"percent_user":0.0,"percent_nice":0.0,"percent_system":0.0,"percent_iowait":0.0,"percent_steal":0.0,"percent_idle":100.0,"type":"cpu"},{"device":"sda","tps":0.0,"kb_read_s":0.0,"kb_wrtn_s":0.0,"kb_read":0,"kb_wrtn":0,"type":"device"},{"device":"dm-0","tps":0.0,"kb_read_s":0.0,"kb_wrtn_s":0.0,"kb_read":0,"kb_wrtn":0,"type":"device"},{"device":"dm-1","tps":0.0,"kb_read_s":0.0,"kb_wrtn_s":0.0,"kb_read":0,"kb_wrtn":0,"type":"device"}]
|
26
tests/fixtures/centos-7.7/iostat-1.out
vendored
Normal file
26
tests/fixtures/centos-7.7/iostat-1.out
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
Linux 3.10.0-1062.1.2.el7.x86_64 (localhost.localdomain) 11/30/2021 _x86_64_ (1 CPU)
|
||||
|
||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
||||
0.14 0.00 0.16 0.00 0.00 99.70
|
||||
|
||||
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
|
||||
sda 0.24 5.24 1.10 203305 42533
|
||||
dm-0 0.25 4.39 1.04 170325 40464
|
||||
dm-1 0.00 0.06 0.00 2204 0
|
||||
|
||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
||||
0.00 0.00 0.00 0.00 0.00 100.00
|
||||
|
||||
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
|
||||
sda 0.00 0.00 0.00 0 0
|
||||
dm-0 0.00 0.00 0.00 0 0
|
||||
dm-1 0.00 0.00 0.00 0 0
|
||||
|
||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
||||
0.00 0.00 0.00 0.00 0.00 100.00
|
||||
|
||||
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
|
||||
sda 0.00 0.00 0.00 0 0
|
||||
dm-0 0.00 0.00 0.00 0 0
|
||||
dm-1 0.00 0.00 0.00 0 0
|
||||
|
1
tests/fixtures/centos-7.7/iostat-m.json
vendored
Normal file
1
tests/fixtures/centos-7.7/iostat-m.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"percent_user":0.14,"percent_nice":0.0,"percent_system":0.16,"percent_iowait":0.0,"percent_steal":0.0,"percent_idle":99.7,"type":"cpu"},{"device":"sda","tps":0.24,"mb_read_s":0.01,"mb_wrtn_s":0.0,"mb_read":198,"mb_wrtn":41,"type":"device"},{"device":"dm-0","tps":0.25,"mb_read_s":0.0,"mb_wrtn_s":0.0,"mb_read":166,"mb_wrtn":39,"type":"device"},{"device":"dm-1","tps":0.0,"mb_read_s":0.0,"mb_wrtn_s":0.0,"mb_read":2,"mb_wrtn":0,"type":"device"}]
|
10
tests/fixtures/centos-7.7/iostat-m.out
vendored
Normal file
10
tests/fixtures/centos-7.7/iostat-m.out
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
Linux 3.10.0-1062.1.2.el7.x86_64 (localhost.localdomain) 11/30/2021 _x86_64_ (1 CPU)
|
||||
|
||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
||||
0.14 0.00 0.16 0.00 0.00 99.70
|
||||
|
||||
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
|
||||
sda 0.24 0.01 0.00 198 41
|
||||
dm-0 0.25 0.00 0.00 166 39
|
||||
dm-1 0.00 0.00 0.00 2 0
|
||||
|
1
tests/fixtures/centos-7.7/iostat-mx.json
vendored
Normal file
1
tests/fixtures/centos-7.7/iostat-mx.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"percent_user":0.14,"percent_nice":0.0,"percent_system":0.16,"percent_iowait":0.0,"percent_steal":0.0,"percent_idle":99.7,"type":"cpu"},{"device":"sda","rrqm_s":0.0,"wrqm_s":0.02,"r_s":0.13,"w_s":0.11,"rmb_s":0.01,"wmb_s":0.0,"avgrq_sz":52.51,"avgqu_sz":0.0,"await":0.88,"r_await":0.53,"w_await":1.29,"svctm":0.52,"percent_util":0.01,"type":"device"},{"device":"dm-0","rrqm_s":0.0,"wrqm_s":0.0,"r_s":0.12,"w_s":0.13,"rmb_s":0.0,"wmb_s":0.0,"avgrq_sz":44.28,"avgqu_sz":0.0,"await":0.92,"r_await":0.54,"w_await":1.27,"svctm":0.5,"percent_util":0.01,"type":"device"},{"device":"dm-1","rrqm_s":0.0,"wrqm_s":0.0,"r_s":0.0,"w_s":0.0,"rmb_s":0.0,"wmb_s":0.0,"avgrq_sz":50.09,"avgqu_sz":0.0,"await":0.08,"r_await":0.08,"w_await":0.0,"svctm":0.08,"percent_util":0.0,"type":"device"}]
|
9
tests/fixtures/centos-7.7/iostat-mx.out
vendored
Normal file
9
tests/fixtures/centos-7.7/iostat-mx.out
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
Linux 3.10.0-1062.1.2.el7.x86_64 (localhost.localdomain) 11/30/2021 _x86_64_ (1 CPU)
|
||||
|
||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
||||
0.14 0.00 0.16 0.00 0.00 99.70
|
||||
|
||||
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
|
||||
sda 0.00 0.02 0.13 0.11 0.01 0.00 52.51 0.00 0.88 0.53 1.29 0.52 0.01
|
||||
dm-0 0.00 0.00 0.12 0.13 0.00 0.00 44.28 0.00 0.92 0.54 1.27 0.50 0.01
|
||||
dm-1 0.00 0.00 0.00 0.00 0.00 0.00 50.09 0.00 0.08 0.08 0.00 0.08 0.00
|
1
tests/fixtures/centos-7.7/iostat-x.json
vendored
Normal file
1
tests/fixtures/centos-7.7/iostat-x.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"percent_user":0.14,"percent_nice":0.0,"percent_system":0.16,"percent_iowait":0.0,"percent_steal":0.0,"percent_idle":99.7,"type":"cpu"},{"device":"sda","rrqm_s":0.0,"wrqm_s":0.02,"r_s":0.13,"w_s":0.11,"rkb_s":5.27,"wkb_s":1.1,"avgrq_sz":52.53,"avgqu_sz":0.0,"await":0.88,"r_await":0.53,"w_await":1.29,"svctm":0.52,"percent_util":0.01,"type":"device"},{"device":"dm-0","rrqm_s":0.0,"wrqm_s":0.0,"r_s":0.12,"w_s":0.13,"rkb_s":4.41,"wkb_s":1.05,"avgrq_sz":44.3,"avgqu_sz":0.0,"await":0.92,"r_await":0.54,"w_await":1.27,"svctm":0.5,"percent_util":0.01,"type":"device"},{"device":"dm-1","rrqm_s":0.0,"wrqm_s":0.0,"r_s":0.0,"w_s":0.0,"rkb_s":0.06,"wkb_s":0.0,"avgrq_sz":50.09,"avgqu_sz":0.0,"await":0.08,"r_await":0.08,"w_await":0.0,"svctm":0.08,"percent_util":0.0,"type":"device"}]
|
10
tests/fixtures/centos-7.7/iostat-x.out
vendored
Normal file
10
tests/fixtures/centos-7.7/iostat-x.out
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
Linux 3.10.0-1062.1.2.el7.x86_64 (localhost.localdomain) 11/30/2021 _x86_64_ (1 CPU)
|
||||
|
||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
||||
0.14 0.00 0.16 0.00 0.00 99.70
|
||||
|
||||
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
|
||||
sda 0.00 0.02 0.13 0.11 5.27 1.10 52.53 0.00 0.88 0.53 1.29 0.52 0.01
|
||||
dm-0 0.00 0.00 0.12 0.13 4.41 1.05 44.30 0.00 0.92 0.54 1.27 0.50 0.01
|
||||
dm-1 0.00 0.00 0.00 0.00 0.06 0.00 50.09 0.00 0.08 0.08 0.00 0.08 0.00
|
||||
|
1
tests/fixtures/centos-7.7/iostat.json
vendored
Normal file
1
tests/fixtures/centos-7.7/iostat.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"percent_user":0.14,"percent_nice":0.0,"percent_system":0.16,"percent_iowait":0.0,"percent_steal":0.0,"percent_idle":99.7,"type":"cpu"},{"device":"sda","tps":0.24,"kb_read_s":5.28,"kb_wrtn_s":1.1,"kb_read":203305,"kb_wrtn":42368,"type":"device"},{"device":"dm-0","tps":0.25,"kb_read_s":4.42,"kb_wrtn_s":1.05,"kb_read":170325,"kb_wrtn":40299,"type":"device"},{"device":"dm-1","tps":0.0,"kb_read_s":0.06,"kb_wrtn_s":0.0,"kb_read":2204,"kb_wrtn":0,"type":"device"}]
|
9
tests/fixtures/centos-7.7/iostat.out
vendored
Normal file
9
tests/fixtures/centos-7.7/iostat.out
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
Linux 3.10.0-1062.1.2.el7.x86_64 (localhost.localdomain) 11/30/2021 _x86_64_ (1 CPU)
|
||||
|
||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
||||
0.14 0.00 0.16 0.00 0.00 99.70
|
||||
|
||||
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
|
||||
sda 0.24 5.28 1.10 203305 42368
|
||||
dm-0 0.25 4.42 1.05 170325 40299
|
||||
dm-1 0.00 0.06 0.00 2204 0
|
1
tests/fixtures/ubuntu-18.04/iostat-1.json
vendored
Normal file
1
tests/fixtures/ubuntu-18.04/iostat-1.json
vendored
Normal file
File diff suppressed because one or more lines are too long
77
tests/fixtures/ubuntu-18.04/iostat-1.out
vendored
Normal file
77
tests/fixtures/ubuntu-18.04/iostat-1.out
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
Linux 4.15.0-158-generic (kbrazil-ubuntu) 12/01/2021 _x86_64_ (1 CPU)
|
||||
|
||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
||||
11.66 3.51 7.44 1.33 0.00 76.06
|
||||
|
||||
Device tps kB_read/s kB_wrtn/s kB_read kB_wrtn
|
||||
loop0 0.05 0.16 0.00 125 0
|
||||
loop1 11.06 12.71 0.00 10139 0
|
||||
loop2 0.12 1.77 0.00 1413 0
|
||||
loop3 0.07 0.45 0.00 359 0
|
||||
loop4 0.07 1.34 0.00 1067 0
|
||||
loop5 0.13 1.49 0.00 1190 0
|
||||
loop6 0.05 0.16 0.00 125 0
|
||||
loop7 0.08 1.34 0.00 1070 0
|
||||
fd0 0.26 1.01 0.00 806 0
|
||||
sda 82.01 1901.45 3368.25 1517318 2687800
|
||||
scd0 2.89 64.94 0.00 51818 0
|
||||
scd1 2.89 64.44 0.00 51418 0
|
||||
loop8 15.88 17.15 0.00 13683 0
|
||||
loop9 0.08 0.45 0.00 362 0
|
||||
loop10 0.12 0.60 0.00 476 0
|
||||
loop11 0.04 0.14 0.00 108 0
|
||||
loop12 0.06 0.44 0.00 353 0
|
||||
loop13 0.05 0.44 0.00 348 0
|
||||
loop14 0.08 0.46 0.00 366 0
|
||||
loop15 0.08 0.45 0.00 361 0
|
||||
|
||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
||||
1.01 0.00 0.00 0.00 0.00 98.99
|
||||
|
||||
Device tps kB_read/s kB_wrtn/s kB_read kB_wrtn
|
||||
loop0 0.00 0.00 0.00 0 0
|
||||
loop1 0.00 0.00 0.00 0 0
|
||||
loop2 0.00 0.00 0.00 0 0
|
||||
loop3 0.00 0.00 0.00 0 0
|
||||
loop4 0.00 0.00 0.00 0 0
|
||||
loop5 0.00 0.00 0.00 0 0
|
||||
loop6 0.00 0.00 0.00 0 0
|
||||
loop7 0.00 0.00 0.00 0 0
|
||||
fd0 0.00 0.00 0.00 0 0
|
||||
sda 0.00 0.00 0.00 0 0
|
||||
scd0 0.00 0.00 0.00 0 0
|
||||
scd1 0.00 0.00 0.00 0 0
|
||||
loop8 0.00 0.00 0.00 0 0
|
||||
loop9 0.00 0.00 0.00 0 0
|
||||
loop10 0.00 0.00 0.00 0 0
|
||||
loop11 0.00 0.00 0.00 0 0
|
||||
loop12 0.00 0.00 0.00 0 0
|
||||
loop13 0.00 0.00 0.00 0 0
|
||||
loop14 0.00 0.00 0.00 0 0
|
||||
loop15 0.00 0.00 0.00 0 0
|
||||
|
||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
||||
0.00 0.00 1.00 0.00 0.00 99.00
|
||||
|
||||
Device tps kB_read/s kB_wrtn/s kB_read kB_wrtn
|
||||
loop0 0.00 0.00 0.00 0 0
|
||||
loop1 0.00 0.00 0.00 0 0
|
||||
loop2 0.00 0.00 0.00 0 0
|
||||
loop3 0.00 0.00 0.00 0 0
|
||||
loop4 0.00 0.00 0.00 0 0
|
||||
loop5 0.00 0.00 0.00 0 0
|
||||
loop6 0.00 0.00 0.00 0 0
|
||||
loop7 0.00 0.00 0.00 0 0
|
||||
fd0 0.00 0.00 0.00 0 0
|
||||
sda 0.00 0.00 0.00 0 0
|
||||
scd0 0.00 0.00 0.00 0 0
|
||||
scd1 0.00 0.00 0.00 0 0
|
||||
loop8 0.00 0.00 0.00 0 0
|
||||
loop9 0.00 0.00 0.00 0 0
|
||||
loop10 0.00 0.00 0.00 0 0
|
||||
loop11 0.00 0.00 0.00 0 0
|
||||
loop12 0.00 0.00 0.00 0 0
|
||||
loop13 0.00 0.00 0.00 0 0
|
||||
loop14 0.00 0.00 0.00 0 0
|
||||
loop15 0.00 0.00 0.00 0 0
|
||||
|
1
tests/fixtures/ubuntu-18.04/iostat-m.json
vendored
Normal file
1
tests/fixtures/ubuntu-18.04/iostat-m.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"percent_user":13.71,"percent_nice":4.14,"percent_system":8.73,"percent_iowait":1.56,"percent_steal":0.0,"percent_idle":71.86,"type":"cpu"},{"device":"loop0","tps":0.06,"mb_read_s":0.0,"mb_wrtn_s":0.0,"mb_read":0,"mb_wrtn":0,"type":"device"},{"device":"loop1","tps":13.06,"mb_read_s":0.01,"mb_wrtn_s":0.0,"mb_read":9,"mb_wrtn":0,"type":"device"},{"device":"loop2","tps":0.14,"mb_read_s":0.0,"mb_wrtn_s":0.0,"mb_read":1,"mb_wrtn":0,"type":"device"},{"device":"loop3","tps":0.08,"mb_read_s":0.0,"mb_wrtn_s":0.0,"mb_read":0,"mb_wrtn":0,"type":"device"},{"device":"loop4","tps":0.09,"mb_read_s":0.0,"mb_wrtn_s":0.0,"mb_read":1,"mb_wrtn":0,"type":"device"},{"device":"loop5","tps":0.16,"mb_read_s":0.0,"mb_wrtn_s":0.0,"mb_read":1,"mb_wrtn":0,"type":"device"},{"device":"loop6","tps":0.06,"mb_read_s":0.0,"mb_wrtn_s":0.0,"mb_read":0,"mb_wrtn":0,"type":"device"},{"device":"loop7","tps":0.09,"mb_read_s":0.0,"mb_wrtn_s":0.0,"mb_read":1,"mb_wrtn":0,"type":"device"},{"device":"fd0","tps":0.3,"mb_read_s":0.0,"mb_wrtn_s":0.0,"mb_read":0,"mb_wrtn":0,"type":"device"},{"device":"sda","tps":96.73,"mb_read_s":2.19,"mb_wrtn_s":3.88,"mb_read":1481,"mb_wrtn":2624,"type":"device"},{"device":"scd0","tps":3.41,"mb_read_s":0.07,"mb_wrtn_s":0.0,"mb_read":50,"mb_wrtn":0,"type":"device"},{"device":"scd1","tps":3.41,"mb_read_s":0.07,"mb_wrtn_s":0.0,"mb_read":50,"mb_wrtn":0,"type":"device"},{"device":"loop8","tps":18.73,"mb_read_s":0.02,"mb_wrtn_s":0.0,"mb_read":13,"mb_wrtn":0,"type":"device"},{"device":"loop9","tps":0.09,"mb_read_s":0.0,"mb_wrtn_s":0.0,"mb_read":0,"mb_wrtn":0,"type":"device"},{"device":"loop10","tps":0.15,"mb_read_s":0.0,"mb_wrtn_s":0.0,"mb_read":0,"mb_wrtn":0,"type":"device"},{"device":"loop11","tps":0.05,"mb_read_s":0.0,"mb_wrtn_s":0.0,"mb_read":0,"mb_wrtn":0,"type":"device"},{"device":"loop12","tps":0.07,"mb_read_s":0.0,"mb_wrtn_s":0.0,"mb_read":0,"mb_wrtn":0,"type":"device"},{"device":"loop13","tps":0.06,"mb_read_s":0.0,"mb_wrtn_s":0.0,"mb_read":0,"mb_wrtn":0,"type":"device"},{"device":"loop14","tps":0.09,"mb_read_s":0.0,"mb_wrtn_s":0.0,"mb_read":0,"mb_wrtn":0,"type":"device"},{"device":"loop15","tps":0.09,"mb_read_s":0.0,"mb_wrtn_s":0.0,"mb_read":0,"mb_wrtn":0,"type":"device"}]
|
27
tests/fixtures/ubuntu-18.04/iostat-m.out
vendored
Normal file
27
tests/fixtures/ubuntu-18.04/iostat-m.out
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
Linux 4.15.0-158-generic (kbrazil-ubuntu) 12/01/2021 _x86_64_ (1 CPU)
|
||||
|
||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
||||
13.71 4.14 8.73 1.56 0.00 71.86
|
||||
|
||||
Device tps MB_read/s MB_wrtn/s MB_read MB_wrtn
|
||||
loop0 0.06 0.00 0.00 0 0
|
||||
loop1 13.06 0.01 0.00 9 0
|
||||
loop2 0.14 0.00 0.00 1 0
|
||||
loop3 0.08 0.00 0.00 0 0
|
||||
loop4 0.09 0.00 0.00 1 0
|
||||
loop5 0.16 0.00 0.00 1 0
|
||||
loop6 0.06 0.00 0.00 0 0
|
||||
loop7 0.09 0.00 0.00 1 0
|
||||
fd0 0.30 0.00 0.00 0 0
|
||||
sda 96.73 2.19 3.88 1481 2624
|
||||
scd0 3.41 0.07 0.00 50 0
|
||||
scd1 3.41 0.07 0.00 50 0
|
||||
loop8 18.73 0.02 0.00 13 0
|
||||
loop9 0.09 0.00 0.00 0 0
|
||||
loop10 0.15 0.00 0.00 0 0
|
||||
loop11 0.05 0.00 0.00 0 0
|
||||
loop12 0.07 0.00 0.00 0 0
|
||||
loop13 0.06 0.00 0.00 0 0
|
||||
loop14 0.09 0.00 0.00 0 0
|
||||
loop15 0.09 0.00 0.00 0 0
|
||||
|
1
tests/fixtures/ubuntu-18.04/iostat-mx.json
vendored
Normal file
1
tests/fixtures/ubuntu-18.04/iostat-mx.json
vendored
Normal file
File diff suppressed because one or more lines are too long
26
tests/fixtures/ubuntu-18.04/iostat-mx.out
vendored
Normal file
26
tests/fixtures/ubuntu-18.04/iostat-mx.out
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
Linux 4.15.0-158-generic (kbrazil-ubuntu) 12/01/2021 _x86_64_ (1 CPU)
|
||||
|
||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
||||
12.13 3.65 7.74 1.38 0.00 75.10
|
||||
|
||||
Device r/s w/s rMB/s wMB/s rrqm/s wrqm/s %rrqm %wrqm r_await w_await aqu-sz rareq-sz wareq-sz svctm %util
|
||||
loop0 0.05 0.00 0.00 0.00 0.00 0.00 0.00 0.00 16.90 0.00 0.00 3.14 0.00 0.00 0.00
|
||||
loop1 11.52 0.00 0.01 0.00 0.00 0.00 0.00 0.00 0.12 0.00 0.00 1.15 0.00 0.00 0.00
|
||||
loop2 0.13 0.00 0.00 0.00 0.00 0.00 0.00 0.00 6.97 0.00 0.00 14.57 0.00 0.12 0.00
|
||||
loop3 0.07 0.00 0.00 0.00 0.00 0.00 0.00 0.00 11.04 0.00 0.00 6.65 0.00 0.22 0.00
|
||||
loop4 0.08 0.00 0.00 0.00 0.00 0.00 0.00 0.00 13.83 0.00 0.00 18.08 0.00 2.24 0.02
|
||||
loop5 0.14 0.00 0.00 0.00 0.00 0.00 0.00 0.00 3.14 0.00 0.00 11.12 0.00 0.00 0.00
|
||||
loop6 0.05 0.00 0.00 0.00 0.00 0.00 0.00 0.00 3.00 0.00 0.00 3.14 0.00 0.00 0.00
|
||||
loop7 0.08 0.00 0.00 0.00 0.00 0.00 0.00 0.00 3.61 0.00 0.00 17.54 0.00 0.07 0.00
|
||||
fd0 0.27 0.00 0.00 0.00 0.00 0.00 0.00 0.00 4.43 0.00 0.00 3.92 0.00 4.43 0.12
|
||||
sda 40.74 44.66 1.93 3.43 3.50 96.04 7.90 68.26 1.65 3.00 0.20 48.60 78.55 0.55 4.66
|
||||
scd0 3.01 0.00 0.07 0.00 0.00 0.00 0.00 0.00 0.30 0.00 0.00 22.48 0.00 0.29 0.09
|
||||
scd1 3.01 0.00 0.07 0.00 0.00 0.00 0.00 0.00 0.27 0.00 0.00 22.31 0.00 0.27 0.08
|
||||
loop8 16.54 0.00 0.02 0.00 0.00 0.00 0.00 0.00 0.83 0.00 0.01 1.08 0.00 0.04 0.06
|
||||
loop9 0.08 0.00 0.00 0.00 0.00 0.00 0.00 0.00 6.67 0.00 0.00 6.03 0.00 0.60 0.00
|
||||
loop10 0.13 0.00 0.00 0.00 0.00 0.00 0.00 0.00 2.51 0.00 0.00 4.81 0.00 0.04 0.00
|
||||
loop11 0.04 0.00 0.00 0.00 0.00 0.00 0.00 0.00 6.67 0.00 0.00 3.27 0.00 0.00 0.00
|
||||
loop12 0.06 0.00 0.00 0.00 0.00 0.00 0.00 0.00 4.25 0.00 0.00 7.36 0.00 0.42 0.00
|
||||
loop13 0.06 0.00 0.00 0.00 0.00 0.00 0.00 0.00 5.02 0.00 0.00 8.10 0.00 0.09 0.00
|
||||
loop14 0.08 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 6.00 0.00 0.00 0.00
|
||||
loop15 0.08 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.06 0.00 0.00 5.82 0.00 0.00 0.00
|
1
tests/fixtures/ubuntu-18.04/iostat-x.json
vendored
Normal file
1
tests/fixtures/ubuntu-18.04/iostat-x.json
vendored
Normal file
File diff suppressed because one or more lines are too long
26
tests/fixtures/ubuntu-18.04/iostat-x.out
vendored
Normal file
26
tests/fixtures/ubuntu-18.04/iostat-x.out
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
Linux 4.15.0-158-generic (kbrazil-ubuntu) 12/01/2021 _x86_64_ (1 CPU)
|
||||
|
||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
||||
39.64 12.36 28.21 2.28 0.00 17.51
|
||||
|
||||
Device r/s w/s rkB/s wkB/s rrqm/s wrqm/s %rrqm %wrqm r_await w_await aqu-sz rareq-sz wareq-sz svctm %util
|
||||
loop0 0.24 0.00 0.79 0.00 0.00 0.00 0.00 0.00 20.12 0.00 0.00 3.27 0.00 0.00 0.00
|
||||
loop1 63.02 0.00 72.52 0.00 0.00 0.00 0.00 0.00 0.12 0.00 0.00 1.15 0.00 0.00 0.01
|
||||
loop2 0.66 0.00 10.20 0.00 0.00 0.00 0.00 0.00 7.42 0.00 0.00 15.51 0.00 0.13 0.01
|
||||
loop3 0.34 0.00 2.49 0.00 0.00 0.00 0.00 0.00 12.87 0.00 0.00 7.41 0.00 0.26 0.01
|
||||
loop4 0.43 0.00 7.80 0.00 0.00 0.00 0.00 0.00 13.83 0.00 0.00 18.08 0.00 2.24 0.10
|
||||
loop5 0.72 0.00 8.56 0.00 0.00 0.00 0.00 0.00 3.39 0.00 0.00 11.84 0.00 0.00 0.00
|
||||
loop6 0.24 0.00 0.79 0.00 0.00 0.00 0.00 0.00 3.64 0.00 0.00 3.27 0.00 0.00 0.00
|
||||
loop7 0.39 0.00 7.69 0.00 0.00 0.00 0.00 0.00 4.08 0.00 0.00 19.85 0.00 0.08 0.00
|
||||
fd0 1.21 0.00 4.82 0.00 0.00 0.00 0.00 0.00 2.59 0.00 0.00 4.00 0.00 2.59 0.31
|
||||
sda 127.92 67.15 8595.16 12457.33 15.79 142.95 10.99 68.04 2.57 6.93 0.79 67.19 185.52 0.78 15.14
|
||||
scd0 14.11 0.00 317.88 0.00 0.00 0.00 0.00 0.00 0.34 0.00 0.00 22.52 0.00 0.34 0.47
|
||||
scd1 14.11 0.00 315.43 0.00 0.00 0.00 0.00 0.00 0.31 0.00 0.00 22.35 0.00 0.31 0.43
|
||||
loop8 92.50 0.00 99.83 0.00 0.00 0.00 0.00 0.00 0.83 0.00 0.07 1.08 0.00 0.04 0.36
|
||||
loop9 0.38 0.00 2.51 0.00 0.00 0.00 0.00 0.00 7.54 0.00 0.00 6.62 0.00 0.69 0.03
|
||||
loop10 0.67 0.00 3.35 0.00 0.00 0.00 0.00 0.00 2.61 0.00 0.00 4.99 0.00 0.04 0.00
|
||||
loop11 0.24 0.00 0.79 0.00 0.00 0.00 0.00 0.00 6.67 0.00 0.00 3.27 0.00 0.00 0.00
|
||||
loop12 0.30 0.00 2.45 0.00 0.00 0.00 0.00 0.00 4.98 0.00 0.00 8.20 0.00 0.49 0.01
|
||||
loop13 0.26 0.00 2.42 0.00 0.00 0.00 0.00 0.00 5.67 0.00 0.00 9.19 0.00 0.11 0.00
|
||||
loop14 0.39 0.00 2.54 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 6.57 0.00 0.00 0.00
|
||||
loop15 0.39 0.00 2.51 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 6.35 0.00 0.00 0.00
|
1
tests/fixtures/ubuntu-18.04/iostat.json
vendored
Normal file
1
tests/fixtures/ubuntu-18.04/iostat.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[{"percent_user":28.59,"percent_nice":11.11,"percent_system":33.13,"percent_iowait":1.52,"percent_steal":0.0,"percent_idle":25.66,"type":"cpu"},{"device":"loop0","tps":0.36,"kb_read_s":1.18,"kb_wrtn_s":0.0,"kb_read":108,"kb_wrtn":0,"type":"device"},{"device":"loop1","tps":94.34,"kb_read_s":108.57,"kb_wrtn_s":0.0,"kb_read":9923,"kb_wrtn":0,"type":"device"},{"device":"loop2","tps":0.98,"kb_read_s":15.27,"kb_wrtn_s":0.0,"kb_read":1396,"kb_wrtn":0,"type":"device"},{"device":"loop3","tps":0.5,"kb_read_s":3.73,"kb_wrtn_s":0.0,"kb_read":341,"kb_wrtn":0,"type":"device"},{"device":"loop4","tps":0.57,"kb_read_s":11.6,"kb_wrtn_s":0.0,"kb_read":1060,"kb_wrtn":0,"type":"device"},{"device":"loop5","tps":0.36,"kb_read_s":1.18,"kb_wrtn_s":0.0,"kb_read":108,"kb_wrtn":0,"type":"device"},{"device":"loop6","tps":0.36,"kb_read_s":1.18,"kb_wrtn_s":0.0,"kb_read":108,"kb_wrtn":0,"type":"device"},{"device":"loop7","tps":0.58,"kb_read_s":11.51,"kb_wrtn_s":0.0,"kb_read":1052,"kb_wrtn":0,"type":"device"},{"device":"fd0","tps":0.97,"kb_read_s":3.89,"kb_wrtn_s":0.0,"kb_read":356,"kb_wrtn":0,"type":"device"},{"device":"sda","tps":179.87,"kb_read_s":7918.74,"kb_wrtn_s":9915.54,"kb_read":723773,"kb_wrtn":906280,"type":"device"},{"device":"scd0","tps":11.58,"kb_read_s":260.7,"kb_wrtn_s":0.0,"kb_read":23828,"kb_wrtn":0,"type":"device"},{"device":"scd1","tps":11.58,"kb_read_s":258.69,"kb_wrtn_s":0.0,"kb_read":23644,"kb_wrtn":0,"type":"device"},{"device":"loop8","tps":138.52,"kb_read_s":149.51,"kb_wrtn_s":0.0,"kb_read":13665,"kb_wrtn":0,"type":"device"},{"device":"loop9","tps":0.57,"kb_read_s":3.76,"kb_wrtn_s":0.0,"kb_read":344,"kb_wrtn":0,"type":"device"},{"device":"loop10","tps":1.01,"kb_read_s":5.02,"kb_wrtn_s":0.0,"kb_read":459,"kb_wrtn":0,"type":"device"},{"device":"loop11","tps":0.36,"kb_read_s":1.18,"kb_wrtn_s":0.0,"kb_read":108,"kb_wrtn":0,"type":"device"},{"device":"loop12","tps":0.45,"kb_read_s":3.68,"kb_wrtn_s":0.0,"kb_read":336,"kb_wrtn":0,"type":"device"},{"device":"loop13","tps":0.39,"kb_read_s":3.62,"kb_wrtn_s":0.0,"kb_read":331,"kb_wrtn":0,"type":"device"},{"device":"loop14","tps":0.58,"kb_read_s":3.81,"kb_wrtn_s":0.0,"kb_read":348,"kb_wrtn":0,"type":"device"},{"device":"loop15","tps":0.59,"kb_read_s":3.75,"kb_wrtn_s":0.0,"kb_read":343,"kb_wrtn":0,"type":"device"}]
|
27
tests/fixtures/ubuntu-18.04/iostat.out
vendored
Normal file
27
tests/fixtures/ubuntu-18.04/iostat.out
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
Linux 4.15.0-158-generic (kbrazil-ubuntu) 12/01/2021 _x86_64_ (1 CPU)
|
||||
|
||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
||||
28.59 11.11 33.13 1.52 0.00 25.66
|
||||
|
||||
Device tps kB_read/s kB_wrtn/s kB_read kB_wrtn
|
||||
loop0 0.36 1.18 0.00 108 0
|
||||
loop1 94.34 108.57 0.00 9923 0
|
||||
loop2 0.98 15.27 0.00 1396 0
|
||||
loop3 0.50 3.73 0.00 341 0
|
||||
loop4 0.57 11.60 0.00 1060 0
|
||||
loop5 0.36 1.18 0.00 108 0
|
||||
loop6 0.36 1.18 0.00 108 0
|
||||
loop7 0.58 11.51 0.00 1052 0
|
||||
fd0 0.97 3.89 0.00 356 0
|
||||
sda 179.87 7918.74 9915.54 723773 906280
|
||||
scd0 11.58 260.70 0.00 23828 0
|
||||
scd1 11.58 258.69 0.00 23644 0
|
||||
loop8 138.52 149.51 0.00 13665 0
|
||||
loop9 0.57 3.76 0.00 344 0
|
||||
loop10 1.01 5.02 0.00 459 0
|
||||
loop11 0.36 1.18 0.00 108 0
|
||||
loop12 0.45 3.68 0.00 336 0
|
||||
loop13 0.39 3.62 0.00 331 0
|
||||
loop14 0.58 3.81 0.00 348 0
|
||||
loop15 0.59 3.75 0.00 343 0
|
||||
|
143
tests/test_iostat.py
Normal file
143
tests/test_iostat.py
Normal file
@ -0,0 +1,143 @@
|
||||
import os
|
||||
import unittest
|
||||
import json
|
||||
import jc.parsers.iostat
|
||||
|
||||
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
class MyTests(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
# input
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/iostat.out'), 'r', encoding='utf-8') as f:
|
||||
self.centos_7_7_iostat = f.read()
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/iostat-m.out'), 'r', encoding='utf-8') as f:
|
||||
self.centos_7_7_iostat_m = f.read()
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/iostat-x.out'), 'r', encoding='utf-8') as f:
|
||||
self.centos_7_7_iostat_x = f.read()
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/iostat-mx.out'), 'r', encoding='utf-8') as f:
|
||||
self.centos_7_7_iostat_mx = f.read()
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/iostat-1.out'), 'r', encoding='utf-8') as f:
|
||||
self.centos_7_7_iostat_1 = f.read()
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/iostat.out'), 'r', encoding='utf-8') as f:
|
||||
self.ubuntu_18_4_iostat = f.read()
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/iostat-m.out'), 'r', encoding='utf-8') as f:
|
||||
self.ubuntu_18_4_iostat_m = f.read()
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/iostat-x.out'), 'r', encoding='utf-8') as f:
|
||||
self.ubuntu_18_4_iostat_x = f.read()
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/iostat-mx.out'), 'r', encoding='utf-8') as f:
|
||||
self.ubuntu_18_4_iostat_mx = f.read()
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/iostat-1.out'), 'r', encoding='utf-8') as f:
|
||||
self.ubuntu_18_4_iostat_1 = f.read()
|
||||
|
||||
|
||||
# output
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/iostat.json'), 'r', encoding='utf-8') as f:
|
||||
self.centos_7_7_iostat_json = json.loads(f.read())
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/iostat-m.json'), 'r', encoding='utf-8') as f:
|
||||
self.centos_7_7_iostat_m_json = json.loads(f.read())
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/iostat-x.json'), 'r', encoding='utf-8') as f:
|
||||
self.centos_7_7_iostat_x_json = json.loads(f.read())
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/iostat-mx.json'), 'r', encoding='utf-8') as f:
|
||||
self.centos_7_7_iostat_mx_json = json.loads(f.read())
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/iostat-1.json'), 'r', encoding='utf-8') as f:
|
||||
self.centos_7_7_iostat_1_json = json.loads(f.read())
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/iostat.json'), 'r', encoding='utf-8') as f:
|
||||
self.ubuntu_18_4_iostat_json = json.loads(f.read())
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/iostat-m.json'), 'r', encoding='utf-8') as f:
|
||||
self.ubuntu_18_4_iostat_m_json = json.loads(f.read())
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/iostat-x.json'), 'r', encoding='utf-8') as f:
|
||||
self.ubuntu_18_4_iostat_x_json = json.loads(f.read())
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/iostat-mx.json'), 'r', encoding='utf-8') as f:
|
||||
self.ubuntu_18_4_iostat_mx_json = json.loads(f.read())
|
||||
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/iostat-1.json'), 'r', encoding='utf-8') as f:
|
||||
self.ubuntu_18_4_iostat_1_json = json.loads(f.read())
|
||||
|
||||
def test_iostat_nodata(self):
|
||||
"""
|
||||
Test 'iostat' with no data
|
||||
"""
|
||||
self.assertEqual(jc.parsers.iostat.parse('', quiet=True), [])
|
||||
|
||||
def test_iostat_centos_7_7(self):
|
||||
"""
|
||||
Test 'iostat' on Centos 7.7
|
||||
"""
|
||||
self.assertEqual(jc.parsers.iostat.parse(self.centos_7_7_iostat, quiet=True), self.centos_7_7_iostat_json)
|
||||
|
||||
def test_iostat_m_centos_7_7(self):
|
||||
"""
|
||||
Test 'iostat -m' on Centos 7.7
|
||||
"""
|
||||
self.assertEqual(jc.parsers.iostat.parse(self.centos_7_7_iostat_m, quiet=True), self.centos_7_7_iostat_m_json)
|
||||
|
||||
def test_iostat_x_centos_7_7(self):
|
||||
"""
|
||||
Test 'iostat -x' on Centos 7.7
|
||||
"""
|
||||
self.assertEqual(jc.parsers.iostat.parse(self.centos_7_7_iostat_x, quiet=True), self.centos_7_7_iostat_x_json)
|
||||
|
||||
def test_iostat_mx_centos_7_7(self):
|
||||
"""
|
||||
Test 'iostat -mx' on Centos 7.7
|
||||
"""
|
||||
self.assertEqual(jc.parsers.iostat.parse(self.centos_7_7_iostat_mx, quiet=True), self.centos_7_7_iostat_mx_json)
|
||||
|
||||
def test_iostat_1_centos_7_7(self):
|
||||
"""
|
||||
Test 'iostat 1 3' on Centos 7.7
|
||||
"""
|
||||
self.assertEqual(jc.parsers.iostat.parse(self.centos_7_7_iostat_1, quiet=True), self.centos_7_7_iostat_1_json)
|
||||
|
||||
def test_iostat_ubuntu_18_4(self):
|
||||
"""
|
||||
Test 'iostat' on Ubuntu 18.4
|
||||
"""
|
||||
self.assertEqual(jc.parsers.iostat.parse(self.ubuntu_18_4_iostat, quiet=True), self.ubuntu_18_4_iostat_json)
|
||||
|
||||
def test_iostat_m_ubuntu_18_4(self):
|
||||
"""
|
||||
Test 'iostat -m' on Ubuntu 18.4
|
||||
"""
|
||||
self.assertEqual(jc.parsers.iostat.parse(self.ubuntu_18_4_iostat_m, quiet=True), self.ubuntu_18_4_iostat_m_json)
|
||||
|
||||
def test_iostat_x_ubuntu_18_4(self):
|
||||
"""
|
||||
Test 'iostat -x' on Ubuntu 18.4
|
||||
"""
|
||||
self.assertEqual(jc.parsers.iostat.parse(self.ubuntu_18_4_iostat_x, quiet=True), self.ubuntu_18_4_iostat_x_json)
|
||||
|
||||
def test_iostat_mx_ubuntu_18_4(self):
|
||||
"""
|
||||
Test 'iostat -mx' on Ubuntu 18.4
|
||||
"""
|
||||
self.assertEqual(jc.parsers.iostat.parse(self.ubuntu_18_4_iostat_mx, quiet=True), self.ubuntu_18_4_iostat_mx_json)
|
||||
|
||||
def test_iostat_1_ubuntu_18_4(self):
|
||||
"""
|
||||
Test 'iostat 1 3' on Ubuntu 18.4
|
||||
"""
|
||||
self.assertEqual(jc.parsers.iostat.parse(self.ubuntu_18_4_iostat_1, quiet=True), self.ubuntu_18_4_iostat_1_json)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
Reference in New Issue
Block a user