Re: [gentoo-user] Filter grep output of 'ps aux'

2012-03-03 Thread Tanstaafl
On 2012-03-02 4:52 PM, Paul Hartman paul.hartman+gen...@gmail.com wrote: On Fri, Mar 2, 2012 at 3:23 PM, Tanstaafltansta...@libertytrek.org wrote: Attempt at incorporating your command into this: watch -n1 ps aux --sort=-%cpu | gawk 'NR==1; $3 0' it gives me a syntax error: Every 1.0s: ps

[gentoo-user] Filter grep output of 'ps aux'

2012-03-02 Thread Tanstaafl
Does anyone know if there is a way to filter the output of ps aux to show only lines that have a value in the %CPU column higher than x - ie, 1.0, or 2.0, or something like that? Thanks

Re: [gentoo-user] Filter grep output of 'ps aux'

2012-03-02 Thread Pandu Poluan
On Mar 3, 2012 12:49 AM, Tanstaafl tansta...@libertytrek.org wrote: Does anyone know if there is a way to filter the output of ps aux to show only lines that have a value in the %CPU column higher than x - ie, 1.0, or 2.0, or something like that? Thanks For that, you need awk instead of

Re: [gentoo-user] Filter grep output of 'ps aux'

2012-03-02 Thread Paul Hartman
On Fri, Mar 2, 2012 at 11:46 AM, Tanstaafl tansta...@libertytrek.org wrote: Does anyone know if there is a way to filter the output of ps aux to show only lines that have a value in the %CPU column higher than x - ie, 1.0, or 2.0, or something like that? ps aux | gawk '{ if ( $3 1.0 ) { print

Re: [gentoo-user] Filter grep output of 'ps aux'

2012-03-02 Thread Tanstaafl
On 2012-03-02 12:56 PM, Pandu Poluan pa...@poluan.info wrote: On Mar 3, 2012 12:49 AM, Tanstaafl tansta...@libertytrek.org mailto:tansta...@libertytrek.org wrote: Does anyone know if there is a way to filter the output of ps aux to show only lines that have a value in the %CPU column higher

Re: [gentoo-user] Filter grep output of 'ps aux'

2012-03-02 Thread Tanstaafl
On 2012-03-02 1:02 PM, Paul Hartman paul.hartman+gen...@gmail.com wrote: On Fri, Mar 2, 2012 at 11:46 AM, Tanstaafltansta...@libertytrek.org wrote: Does anyone know if there is a way to filter the output of ps aux to show only lines that have a value in the %CPU column higher than x - ie,

Re: [gentoo-user] Filter grep output of 'ps aux'

2012-03-02 Thread Jason
On Fri, Mar 02, 2012 at 01:03:55PM -0500, Tanstaafl wrote: Also - would there be a way to get a running output (kind of like tailing a log)? watch -n1 ps aux | gawk '{ if ( \$3 1.0 ) { print } }'

Re: [gentoo-user] Filter grep output of 'ps aux'

2012-03-02 Thread Pandu Poluan
On Mar 3, 2012 1:07 AM, Paul Hartman paul.hartman+gen...@gmail.com wrote: On Fri, Mar 2, 2012 at 11:46 AM, Tanstaafl tansta...@libertytrek.org wrote: Does anyone know if there is a way to filter the output of ps aux to show only lines that have a value in the %CPU column higher than x - ie,

Re: [gentoo-user] Filter grep output of 'ps aux'

2012-03-02 Thread Alan McKinnon
On Fri, 02 Mar 2012 13:12:04 -0500 Tanstaafl tansta...@libertytrek.org wrote: On 2012-03-02 1:02 PM, Paul Hartman paul.hartman+gen...@gmail.com wrote: On Fri, Mar 2, 2012 at 11:46 AM, Tanstaafltansta...@libertytrek.org wrote: Does anyone know if there is a way to filter the output of

Re: [gentoo-user] Filter grep output of 'ps aux'

2012-03-02 Thread Tanstaafl
On 2012-03-02 1:12 PM, Jason gen...@lakedaemon.net wrote: On Fri, Mar 02, 2012 at 01:03:55PM -0500, Tanstaafl wrote: Also - would there be a way to get a running output (kind of like tailing a log)? watch -n1 ps aux | gawk '{ if ( \$3 1.0 ) { print } }' Perfect!!! Thanks so much guys!

Re: [gentoo-user] Filter grep output of 'ps aux'

2012-03-02 Thread Paul Hartman
On Fri, Mar 2, 2012 at 12:24 PM, Pandu Poluan pa...@poluan.info wrote: On Mar 3, 2012 1:07 AM, Paul Hartman paul.hartman+gen...@gmail.com wrote: On Fri, Mar 2, 2012 at 11:46 AM, Tanstaafl tansta...@libertytrek.org wrote: Does anyone know if there is a way to filter the output of ps aux to

Re: [gentoo-user] Filter grep output of 'ps aux'

2012-03-02 Thread Paul Hartman
On Fri, Mar 2, 2012 at 12:32 PM, Tanstaafl tansta...@libertytrek.org wrote: On 2012-03-02 1:12 PM, Jason gen...@lakedaemon.net wrote: On Fri, Mar 02, 2012 at 01:03:55PM -0500, Tanstaafl wrote: Also - would there be a way to get a running output (kind of like tailing a log)? watch -n1 ps

Re: [gentoo-user] Filter grep output of 'ps aux'

2012-03-02 Thread Tanstaafl
On 2012-03-02 2:33 PM, Paul Hartman paul.hartman+gen...@gmail.com 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

Re: [gentoo-user] Filter grep output of 'ps aux'

2012-03-02 Thread Paul Hartman
On Fri, Mar 2, 2012 at 2:39 PM, Tanstaafl tansta...@libertytrek.org wrote: On 2012-03-02 2:33 PM, Paul Hartman paul.hartman+gen...@gmail.com 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

Re: [gentoo-user] Filter grep output of 'ps aux'

2012-03-02 Thread Tanstaafl
On 2012-03-02 3:50 PM, Paul Hartman paul.hartman+gen...@gmail.com wrote: On Fri, Mar 2, 2012 at 2:39 PM, Tanstaafltansta...@libertytrek.org wrote: On 2012-03-02 2:33 PM, Paul Hartmanpaul.hartman+gen...@gmail.com wrote: And you can use the --sort options for ps to sort by cpu or anything you

Re: [gentoo-user] Filter grep output of 'ps aux'

2012-03-02 Thread Paul Hartman
On Fri, Mar 2, 2012 at 3:23 PM, Tanstaafl tansta...@libertytrek.org wrote: On 2012-03-02 3:50 PM, Paul Hartman paul.hartman+gen...@gmail.com wrote: On Fri, Mar 2, 2012 at 2:39 PM, Tanstaafltansta...@libertytrek.org  wrote: On 2012-03-02 2:33 PM, Paul Hartmanpaul.hartman+gen...@gmail.com