Gentoo Archives: gentoo-user

From: Tanstaafl <tanstaafl@×××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Filter grep output of 'ps aux'
Date: Fri, 02 Mar 2012 18:14:54
Message-Id: 4F510D74.3080601@libertytrek.org
In Reply to: Re: [gentoo-user] Filter grep output of 'ps aux' by Paul Hartman
1 On 2012-03-02 1:02 PM, Paul Hartman <paul.hartman+gentoo@×××××.com> wrote:
2 > On Fri, Mar 2, 2012 at 11:46 AM, Tanstaafl<tanstaafl@×××××××××××.org> wrote:
3 >> > Does anyone know if there is a way to filter the output of ps aux to show
4 >> > only lines that have a value in the %CPU column higher than x - ie, 1.0, or
5 >> > 2.0, or something like that?
6 > ps aux | gawk '{ if ( $3> 1.0 ) { print } }'
7
8 Thanks Paul! Thats a huge help...
9
10 Now if I could just get a constantly updated output of this (like
11 tailing a live log), I'd be in heaven... ;)
12
13 But if this is the best I can do, it is 1000 times better...

Replies

Subject Author
Re: [gentoo-user] Filter grep output of 'ps aux' Alan McKinnon <alan.mckinnon@×××××.com>