From f90427c32a9d84a256d4b84350e82eb41508e6cc Mon Sep 17 00:00:00 2001 From: Samuel Smith Date: Thu, 7 Jan 2021 13:38:11 -0600 Subject: [PATCH] Update for extra fields in newer kernels The fields have changed from 11 or 15 on recent kernels but does not effect what the plugin gathers. See 5.4 https://www.kernel.org/doc/html/v5.4/block/stat.html versus 4.16 https://mjmwired.net/kernel/Documentation/block/stat.txt --- plugins/disk/linux_diskstat_ | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/disk/linux_diskstat_ b/plugins/disk/linux_diskstat_ index 9a6131b3..0c69e74f 100755 --- a/plugins/disk/linux_diskstat_ +++ b/plugins/disk/linux_diskstat_ @@ -490,8 +490,8 @@ sub read_sysfs { my @elems = split /\s+/, $line; - croak "'$stats_file' doesn't contain exactly 11 values. Aborting" - if ( @elems != 11 ); + croak "'$stats_file' doesn't contain exactly 11 or 15 values. Aborting" + if ( @elems != 11 && @elems != 15 ); # Translate the devicename back before storing the information $cur_device =~ tr#!#/#;