Skip to content

Memory & Swap

Who Uses RAM

ps aux  | awk '{print $6/1024 " MB\t\t" $11}'  | sort -n

Who Is Using Swap Memory

grep VmSwap /proc/*/status 2>/dev/null | sort -nk2 | tail -n5

Clear Cache and Swap

echo 3 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a

Last update: September 2, 2021
Back to top