1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
#!/bin/bash # # Watch the EC2 instances so we can see where the money goes # # Terribly ugly hack. Add this as a cronjob that runs once a half # hour. Spits the results of ec2din into a timestamped file under # $HOME/var. # # Pull in the local configuration . ~/.private/ec2slave.rc dir=$HOME/var/log/ec2watch month=$(date +%Y-%m) now=$(date +%F-%H-%M) mkdir -p $dir/$month ec2din --show-empty-fields | gzip > $dir/$month/$now.txt.gz |