Migrated from https://bitbucket.org/saaj/workspace/snippets/XezMBn/bash-alias-for-process-group-rss
Last active
May 10, 2020 09:13
-
-
Save saaj/e32de51cf0dbe7aa540a862832de6487 to your computer and use it in GitHub Desktop.
Bash alias for process group RSS percentage via termsql
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
alias topmem='smemstat -sm | termsql -01 -r 6 -T 3 "SELECT SUM(PSS) as PSS, SUM(RSS) as RSS, Command \ | |
FROM tbl GROUP BY Command ORDER BY SUM(PSS) DESC LIMIT 5" | column -t -s "|"' | |
alias topmemps='ps -x -o rss,%mem,cmd | termsql -m tabs -01 "SELECT SUM(rss) / 1024 as RSS, SUM([%mem]) AS PCT, cmd \ | |
FROM tbl GROUP BY cmd ORDER BY SUM(rss) DESC LIMIT 5"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment