Advertisement
sufehmi

I/O load logging in CSV / Excel format

Mar 8th, 2017
949
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.47 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # log-iowait.sh
  4.  
  5. # a script to log the I/O load,
  6. # and store the output as CSV format, which can be opened directly in Excel
  7.  
  8. # Great for troubleshooting I/O related problems
  9.  
  10. # set this to run every minute in cron
  11.  
  12. logfile=/tmp/log-iowait.csv
  13.  
  14. # show timestamp + I/O wait statistic
  15. # -d 1 3 = delay 1 second, run 3 times (first run are usually spiked)
  16. echo "\"`date +%H%M`\",\"`iostat -d 1 3 -c | tail -n 6 | head -n 1 | cut -c 35-39`\"" >> $logfile
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement