0

Is there a way to find the CPU usage of a process on ubuntu combined with the cpu usage of all the child process. And also would it be possible to get this number as a % of the total CPU usage?

2 Answers 2

0

not knowing a tool doing exactly what you want but you can find out all the child processes of the process and add them together yourself.

pstree is handy to find all the child processes (more visual than just ps), then for each pid

 ps -p $pid -o "pcpu,cpu"

it should be a fairly simple shellscript given a parent pid. probably there already is one.

0

You can use htop.

sudo apt-get install htop

You can hit F5 on htop to show in tree view which will organize things by parenthood.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .