Skip to content

Instantly share code, notes, and snippets.

@hostmaster
Created April 2, 2013 10:57
Show Gist options
  • Save hostmaster/5291431 to your computer and use it in GitHub Desktop.
Save hostmaster/5291431 to your computer and use it in GitHub Desktop.
format iostat output
iostat -x 1 | awk 'BEGIN { count=0 } /^sd[a-d]/ { if (count == 0) print "Disk\tawait\tsvctm\t%util"; if (count <= 10) { count++ } else { count=0 }; printf( "%s\t%d\t %d\t%d\n", $1 ,$10 , $11, $12); }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment