LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   CPU and MEM of a PROCESS (https://www.linuxquestions.org/questions/linux-newbie-8/cpu-and-mem-of-a-process-666274/)

narendra1310 08-29-2008 07:16 AM

CPU and MEM of a PROCESS
 
hi all,

I wrote a script through which i will findout cpu and mem of a process using ps command . But i want to know how to find cpu and mem of a procces which have multiple instances (i.e. if a process get forked in parent process , now we need to find usage of both rather than parent process alone, because if child process comsume some qntity of cpu and not by parent process then we will get erronous results)

so let me know the script or command line to find cpu and mem usage of all instances of a process.

thank you

lugoteehalt 08-29-2008 09:39 AM

Would top do this? top -b often usefull in script.


All times are GMT -5. The time now is 01:29 AM.