- Modification of iostat line as per input in Bug#12702
Fixes: 12702 Signed-off-by: Adolf Belka adolf.belka@ipfire.org --- src/scripts/hddshutdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/scripts/hddshutdown b/src/scripts/hddshutdown index 146cc7347..ce345e374 100644 --- a/src/scripts/hddshutdown +++ b/src/scripts/hddshutdown @@ -36,7 +36,7 @@ foreach (@devices){ my @array = split(///,$_); $diskstats = `cat /var/run/hddstats-$array[$#array] 2>/dev/null`; chomp $diskstats; - $newdiskstats = `iostat -d -t $_ | tail -2 | head -1 | awk '{ print $5","$6}'`; + $newdiskstats = `iostat -d -t $_ | tail -3 | head -1 | awk '{ print $6","$7}'`; chomp $newdiskstats; $status = `hdparm -C /dev/$_ | tail -1 | cut -d: -f2`; chomp $status;
- Modification of iostat line as per input in Bug#12702
Fixes: 12702 Signed-off-by: Adolf Belka adolf.belka@ipfire.org --- src/scripts/makegraphs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/scripts/makegraphs b/src/scripts/makegraphs index 5bfb05d2a..cbfc83c77 100644 --- a/src/scripts/makegraphs +++ b/src/scripts/makegraphs @@ -120,7 +120,7 @@ foreach (@disks){
$diskstats = `cat /var/run/hddstats-$array[$#array] 2>/dev/null`; chomp $diskstats; - my $newdiskstats = `/usr/bin/iostat -d -t $disk | tail -2 | head -1 | awk '{ print $5","$6}'`; + my $newdiskstats = `/usr/bin/iostat -d -t $disk | tail -3 | head -1 | awk '{ print $6","$7}'`; chomp $newdiskstats; my $status = `hdparm -C /dev/$disk | tail -1 | cut -d: -f2`; chomp $status; @@ -140,7 +140,7 @@ foreach (@disks){
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}'`; + my $newdiskstats = `/usr/bin/iostat -d -t $disk | tail -3 | head -1 | awk '{ print $6","$7}'`; chomp $newdiskstats; open(DATEI, ">/var/run/hddstats-$array[$#array]") || die "Datei nicht gefunden"; print DATEI $newdiskstats;