Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
The first line of iostat(8) displays the stats from the time of the
last reboot.  Show the current stats instead by grabbing and displaying
the second line.

From mglocker@
  • Loading branch information
dajohi authored and LordReg committed Jan 25, 2021
1 parent ccd9036 commit e3848d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion baraction.sh
Expand Up @@ -84,7 +84,7 @@ print_bat() {
APM_DATA=""
I=0
while :; do
IOSTAT_DATA=`/usr/sbin/iostat -C | grep '[0-9]$'`
IOSTAT_DATA=`/usr/sbin/iostat -C -c 2 | tail -n 1 | grep '[0-9]$'`
if [ $I -eq 0 ]; then
APM_DATA=`/usr/sbin/apm -alb`
fi
Expand Down

0 comments on commit e3848d6

Please sign in to comment.