Created
January 7, 2017 16:01
-
-
Save vinbarnes/216a29631c26fae381c057f9b2ca3231 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# to run: | |
# $ nohup mem_collector.sh & | |
while : | |
do | |
pids=( $(ps auxwww |egrep 'ruby|bundle' | awk '{print $2}') ) | |
echo $(date) >> ruby_usage.log | |
ps -o pid,pcpu,pmem,rss,args ${pids[@]/#/-p } >> ruby_usage.log | |
sleep 300 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment