Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: vmstat output to db
> 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
-- 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
![]() |
![]() |