mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
hddshutdown: Update script for new iostat output format - Bug#12702
- Modification of iostat line as per input in Bug#12702 Fixes: 12702 Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
committed by
Arne Fitzenreiter
parent
a4d0d0a1e4
commit
74b9fcc65e
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user