daily pastebin goal
94%
SHARE
TWEET

I/O load logging in CSV / Excel format

sufehmi Mar 8th, 2017 146 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top