[prev in list] [next in list] [prev in thread] [next in thread]
List: veritas-ha
Subject: [Veritas-ha] triggers in VCS 3.5
From: Rodolfo "Casás" <rodolfocasas () yahoo ! com>
Date: 2004-03-16 9:57:14
Message-ID: 20040316095714.97219.qmail () web40710 ! mail ! yahoo ! com
[Download RAW message or body]
Good morning,
I have to configure a postonline and postoffline trigger.
I have not worked with them in VCS never.
I have copied this triggers from sample_triggers to
$VCS_HOME/bin/triggers.
This is what I need.
When an Oracle Service Group goes online, I want a script to be executed.
When an Oracle Service Group goes offline, I want a script to be executed.
I have written this into postoffline trigger...(the script is for DBSPI
(Openview)).
# postoffline
# postoffline is invoked after a group transitions to an OFFLINE state
from
# a non-OFFLINE state. postoffline is invoked on the node where group
# went OFFLINE.
#
# There are no configurable settings that will turn ON/OFF invoking this
# trigger. If you don't want this trigger to be invoked, remove
postoffline.*
# files from $VCS_HOME/bin/triggers directory.
#
# Usage:
# postoffline <system> <group>
#
# <system>: is the name of the system where group is offlined.
# <group>: is the name of the group that is offlined.
#
eval 'exec ${VCS_HOME:=/opt/VRTSvcs}/bin/perl5 -S $0 ${1+"$@"}'
if 0;
$vcs_home = $ENV{"VCS_HOME"};
if (!defined ($vcs_home)) {
$vcs_home="/opt/VRTSvcs";
}
$trigger="postoffline";
if (!defined $ARGV[0]) {
$log_message = sprintf("VCS:15005:%s:Failed to continue; undefined
system name", $trigger);
`$vcs_home/bin/halog -add C \"$log_message\" -msgid 15005
-parameters $trigger`;
exit;
} elsif (!defined $ARGV[1]) {
$log_message = sprintf("VCS:15006:%s:Failed to continue; undefined
group name", $trigger);
`$vcs_home/bin/halog -add C \"$log_message\" -msgid 15006
-parameters $trigger`;
exit;
}
# It is a good idea to log what you're doing.
# `$vcs_home/bin/halog -add E "(postoffline) Invoked with arg0=$ARGV[0],
arg1=$ARGV[1]"`;
#
# put your code here...
# Modificacion para arranque de SPI de OVO para Oracle
# Turn DBSPI collection OFF - TT 2002/05/31
[ -x /var/opt/OV/bin/OpC/cmds/dbspicol ] &&
/var/opt/OV/bin/OpC/cmds/dbspicol OFF openview
# Fin modificacion
"postoffline" 84 lines, 2791 characters
My question is, how do I get executed exactly when I want?
I do not understand this:
# Usage:
# postoffline <system> <group>
#
# <system>: is the name of the system where group is offlined.
# <group>: is the name of the group that is offlined.
#
Do I have to execute it now, after the modifications?
May you help me?
Thanks all
RODOLFO
__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com
_______________________________________________
Veritas-ha maillist - Veritas-ha@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-ha
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic