Last active
November 7, 2018 09:39
-
-
Save rvflash/81ae84262bf57c945930f2931f8dcc28 to your computer and use it in GitHub Desktop.
Returns a top 20 sortered list of used ressources by process
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
#!/usr/bin/env bash | |
# Returns a top 20 sortered list of used ressources by process. | |
for x in `ps -eF| awk '{ print $2 }'` | |
do echo `ls /proc/$x/fd 2> /dev/null | wc -l` $x `cat /proc/$x/cmdline 2> /dev/null` | |
done | sort -n -r | head -n 20 |
Author
rvflash
commented
Nov 7, 2018
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment