Operating System - HP-UX
1826498 Members
1888 Online
109692 Solutions
New Discussion

Re: Serviceguard Custom user command execution from SMH GUI

 
Jayaprakash Subramanian
Frequent Advisor

Serviceguard Custom user command execution from SMH GUI

Hello All,

There are 2 vPars in an nPar and that 2 vPars are configured with Serviceguard Cluster. I wrote a custom user command part to move the memory from the primary node to the secondary node along with the package failover.

In the setup 4GB of memory should be migrated from the primary to secondary node and vice-versa.

The issue here is, when I move the package from the command line, it works fine. But if the same task is done through the System Management Homepage GUI, the package movement is done but the Memory migration fails.

Here the commands I used to halt and migrate the package -

# cmhaltpkg -v
# cmrunpkg -v -n
# cmmodpkg -v -e crmsdb

I tried putting the 3 commands together in a single script. This also failing. If I include a sleep of 10 secs between the commands as below, it works fine.

# cat sg_pkg.sh
cmhaltpkg -v
sleep 10
cmrunpkg -v -n
sleep 10
cmmodpkg -v -e crmsdb

Is this a product related bug or something related to timing. Please advise.

Thanks,
Jayaprakash S
1 REPLY 1
Michal Kapalka (mikap)
Honored Contributor

Re: Serviceguard Custom user command execution from SMH GUI

hi,

did you try to set the fully path tu the commands ???

if its a shell script use :

#!/bin/sh (ksh)...

or if its a +x on the file the you could use

set -x

command 1
command 2


cmhaltpkg ???

for example : /usr/sbin/cmhaltpkg -v pkg_name

or define the $PATH as some variable.

mikap