Question about Shell Script.

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



Hi all CentOS users,

I have writing shell script for check oracle processes in real time
and alert with e-mail.

I read script like below

NUMBEROFPRO=/oracle/10.2.0/db_1/bin/sqlplus / as sysdba <<EOF1 |grep
processes|awk '{print $2}'
SELECT resource_name,current_utilization,limit_value FROM
V\$RESOURCE_LIMIT WHERE RESOURCE_NAME IN ('processes','sessions');
quit
EOF1

if [ $NUMBEROFPRO > 150 ]
then
/bin/mail -s "Processes number bigger then 150 !!" myemailadres<<EOF
Contact your system administrator.
EOF
fi

Script print value correctly on screen but NUMBEROFPRO have empty
value in script.How can i take and print NUMBEROFPRO  value from above
query ?

Thanks for all.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux