Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Unix script to monitor iostat on AIX 4.3.3
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
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
![]() |
![]() |