Created
May 5, 2015 17:33
-
-
Save rec/e4c475af492638989088 to your computer and use it in GitHub Desktop.
quick and dirty rippled memory monitor
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/sh | |
# A script to log the cpu and memory usage of rippled. | |
RIPPLED_PID=$1 | |
echo $LOG_FILE | |
while :; do | |
MEMORY=`top -n 1 -b | awk -v rippled=$RIPPLED_PID '($1 == rippled) {print $5 ",\"" $6 "\"," $10}'` | |
TIME=`date +%s` | |
echo "$TIME,$MEMORY" | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment