Created
April 26, 2013 15:54
-
-
Save fredngo/5468325 to your computer and use it in GitHub Desktop.
Bash script that outputs the number of threads used by all processes belonging to the 'vagrant' user.
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
while true | |
do | |
# Command line inspired from http://askubuntu.com/a/88983 | |
ps -u vagrant -o thcount | tail -n +2 | awk '{ num_threads += $1 } END { print num_threads }' | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment