My Oracle Support Banner

Oracle Linux: Swap Space Used by All Processes Des not Match Used Swap in Free Command Output (Doc ID 2928973.1)

Last updated on FEBRUARY 18, 2023

Applies to:

Linux OS - Version Oracle Linux 6.0 and later
Linux x86-64


By following "Oracle Linux: How to Check Swap and Memory Usage Live via the 'top' Command on Oracle Linux 5, 6, 7, and 8 (Doc ID 2422888.1)" , it is easy to iterate "SWAP" column for all process and get a sum of swap space used by all processes (Another way is to sum up  "Swap"  in all /proc/[pid]/smaps files).

However sometimes the calculated sum and the "Used Swap" in free (or top) command output have a huge difference.




To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.