Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # log-iowait.sh
- # a script to log the I/O load,
- # and store the output as CSV format, which can be opened directly in Excel
- # Great for troubleshooting I/O related problems
- # set this to run every minute in cron
- logfile=/tmp/log-iowait.csv
- # show timestamp + I/O wait statistic
- # -d 1 3 = delay 1 second, run 3 times (first run are usually spiked)
- 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