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 -> Unix script to monitor iostat on AIX 4.3.3

Unix script to monitor iostat on AIX 4.3.3

From: niels <niels_zegveld_at_hotmail.com>
Date: 2 Apr 2003 04:12:05 -0800
Message-ID: <3749ac2c.0304020412.c62d93b@posting.google.com>


Hi,

I can't seem to get a script working on AIX 4.3.3. It is a script provided in the Oracle9i Unix Administration Handbook by Donald Burleson. It executes but keeps returning an error on the line :

$ORACLE_HOME/bin/sqlplus /nolog \<<EOF

I have added the '\' before the <<EOF because this also gives an error.

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
      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

   fi
   done
   sleep 300
done

The error I get is:
A file or directory in the path name does not exist.
./get_iostat_aix.ksh[9]: EOF: 0403-016 Cannot find or open the file.
./get_iostat_aix.ksh[10]: spool: not found.
./get_iostat_aix.ksh[11]: connect: not found.
./get_iostat_aix.ksh[12]: insert: not found.
./get_iostat_aix.ksh[13]: SYSDATE,: not found.
./get_iostat_aix.ksh[14]: spool: not found.
./get_iostat_aix.ksh[15]: EXIT: not found.
./get_iostat_aix.ksh[16]: EOF: not found.

Has anybody got this script working on aix? The original name of the scripts is get_iostat_aix.ksh

Thanx for any input, regards
Niels Zegveld Received on Wed Apr 02 2003 - 06:12:05 CST

Original text of this message

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