LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to programmatically monitor a process memory usage? (https://www.linuxquestions.org/questions/linux-software-2/how-to-programmatically-monitor-a-process-memory-usage-383516/)

thanhvn 11-15-2005 07:52 PM

how to programmatically monitor a process memory usage?
 
I need to obtain the memory usage (real and virtual) of a particular process every couple of seconds and write it to a log file. I'm thinking of writing either shell script (sh or bash) or a C/C++ program. What shell commands and/or C/C++ API's are available for this task?

Thanks,

jtshaw 11-15-2005 08:44 PM

Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php


All times are GMT -5. The time now is 02:33 AM.