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
This commit is contained in:
Samuel Smith 2021-01-07 13:38:11 -06:00 committed by Lars Kruse
parent c10eaf60d2
commit f90427c32a
1 changed files with 2 additions and 2 deletions

View File

@ -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#!#/#;