diff options
author | Jeff Lane <jeffrey.lane@canonical.com> | 2019-03-06 14:53:33 -0500 |
---|---|---|
committer | Jeff Lane <jeffrey.lane@canonical.com> | 2019-03-06 14:53:33 -0500 |
commit | 392ac0f8a62180a9c770892e10bd76967f4050cb (patch) | |
tree | 8896df1858f9fe3672f0024003d5876fdb530008 /bin | |
parent | b6bf09c6633c446a25d2ab5173ec711f9f5f1ef6 (diff) |
Modified disk_stats_test to exit with success and a notice if we run on an NVDIMM as NVDIMMs disable iostats by default. LP: #1818898
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/disk_stats_test | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/disk_stats_test b/bin/disk_stats_test index 3c88a6c..60b48f5 100755 --- a/bin/disk_stats_test +++ b/bin/disk_stats_test @@ -26,6 +26,12 @@ if [[ "$1" != '' ]]; then DISK="$1" fi +nvdimm="pmem" +if [ -z "${DISK##*$nvdimm*}" ];then + echo "Disk $DISK appears to be an NVDIMM, skipping" + exit $STATUS +fi + #Check /proc/partitions, exit with fail if disk isn't found grep -w -q $DISK /proc/partitions check_return_code $? "Disk $DISK not found in /proc/partitions" |