How to calculate cpu and memory usage of a process
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.
Forking will generate a new pid - simple enough to track similarly to what you have already done.
"ps" allows many options in how to request output - by UID, euid, command ... see the manpage.
|All times are GMT -5. The time now is 11:00 PM.|