Disk Enclosures
1752571 Members
5188 Online
108788 Solutions
New Discussion юеВ

Re: Running pairdisplay in CRON

 
JMJudge
New Member

Running pairdisplay in CRON

I have a script setup to do a daily check of the health of our serviceguard environment. The script is as follows:


pkghost=`cmviewcl | grep pXXXXX_XXg`
thishost=`hostname`
datetime=`date`
pairdisp=`/opt/HORCM/usr/bin/pairdisplay -g pXXXXX_XXXXa`
horcmchk=`ps -ef |grep horcm`

export thishost
echo "Host: \n $thishost \n \n"
export datetime
echo "Date Time: \n $datetime \n \n"
export pkghost
echo "ServiceGuard: \n $pkghost \n \n"
export pairdisp
echo "Pair Display: \n $pairdisp \n \n"
export horcmchk
echo "HORCM Check: \n $horcmchk \n \n"

cat log_file | mailx -s "Daily ServiceGuard Report for tXXXXXXXXs" jXXXXXX@XXXXXXXXX.com


The script runs perfectly when fired from the command line. When I try to run from CRON the pairdisplay portion breaks.




The following are the errors I get:


Error::::

pairdisplay: [EX_ATTHOR] Can't be attached to HORC manager Refer to the command log(/HORCM/log/horcc_tXXXXXXXXXs.log) for details.



HORCM/log/horcc_tXXXXXXXXXs.log::::

COMMAND ERROR : EUserId for HORC : root (0) Tue Nov 9 09:16:00 2010
CMDLINE : pairdisplay -g pXXXXX_XXXXa
*********** SYSTEM ERROR ***********
P.P. : Raid Manager XP for HP-UX
Model : Raid-Manager-XP/HP-UX
Ver&Rev: 01.23.07
Release: Production

Host: tXXXXXXXXXs
EUserId: root (0)
Process: 7446

[System Call Error]
SysCall: bind
Errorno: 2 (No such file or directory)
ErrInfo: Internal Error
ErrTime: Tue Nov 9 09:16:00 2010
SrcFile: shorcmc.c
SrcLine: 669

09:16:01-1242b-07446- 7446:HORCM death detected
09:16:04-37277-07446- ERROR:cm_open[scmclcon() timeout_err]
09:16:04-388b2-07446- ERROR:horcm_lep_create
09:16:04-39f94-07446- [pairdisplay][exit(251)]
[EX_ATTHOR] Can't be attached to HORC manager
[Cause ]:Couldn't connect with the HORC manager.
[Action]:Please check if HORC manager is running or if HORCMINST is set correctly.


Does anyone have any idea what I need to do to get pairdisplay to run properly from the CRON job???

5 REPLIES 5

Re: Running pairdisplay in CRON

in our system when we work with HORC manager, we initially export some values like

export HORCC_MRCF=
export HORCMINST=

it may help you.
Michal Kapalka (mikap)
Honored Contributor

Re: Running pairdisplay in CRON

hi,

you should check this :

export HORCMINST=
export HORCC_MRCF=


of course the value is depend on your enviroment.

mikap

Michal Kapalka (mikap)
Honored Contributor

Re: Running pairdisplay in CRON

hi,

example :

#!/bin/ksh

############### ShadowImage Daemon Check ##############

horc=`ps -ef | grep horcm | wc -l`

if [ $horc = 3 ]
then
echo "ShadowImage Daemon already started!!"
else
echo "ShadowImage Daemon Start!!"
/HORCM/usr/bin/horcmstart.sh 0 1
fi

############### ShadowImage Environment ###############

export HORCMINST=0
export HORCC_MRCF=1

#######################################################


mikap
JMJudge
New Member

Re: Running pairdisplay in CRON

That works kind of.
The pairdisplay is outputting now when I run the job, but the status is showing the pairdisplay as "SMPL ----,----- ----- -" when they should be "P-VOL PAIR DATA ,11342 1041 -".
Any ideas?

Thanks so far for they help everyone...
JMJudge
New Member

Re: Running pairdisplay in CRON

I think I fixed it.
I commented out the "# export HORCC_MRCF=1" and it seems to work now. Thanks everyone so very much...