Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bash command to list top 10 processes using the most ram:
- ps -eo rss,comm | sort -nrk 1 | head -n 10 | awk '{ printf "%s %0.2fGiB\n",$2,$1/1024/1024 }'
- bash command to list top 10 processes using the most swap:
- for file in /proc/*/status; do
- if [[ `cat $file` =~ Name:[[:space:]]*(.*)[[:space:]].*VmSwap:[[:space:]]*([[:digit:]]*).*kB[[:space:]].* ]]; then
- echo "${BASH_REMATCH[2]} ${BASH_REMATCH[1]}";
- fi;
- done | sort -nrk 1 | head -n 10 | awk '{ printf "%s %0.2fGiB\n",$2,$1/1024/1024 }'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement