From: Arne Fitzenreiter Date: Wed, 14 Jul 2021 06:12:16 +0000 (+0200) Subject: makegraphs: fix status collection for hddshutdown X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=023f43ff404d133717afe403c3085567450c8445;p=people%2Fms%2Fipfire-2.x.git makegraphs: fix status collection for hddshutdown with kernel 5.10.x also the reading of s.m.a.r.t. data to update the temperatur graphs is countet as disk read so update the stored value after reading. Signed-off-by: Arne Fitzenreiter --- diff --git a/src/scripts/makegraphs b/src/scripts/makegraphs index f8f6f70a9f..5bfb05d2af 100644 --- a/src/scripts/makegraphs +++ b/src/scripts/makegraphs @@ -137,4 +137,13 @@ foreach (@disks){ close(DATEI); updatehdddata($disk); + + if ( $diskstats eq $newdiskstats ) { + # update diskstat because read temp change the status + my $newdiskstats = `/usr/bin/iostat -d -t $disk | tail -2 | head -1 | awk '{ print \$5","\$6}'`; + chomp $newdiskstats; + open(DATEI, ">/var/run/hddstats-$array[$#array]") || die "Datei nicht gefunden"; + print DATEI $newdiskstats; + close(DATEI); + } }