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
Hi Ron,
Thanks a lot, removing the indentation at the EOF did the trick.
Regards,
Niels Zegveld
Ron Reidy <rereidy_at_indra.com> wrote in message news:<3E8AE26F.3080601_at_indra.com>...
> 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 ]
Received on Thu Apr 03 2003 - 00:36:47 CST