I want to sort ps output by process CPU time ("TIME" column). I've tried:
ps -aux --sort cputime | tail
but it doesn't sort by cpu time.
I'm running with:
ps --version procps version 3.2.7
and kernel: 2.6.18
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
I think that is not cputime but time that u want :)
ps -aux --sort -time
Just post after
--sort the exact name of the column that you want.
ps -aux --sort +time | tail
+- for selecting order
This sorts by CPU:
ps aux --sort -pcpu
This is how it's done!