Skip to content

Instantly share code, notes, and snippets.

@fljdin
Created January 11, 2019 16:20
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 fljdin/bcdc64c60a4b3c2ae6a7df054057ce6e to your computer and use it in GitHub Desktop.
Save fljdin/bcdc64c60a4b3c2ae6a7df054057ce6e to your computer and use it in GitHub Desktop.
awk '/Hugepagesize:/{p=$2}/ 0 /{next}/ kB$/{v[sprintf("%9d GB %-s",int($2/1024/1024),$0)]=$0;next}{h[$0]=$2}END{for(k in v) print k;for (k in h) print sprintf("%9d GB %-s",p*h[k]/1024/1024,k)}' /proc/meminfo|sort -nr|grep --color=auto -E "^|.*(Huge.*_[TF]|Mem).*:|"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment