Hell All,
I am flabbergasted by Korn Shell's behavior.
I wrote a simple script as follows:
chk_sp_cop.sh:
However, it still sends email, even when evaluation operation :
oracle::..ome/app/oracle-> ps -ef | grep -v grep | grep sp_cop | wc -l
4
oracle::..ome/app/oracle->
Please note I wrote a smilar script on the same server that is working perfectly.
Script Name: chk_eventmon.sh
I mainly copied from chk_eventmon.sh to chk_sp_cop.sh and modified the later.
I scheduled both on crontab:
55 * * * * /orahome/app/oracle/admin/scripts/chk_eventmon.sh
55 * * * * /orahome/app/oracle/admin/scripts/chk_sp_cop.sh
This is on Sunos BTW.
Again, chk_eventmon.sh is working as it should be, but chk_sp_cop.sh is not.
I am flabbergasted by Korn Shell's behavior.
I wrote a simple script as follows:
chk_sp_cop.sh:
Code:
csp=`ps -ef | grep -v grep | grep sp_cop | wc -l`
if test $csp -ne 4
then
mailx -s "SharePlex Configuration Processes(SPCP)" me@aol.com<<EOM
One or more SharePlex Configuration Processes are down on SERVER.
Please refer to the document - SharePlex Configuration Monitoring and Error Fixes.
Section:chk_sp_cop on how to fix this issue.
EOM
fi
However, it still sends email, even when evaluation operation :
oracle::..ome/app/oracle-> ps -ef | grep -v grep | grep sp_cop | wc -l
4
oracle::..ome/app/oracle->
Please note I wrote a smilar script on the same server that is working perfectly.
Script Name: chk_eventmon.sh
Code:
c=`ps -ef | grep -v grep | grep sp_eventmon | wc -l`
#
if test $c -ne 2
then
mailx.........
..........
..........
I scheduled both on crontab:
55 * * * * /orahome/app/oracle/admin/scripts/chk_eventmon.sh
55 * * * * /orahome/app/oracle/admin/scripts/chk_sp_cop.sh
This is on Sunos BTW.
Again, chk_eventmon.sh is working as it should be, but chk_sp_cop.sh is not.