From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1S3ZSl-0004t9-FJ for garchives@archives.gentoo.org; Fri, 02 Mar 2012 20:52:27 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DD71EE0958; Fri, 2 Mar 2012 20:52:03 +0000 (UTC) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 93317E08D0 for ; Fri, 2 Mar 2012 20:50:51 +0000 (UTC) Received: by wico1 with SMTP id o1so379491wic.40 for ; Fri, 02 Mar 2012 12:50:50 -0800 (PST) Received-SPF: pass (google.com: domain of paul.hartman@gmail.com designates 10.180.92.71 as permitted sender) client-ip=10.180.92.71; Authentication-Results: mr.google.com; spf=pass (google.com: domain of paul.hartman@gmail.com designates 10.180.92.71 as permitted sender) smtp.mail=paul.hartman@gmail.com; dkim=pass header.i=paul.hartman@gmail.com Received: from mr.google.com ([10.180.92.71]) by 10.180.92.71 with SMTP id ck7mr10470171wib.3.1330721450836 (num_hops = 1); Fri, 02 Mar 2012 12:50:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=ckwjbDCN/Keh0/kdzMcdjFOS72kEZ/tjCk3ciSQtBmM=; b=ozIuyjEBRvKnoAK1MnK7ciSlwhGzlxbczQEHNMzCbKhChRqki9pG5g5JmjO8mqAVEr JBWKtNChjYDOqQo1Weo3NBLGpzXUKboDflSv8gOclhHRi6GzCtWBGNymO7+H80YqDRuV ZsYS7jSG/tF+TC1P7dfs1WazX6X/QA16phoQdsIwoO0WvmMgbpr4mdKL/sEWE6aVmKO+ +keh1HQc6SCiw8sMIkjxJ8CAhhyD2o+oErO7DY+R/zwu9BSyByxL/FEKy4BYIkyVocLC slCA3GZuLj8Da9dEGDiDU0W/2mCN/9DNn4nI5gModjzXk0M6zIeUXRqRaENjTYmaFqHA 7bGw== Received: by 10.180.92.71 with SMTP id ck7mr8410424wib.3.1330721450719; Fri, 02 Mar 2012 12:50:50 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Sender: paul.hartman@gmail.com Received: by 10.227.130.194 with HTTP; Fri, 2 Mar 2012 12:50:30 -0800 (PST) In-Reply-To: <4F513019.9030601@libertytrek.org> References: <4F51076A.9020403@libertytrek.org> <4F510B8B.80907@libertytrek.org> <20120302181243.GO11986@titan.lakedaemon.net> <4F51122B.7050506@libertytrek.org> <4F513019.9030601@libertytrek.org> From: Paul Hartman Date: Fri, 2 Mar 2012 14:50:30 -0600 X-Google-Sender-Auth: qrS8A2-znJ-mYtVQ_ro9G7Paufk Message-ID: Subject: Re: [gentoo-user] Filter grep output of 'ps aux' To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=ISO-8859-1 X-Archives-Salt: 7143d10c-8e4f-419c-89a7-69c9e46a2533 X-Archives-Hash: 4733bd19ea1e752f8c0d73a33825d365 On Fri, Mar 2, 2012 at 2:39 PM, Tanstaafl wrote: > On 2012-03-02 2:33 PM, Paul Hartman 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'