Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Unix script to monitor iostat on AIX 4.3.3
See below ...
[ snip ]
>
> The complete script is as follows:
> #!/bin/ksh
>
> while true
> do
> iostat 300 1|sed 1,3d | awk '{ printf("%s ,%s ,%s\n", $1, $5, $6)
> }' |\
> while read HDISK VMSTAT_IO_R VMSTAT_IO_W
> do
> if (echo $HDISK|grep -cq hdisk );then
> $ORACLE_HOME/bin/sqlplus /nolog \<<EOF
Loose the '\' and add a space before 'EOF'
> spool /tmp/iostat.log
> connect perfstat/perfstat_at_cvet
> insert into stats\$iostat values
> (SYSDATE, 5, '$HDISK', $VMSTAT_IO_R,$VMSTAT_IO_W);
> spool off
> EXIT
> EOF
'EOF' must not be indented.
> fi
> done
> sleep 300
> done
>
[ snip ]
-- Ron Reidy Oracle DBAReceived on Wed Apr 02 2003 - 07:15:27 CST
![]() |
![]() |