On Fri, Mar 2, 2012 at 2:39 PM, Tanstaafl <[email protected]> wrote: > On 2012-03-02 2:33 PM, Paul Hartman <[email protected]> wrote: >> >> And you can use the --sort options for ps to sort by cpu or anything >> you like (see the manpage) > > > Even better, thanks Paul... > > watch -n1 "ps aux --sort=-%cpu | gawk '{ if ( \$3 > 1.0 ) { print } }'" > > does exactly what I want... > > Hmmm... is there an easy way to include the column headers?
To build on Grant's suggestion: ps aux --sort %cpu | gawk 'NR==1; $3 > 0'

