Last active
September 19, 2019 01:36
-
-
Save jemyzhang/102bee0cad0e0ac47477cb7d5e55ff46 to your computer and use it in GitHub Desktop.
[Get Argument List From cmdline of proc info] Get the argetment list from the cmdline of proc #proc
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
pid=$(pidof $PROCNAME) | |
cat /proc/$pid/cmdline | xargs -0 echo |
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
who | awk '{print $1}' | sort | uniq | while read p; do echo "$p: $(eval "ps aux | awk '{print $1}' | grep $p | wc -l")" ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment