Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: vmstat output to db

Re: vmstat output to db

From: <Jared.Still_at_radisys.com>
Date: Wed, 28 Jul 2004 15:51:57 -0700
Message-ID: <OFC91E7BD2.CB5EA5DF-ON88256EDF.007D62CF-88256EDF.007D9C3D@radisys.com>


> cat /tmp/msg$$|sed 1,3d | awk '{ printf("%s %s %s %s %s %s %s\n", $1,
$8,
> $9, $12, $20, $21, $22) }' | while read RUNQUE PAGE_IN PAGE_OUT SR

almost forgot.

You don't need 'cat' in that line.

Google for 'useless use of cat'. ;)

Just use awk directly.

awk < file
awk file

Also, the vmstat header lines repeat, so the 'sed' command will only remove the first instance of them.

Jared



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Wed Jul 28 2004 - 17:48:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US