[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

4757.0. "How to perform multiple conditional SNMP sets & tests from a script?" by MDCRAB::STUART (Scott Stuart - MARVA Network Sales Support DTN 341-3132 - MARVA District) Wed Mar 24 1993 13:40

I am running DECmcc 1.3 under ULTRIX 4.3.

I would like some suggestions/examples of how to perform multiple SNMP sets
via DECmcc from a shell script/command procedure.  I know that I can do
a MCC> set SNMP x value y  

I can specify the command is a file and execute manage < file-spec

but I can think of a few problems with this...

Can I read the value of a variable between set operations within MCC?
In other words I want to test for true or false and then take a different
action depening on the value I get back.

Within the command line interface is there a test command? and is there a
conditional statement?

The problem I am trying to solve is to initiate dialbackup on a series of modems.
The variables I can tell me if the port is avaialable, to load a number, dial
a number, etc.  I need to test for the port being available 1st and then if yes,
load and dial that number.  I also need to test for success when I am done.

This needs to be repeated multiple times so that if I have to execute
manage each time, I am worried about performance.

Thanks for all suggestions... scott
T.RTitleUserPersonal
Name
DateLines
4757.1couple of optionsCTHQ::WOODCOCKThu Mar 25 1993 09:1538
Hi Scott, how's it goin',

>Can I read the value of a variable between set operations within MCC?
>In other words I want to test for true or false and then take a different
>action depening on the value I get back.

no, not that I'm aware of.

>Within the command line interface is there a test command? and is there a
>conditional statement?

no, not that I'm aware of.

>The problem I am trying to solve is to initiate dialbackup on a series of modems.
>The variables I can tell me if the port is avaialable, to load a number, dial
>a number, etc.  I need to test for the port being available 1st and then if yes,
>load and dial that number.  I also need to test for success when I am done.

>This needs to be repeated multiple times so that if I have to execute
>manage each time, I am worried about performance.

You probably have a couple of options, both of which will be work. One of the
options is to issue ALL your mcc commands to determine the availability of all
the ports at once. If you use LOGGING all the info will be captured into a
file which you could then read through and take either of the two appropriate
actions. I agree, going in and out of mcc for each port will have performance
problems so you could try this instead.

The other option is to use alarms. If you can use some sort of wildcarding in 
the scheme this might be feasibile. If you have to maintain 1400 alarms for the
job forget it. The alarm could be set up to fire regardless of the value passed
which describes the port availability. This actual value is then passed into
the alarm script. Check the value and execute dialbackup initiation if
available or send mail (etc..) if not.

best regards,
brad...