Skip to content

Instantly share code, notes, and snippets.

@nielsvanderbeke
Created March 17, 2014 06:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nielsvanderbeke/9594994 to your computer and use it in GitHub Desktop.
Save nielsvanderbeke/9594994 to your computer and use it in GitHub Desktop.
count threads all java processes
ps -eLF | awk '{ { print $1,$13,$14 } }' | grep java | grep -v grep| sort | uniq -c
==== ps ====
-e Select all processes. Identical to
-F extra full format. See the -f option, which -F implies.
-L Show threads, possibly with LWP and NLWP columns
==== uniq ====
-c, --count prefix lines by the number of occurrences
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment