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

Home -> Community -> Usenet -> c.d.o.server -> Re: Unix script to monitor iostat on AIX 4.3.3

Re: Unix script to monitor iostat on AIX 4.3.3

From: Ron Reidy <rereidy_at_indra.com>
Date: Wed, 02 Apr 2003 06:15:27 -0700
Message-ID: <3E8AE26F.3080601@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 ]

--
Ron Reidy
Oracle DBA
Received on Wed Apr 02 2003 - 07:15:27 CST

Original text of this message

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