Can we get free ram from /proc/stat ?

Latest response

ENVIRONMENT
RHEL = 5.9

QUERY
Can we get free ram information from /proc/stat ?

Responses

Is free command not giving this data?. Do you got any specific reason why you are looking at this data in /proc/stat output? ...

/proc/stat is a collection of kernel timing statistics, it is described in Documentation/filesystems/proc.txt in the kernel-doc package.

Memory information is in /proc/meminfo

Actually one of my client is using RHEL 5.9 OS. And on that OS a VERITAS Cluster is installed. VERITAS Cluster has a functionality in which it logs memory usage information (this log benefit in case if we need to check history of heavily loaded system ). And this information gets from /proc/stat. The memory information it is logging in the logs is differs with free -m result. I convey this differ point with Support Forum. In response they said that the mem log information is being getting from /proc/stat. Below post thread is for reference.

https://vox.veritas.com/t5/Cluster-Server/System-heavily-Loaded/m-p/815692#U815692

The linked article http://www.veritas.com/docs/000036679 describes that HostMonitor gets its CPU usage information from /proc/stat on Linux. That makes sense because /proc/stat file contains CPU usage information.

Memory usage must be calculated from elsewhere. The free tool from the procps package reads /proc/meminfo to determine memory usage information.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.