Skip to content

Instantly share code, notes, and snippets.

@rec
Created May 5, 2015 17:33
Show Gist options
  • Save rec/e4c475af492638989088 to your computer and use it in GitHub Desktop.
Save rec/e4c475af492638989088 to your computer and use it in GitHub Desktop.
quick and dirty rippled memory monitor
#!/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