Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 0 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.