Conditional test vmstat -p
This commit is contained in:
parent
151e4f21da
commit
b83788993b
@ -31,9 +31,10 @@ expect_pass "$test" "^disk\[ -\]+reads\[ -\]+writes\[ -\]+IO\[ -\]+\\s+total\\s+
|
|||||||
|
|
||||||
# Need a partition
|
# Need a partition
|
||||||
set diskstats [ exec cat /proc/diskstats ]
|
set diskstats [ exec cat /proc/diskstats ]
|
||||||
regexp "\\s+\\d+\\s+\\d+\\s+\(\[a-z\]+\\d+\)\\s+\(\[0-9\]\[0-9\]+\)" $diskstats -> partition
|
if [ regexp "\\s+\\d+\\s+\\d+\\s+\(\[a-z\]+\\d+\)\\s+\[0-9\]\[0-9\]+" $diskstats line partition == 1 ] {
|
||||||
set test "vmstat partition (using $partition)"
|
set test "vmstat partition (using $partition)"
|
||||||
spawn $vmstat -p $partition
|
spawn $vmstat -p $partition
|
||||||
expect_pass "$test" "^${partition}\\s+reads"
|
expect_pass "$test" "^${partition}\\s+reads"
|
||||||
#\\s+read sectors\\s+writes\\s+requested writes"
|
} else {
|
||||||
#\(\\s+\\d+\){4}\\s*$"
|
unsupported "vmstat partition (cannot find partition)"
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user