[CentOS] Finding memory usage

Bowie Bailey Bowie_Bailey at BUC.com
Fri Jul 27 16:38:56 UTC 2018


On 7/27/2018 12:13 PM, Gordon Messmer wrote:
> On 07/27/2018 08:10 AM, Bowie Bailey wrote:
>> The problem is that I can't find 2.4G of usage.
>
>
> Are your results from "top" similar to:
>
>   ps axu | sort -nr -k +6

That looks the same.

>
> If you don't see 2.4G of use from applications, maybe the kernel is
> using a lot of memory.  Check /proc/slabinfo.  You can simplify its
> content to bytes per object type and a total:
>
>   grep -v ^# /proc/slabinfo | awk 'BEGIN {t=0;} {print $1 " " ($3 *
> $4); t=t+($3 * $4)} END {print "total " t/(1024 * 1024) " MB";}' |
> column -t

The total number from that report is about 706M. 

My available memory has now jumped up from 640M to 1.5G after one of the
processes (which was reportedly using about 100M) finished.

I'll have to wait until the problem re-occurs and see what it looks like
then, but for now I used the numbers from "ps axu" to add up a real
total and then added the 706M to it and got within 300M of the memory
currently reported used by free.

What could account for a process actually using much more memory than is
reported by ps or top?

-- 
Bowie



More information about the CentOS mailing list