Skip to content

Commit

Permalink
Fixing iostat for newer version of sar
Browse files Browse the repository at this point in the history
  • Loading branch information
agruza authored Nov 9, 2018
1 parent aedcaf2 commit d2857d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PAT-collecting-data/WORKER_scripts/instruments/iostat
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ CMD=$3

function run()
{
/usr/bin/iostat -x -k -d $SAMPLING_INTERVAL | awk -v host=$(hostname) '(!/^$/){now=strftime("%s ");if(/Device:/){print "HostName","TimeStamp", $0} else{ if($0 && !/Linux/) print host, now $0}}; fflush()' > $OUTDIR/iostat &
/usr/bin/iostat -x -k -d $SAMPLING_INTERVAL | awk -v host=$(hostname) '(!/^$/){now=strftime("%s ");if(/Device/){if($1 == "Device"){gsub("Device", "Device:");}{print "HostName","TimeStamp", $0} else{ if($0 && !/Linux/) print host, now $0}}; fflush()' > $OUTDIR/iostat &
}

case $CMD in
"run") run ;;
"post-process") ;;
esac
esac

0 comments on commit d2857d7

Please sign in to comment.