nv-l
[Top] [All Lists]

Re: Execute ruleset between certain hours

To: nv-l@lists.tivoli.com
Subject: Re: Execute ruleset between certain hours
From: "MENEZES, ALAIN" <a.menezes@ASLK-CGER.BE>
Date: Wed, 25 Nov 1998 10:10:23 +0100
Reply-to: Discussion of IBM NetView and POLYCENTER Manager on NetView <NV-L@UCSBVM.UCSB.EDU>
Sender: Discussion of IBM NetView and POLYCENTER Manager on NetView <NV-L@UCSBVM.UCSB.EDU>
just type : 

exit NUMBER

where the script should exit (usually at the end of it)
NUMBER should be replaced by an exit code number and you can test the
value with the variable $?, for example :

in the 1st script : exit 222
in the shell/script where this script has been executed : echo $?
or      if [[ $? = 222 ]]; then   ...

Hope this helps

---------------------
Alain Menezes   
ASLK-CGER Services GIE                          Tel.:  +32 2 228.55.74
Rue Fossé-aux-Loups, 48                               Fax.:  +32 2 228.83.69
1000  Bruxelles                                         Email:
a.menezes@aslk-cger.be




> -----Original Message-----
> From: Tony Manglaviti [SMTP:eeatym@EPA.ERICSSON.SE]
> Sent: mercredi 25 novembre 1998 06:01
> To:   NV-L@UCSBVM.UCSB.EDU
> Subject:      Re: Execute ruleset between certain hours
> 
> Hi James,
>                    No I didn't , how do you set the exit code in a
> script?
> 
> 
> Regards
>  Tony
> 
> Did you set the exit code when you left?  What does your script look
> like?
> 
> > You can trace your ruleset either by naming it "nvcdebug.rs"  or by
> issuing
> > the command nvcdebug .  See the man page for options.  Most people
> use
> > nvcdebug -d all unless they have several rulesets running at once.
> > nvcdebug -r turns off the trace, which goes to
> /usr/OV/log/nvcorrd.alog and
> > .blog.
> >
> > James Shanks
> > Tivoli (NetView for UNIX) L3 Support
> >
> > Tony Manglaviti <eeatym@EPA.ERICSSON.SE> on 11/24/98 12:26:42 AM
> >
> > Please respond to Discussion of IBM NetView and POLYCENTER Manager
> on
> >       NetView <NV-L@UCSBVM.UCSB.EDU>
> >
> > To:   NV-L@UCSBVM.UCSB.EDU
> > cc:    (bcc: James Shanks)
> > Subject:  Execute ruleset between certain hours
> >
> > Hi All,
> >              Could anyone assist me on how to put a time condition
> in a
> > rulset set?
> >
> > eg. If a node down event is recieved between the hours of 18:00 to
> 8:00
> > or its Saturday or Sunday  then action is to issue a page.
> >
> > For the Saturday or Sunday I was using an Inline Action with the
> command
> > "date +%u "  (this gives a decimal number for the day eg. Sunday =
> 7)
> > and the exit code I specified  was "7" but it didn't work. I'm
> assuming
> > that the parameter value from the command should equal the value I
> > specify in the exit code for the ruleset to continue, but something
> > tells me that this is not right. Any help in this would be great.
> >
> > Thanks
> >
> > Tony
> > Tony.Manglaviti@ericsson.com.au

<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web