[CentOS] Question about Shell Script.
Semih Gokalp
semihgokalp at gmail.comFri Jan 30 13:40:28 UTC 2009
- Previous message: [CentOS] OT: Digital Video Editor for CentOS 5.2 - Suggestions?
- Next message: [CentOS] Question about Shell Script.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Previous message: [CentOS] OT: Digital Video Editor for CentOS 5.2 - Suggestions?
- Next message: [CentOS] Question about Shell Script.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list