Skip to content

Instantly share code, notes, and snippets.

@drsnyder
Created November 23, 2011 18:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drsnyder/1389516 to your computer and use it in GitHub Desktop.
Save drsnyder/1389516 to your computer and use it in GitHub Desktop.
Bash script to start 2 hour sar monitoring at 30s intervals.
#!/bin/bash
interval=30
cycles=$((60/$interval*60*2))
date=`date -I`
sar -A -o sar.$date $interval $cycles >/dev/null 2>&1 &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment