mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-21 08:22:59 +02:00
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 <arne_f@ipfire.org>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user