Skip to content

Instantly share code, notes, and snippets.

@josephmisiti
Last active January 16, 2018 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josephmisiti/4a57705031d88565b2dc257d470bdc66 to your computer and use it in GitHub Desktop.
Save josephmisiti/4a57705031d88565b2dc257d470bdc66 to your computer and use it in GitHub Desktop.

Setting up tmpreaper

  1. install it
apt-get install tmpreaper
  1. added cron logging
sudo vi /etc/rsyslog.d/50-default.conf

uncomment cron

sudo service rsyslog restart
  1. update /etc/tmpreaper.conf

add TMPREAPER_TIME=1h

  1. restart cron
service cron restart
  1. add path to crontab -e
PATH=/usr/sbin:/usr/bin:/sbin:/bin

*/5 * * * * ~/aws-scripts-mon/mon-put-instance-data.pl --mem-util --disk-space-util --disk-path=/ --from-cron
  1. tail the log file
tail -fn 50 /var/log/cron.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment