Messages in this thread | | | Date | Fri, 29 Jan 2016 00:18:36 +0800 | Subject | How to get system available memory and some process memory usage through system call or API | From | "Tao, Liu" <> |
| |
Hi I want to get system available memory and memory usage of one precess(known Pid). Now I read /proc/meminfo and /proc/$pid/stat to get above data. And my question is: 1 Is there system call or API to get above data? 2 Linux kernel add "MemAvailable" to "/proc/meminfo" in 3.14, but I use kernel 3.10. Can I calculate "MemAvailable" through data read from /proc/meminfo in kernel 3.10? How?
-- Best Wishes,
Tao, Liu
| |