I want to obtain information about memory used by different users and different processes which users are running and statistics about those processes like memory consumption ,execution speed etc using Linux system calls. I don't want to use commands like free,top etc.Can any one suggest how to do so?
|
It's important to understand how memory is used. A significant portion of memory is often shared. Any code used in a program and it's libraries are shared between different processes. Code is mapped into memory as read-only and is shared by all processes so it not owned by any one user. Certain libraries like To answer your question, nearly all the information that programs like top, free, and ps get comes from scanning the |
|||
|
|

/procfilesystem is the typical source of this kind of information. – Andy Apr 19 '11 at 3:52