shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rotina de consumo de IO


From: Andre Campos
Subject: Rotina de consumo de IO
Date: Thu, 30 Nov 2006 15:47:34 -0200

Amigos,


Alguém saberia me dizer o que está errado nessa rotina???



#!/bin/ksh
while true
do
 iostat -x 300 1|\
   sed 1,2d|\
   awk  '{ printf("%s %s %s\n", $1, $4, $5) }' |\
  while read HDISK VMSTAT_IO_R VMSTAT_IO_W
  do
    if [ $VMSTAT_IO_R -gt 0 ] and [ $VMSTAT_IO_W -gt 0 }
    then
     sqlplus -s perfstat/perfstat <<!
      insert into perfstat.stats\$iostat
      values
        (SYSDATE, 5, '$HDISK', $VMSTAT_IO_R, $VMSTAT_IO_W);
      exit
!
   fi
  done
  sleep 300
done


Estou recebendo o seguinte erro : io.sh: [: missing `]'


Obrigado

André Campos



reply via email to

[Prev in Thread] Current Thread [Next in Thread]