Hi,
I would like to check:
1. How much total memory is used by all processes
2. How much memory we have total in the OS
3. How much memory specific Oracle instance is using
So I will be able to calculate:
A. percentage (usage) of Oracle instance
B. percentage (usage) of all system processes
All the calculation should be done from the OS only (not SQL)
Remember: Oracle is using also shared memory and huge pages.
Testing if we got the right formula:
I. Oracle instance usage < Total usage
II. Summary of all Oracle instances usage <= Total usage
For questions 1 and 2, I am using the command free
For question 3
I tried to use the command ps to summarize the memory (tried them all rss,vsz ...)
Then I realized we have shared memory, so I need to use unique memory addresses, used the command map (https://gist.github.com/lucaslellis/7506394 )
and then I found the great utility smem .
On Centos, the numbers work fine.

On Oracle Linux, I got Oracle instance usage > Total usage (and above 100%)

I assume something on this host is configured differently (maybe oracle massed with the kernel different than other distributions)
Any idea what is the reason?
Any other way to calculate it?