Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

How can i sort active processes by total process time in unix?

share|improve this question

I would do something like:

ps -A -o cmd,etime --sort etime

If by 'process time' you mean elapsed wall clock time of the process. Other time options are:

   j     cutime       cumulative user time
   J     cstime       cumulative system time
   k     utime        user time
share|improve this answer

If I understand you well, you can run top and press T.

share|improve this answer

You should be able to use ps Ok (O - order, k - user time), and apply selection and formatting options as needed.

share|improve this answer
See @Kyle Brandts answer, it's better and more comprehensive. – Kjetil Joergensen Mar 2 '10 at 15:37

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.