Skip to content

Instantly share code, notes, and snippets.

@jamesbjackson
Created August 13, 2020 09:12
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 jamesbjackson/c4f69dc066129fffcfbf6595be919d79 to your computer and use it in GitHub Desktop.
Save jamesbjackson/c4f69dc066129fffcfbf6595be919d79 to your computer and use it in GitHub Desktop.
# Find out what process is using all the RAM?
ps -e -o pid,vsz,comm= | sort -n -k 2
# clear page cache only without interrupting any processes or services. (Run as Root)
sync; echo 1 > /proc/sys/vm/drop_caches
# clear dentries and inodes only without interrupting any processes or services. (Run as Root)
sync; echo 2 > /proc/sys/vm/drop_caches
# clear page cache, dentries and inodes only without interrupting any processes or services. (Run as Root)
sync; echo 3 > /proc/sys/vm/drop_caches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment