Skip to content

Instantly share code, notes, and snippets.

@tchellomello
Last active October 6, 2016 21:53
Show Gist options
  • Save tchellomello/cd2d9600822e91765bbc46f4e5196110 to your computer and use it in GitHub Desktop.
Save tchellomello/cd2d9600822e91765bbc46f4e5196110 to your computer and use it in GitHub Desktop.
Passenger Monitor Script
#!/bin/bash
export PATH="/bin:/sbin:/usr/bin:/usr/sbin"
TIMESTAMP=$(date +%Y_%m_%d-%H_%M_%S)
LOGFILE="/var/log/passenger_stats.log"
echo "--------START $TIMESTAMP---------------" >> $LOGFILE
echo "" >> $LOGFILE
passenger-status --show=requests >> $LOGFILE
passenger-status >> $LOGFILE
passenger-memory-stats >> $LOGFILE
free -m >> $LOGFILE
cat /proc/sys/fs/aio-nr >> $LOGFILE
uptime >> $LOGFILE
echo "--------END $TIMESTAMP-------------" >> $LOGFILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment