Last active
October 6, 2016 21:53
-
-
Save tchellomello/cd2d9600822e91765bbc46f4e5196110 to your computer and use it in GitHub Desktop.
Passenger Monitor Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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