[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAJekb-numAaR_k7QB3JUGdC+fBMoo8QEUks1PbwFC_7QFSNXxA@mail.gmail.com>
Date: Fri, 29 Jan 2016 00:18:36 +0800
From: "Tao, Liu" <liutao5658@...il.com>
To: linux-kernel@...r.kernel.org
Subject: How to get system available memory and some process memory usage
through system call or API
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
Powered by blists - more mailing lists