Avaya Writing Technician Interface Scripts User Manual

Browse online or download User Manual for Unknown Avaya Writing Technician Interface Scripts. Avaya Writing Technician Interface Scripts User's Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 120
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 0
Writing Technician Interface
Scripts
Router Software Version 10.0
Site Manager Software Version 4.0
Software Version BNX 6.0
Site Manager Software Version BNX 6.0
Part No. 112946 Rev. A
January 1996
Page view 0
1 2 3 4 5 6 ... 119 120

Summary of Contents

Page 1 - Writing Technician Interface

Writing Technician InterfaceScripts Router Software Version 10.0Site Manager Software Version 4.0Software Version BNX 6.0Site Manager Software Versi

Page 3 - Bay Networks Software License

Writing Technician Interface ScriptsA-24################################################################## MAC screen...# ############################

Page 4 - (continued)

Sample ScriptsA-25:FI_MAC_LP:on error :FI_MAC_NXT:if $i > $list_0 then; goto :FOOTER_AND_END: let cctnum = $(wfFddiEntry.wfFDDICct.${list_[$i]})g

Page 5 - Contents

Writing Technician Interface ScriptsA-26printf “%10u\n” $(wfFddiMacExtEntry.wfFddiMacRingOpCts.${list_[$i]})cutenv -c9-15 name2 “$cctname”if ${name2[

Page 6

Sample ScriptsA-27:FI_PORT_LP:on error :FI_PORT_NXT:if $i > $list_0 then; goto :FOOTER_AND_END:printf “%4d %4d ” $(wfFddiPortEntry.wfFddiPortSlot.$

Page 7

Writing Technician Interface ScriptsA-28################################################################## Sample screen (samples parameters twice, p

Page 8

Sample ScriptsA-29:FI_SAMP_CKVAL:if $period <= 0 then; \echo “Period of $period seconds is too low.” ; \goto :FI_HELP_SHOW:## Check for circuit to

Page 9

Writing Technician Interface ScriptsA-30:FI_SAMP1_LP:on error :FI_SAMP1_SKP:if $i > $list_0 then; goto :FI_SAMP_WT:if “$matchcct” = “” then ; goto

Page 10

Sample ScriptsA-31:FI_SAMP2_LP:on error :FI_SAMP2_SKP:if $i > $list_0 then; goto :FI_SAMP_PRT:if “$matchcct” = “” then ; goto :FI_SAMP2_NOW:let cct

Page 11 - About This Guide

Writing Technician Interface ScriptsA-32:FI_SAMP_MATCH:on error :FI_NEXT_TRY:if ${s1instid_[$i]} != ${s2instid_[$j]} then; goto :FI_NEXT_TRY:if $j = $

Page 12

Sample ScriptsA-33################################################################## Hardware Filter screen...# ######################################

Page 13 - CompuServe

xi About This Guide If you are interested in creating and editing Technician Interface scripts, refer to this guide for• An overview of variables• In

Page 14 - Conventions

Writing Technician Interface ScriptsA-34## Enable circuit...#:FI_ENBLC:if $# != 3 then ; goto :FI_HELP_ENBL:instenv list_ wfFddiEntryif $list_0 = 0 th

Page 15

Sample ScriptsA-35:FI_ENBLI:if $# != 3 then ; goto :FI_HELP_ENBL:# Sanity check <slot.connector> parameter...if “$ver” < “x7.80” then; goto :

Page 16 - Acronyms

Writing Technician Interface ScriptsA-36## Gosubs shared by enable and disable...#:ERR_MSG1:cutenv -c $invalch ugly_ “$3”echo “Inappropriate character

Page 17 - Creating a Script File

Sample ScriptsA-37## Disable circuit...#:FI_DSBLC:if $# != 3 then ; goto :FI_HELP_DSBL:instenv list_ wfFddiEntryif $list_0 = 0 then; goto :FI_DSBLNF:

Page 18 - About Variables

Writing Technician Interface ScriptsA-38:FI_DSBLI:if $# != 3 then ; goto :FI_HELP_DSBL:# Sanity check <slot.connector> parameter...if “$ver” <

Page 19 - My color is $a

Sample ScriptsA-39################################################################## Version command##################################################

Page 21 - Prompting for Input

Index-1Symbols#, inserting comments using, 1-13$, referencing variable using, 1-2Aarrayenv command, 1-10, 2-3arrays, 1-8Ccommandsarrayenv, 1-10, 2-3cu

Page 22 - Accessing MIB Information

Index-2Ggetenv command, 1-8, 2-9global variablesoverview of, 1-4PWD, 1-11gosub command, 1-11, 2-10goto command, 1-11, 2-11Iif command, 1-11, 2-12 to 2

Page 23 - Formatting a MIB Entry

Index-3TTFTP, 1-1timeout values, setting, 1-5transferring script files, 1-1true variable array, 1-8Uunsetenv command, 1-10, 2-43Vvariable array, 1-8var

Page 24 - Creating and Using Variables

Writing Technician Interface Scriptsxii • The BNX Suite includes IP Routing, SNMP Agent, Bay Networks HDLC, PPP, OSPF, EGP, BGP, File-Based Perform

Page 26 - Deleting Variables

About This Guidexiii To purchase any of these support programs, including PhonePlus™ for 24-hour telephone technical support, call 1-800-2LANWAN. Out

Page 27 - Controlling Program Flow

Writing Technician Interface Scriptsxiv InfoFACTS InfoFACTS is the Bay Networks free 24-hour fax-on-demand service. This automated system contains li

Page 28 - Performing Error Recovery

About This Guidexv arrow character ( ➔ ) Separates menu and option names in instructions. Example: Protocols ➔ AppleTalk identifies the AppleTalk opti

Page 29 - Debugging a Script File

Writing Technician Interface Scriptsxvi Acronyms ANSI American National Standards InstituteARP Address Resolution ProtocolASCII American Standard Cod

Page 30 - Creating Menus

1-1 Chapter 1Creating a Script File The Technician Interface script facility allows you to read and execute Technician Interface commands from a scri

Page 31 - Command Reference

Writing Technician Interface Scripts1-2 • Writing messages to the console, using the echo and the printf commands• Recording console messages to

Page 32 - Table 2-1. Script Commands

Creating a Script File1-3To prevent a variable from being expanded, enter two dollar signs ($$) before the variable name, as shown in the following ex

Page 33

4401 Great America Parkway 8 Federal StreetSanta Clara, CA 95054 Billerica, MA 01821 Copyright © 1988–1996 Bay Networks, Inc. All rights reserved. Pr

Page 34

Writing Technician Interface Scripts1-4Local, Global, and System VariablesWhen you first define a variable, the computer stores it in the local environm

Page 35

Creating a Script File1-5Prompting for InputThe input prompt variable allows you to create a prompt that accepts user input from the Technician Interf

Page 36 - <variable_name>

Writing Technician Interface Scripts1-6In the following script, if the user does not press Return before the time specified for SYS_IO_TIMEOUT has elap

Page 37

Creating a Script File1-7The variable values <object>, <attribute>, and <instance> are defined as follows:<object> is the name

Page 38

Writing Technician Interface Scripts1-8Defining a Pseudo-Variable ArrayThe Technician Interface script facility allows you to define a pseudo-variable a

Page 39

Creating a Script File1-9If you access the Technician Interface via Telnet, the Technician Interface also displays the variables in the system environ

Page 40 - <subroutine_name>

Writing Technician Interface Scripts1-10• To convert and format text, and save the result in a specified variable for later use, use the sprintf comman

Page 41 - <label_name>

Creating a Script File1-11Setting the Current Volume or DirectoryWhen you set the current working volume or directory using the cd (change directory)

Page 42

Writing Technician Interface Scripts1-12Writing Messages to the ConsoleThe Technician Interface provides two commands to display messages on the conso

Page 43

Creating a Script File1-13Inserting CommentsYou can insert comments into the script file. Comments begin with a pound sign (#) in column 1, as shown in

Page 44

Bay Networks, Inc. 4401 Great America Parkway, Santa Clara, CA 950548 Federal Street, Billerica, MA 01821 Bay Networks Software License This Software

Page 45 - <directory_name>

Writing Technician Interface Scripts1-14Running a Script FileTo read and execute the commands in a Technician Interface script file, and to ensure that

Page 46 - <object>

2-1Chapter 2Command ReferenceIn the following pages you can find the function, syntax, and examples of all the script commands you need to write, edit,

Page 47 - command

Writing Technician Interface Scripts2-2pause Suspends the Technician Interface’s operation for a given intervalprintf Converts, formats, and prints th

Page 48 - <flag>

Command Reference2-3arrayenv The arrayenv command allows you to write a list of command line arguments <text_string> to a pseudo-variable array,

Page 49

Writing Technician Interface Scripts2-4The cutenv command has the following syntax:cutenv [-s] [-d <delimiter>] [-f <list> | -c <list&g

Page 50 - <string>

Command Reference2-5The following sample script shows how you use the cutenv command to assign portions of 192.32.100.55 to a pseudo-variable array:cu

Page 51 - Example:

Writing Technician Interface Scripts2-6echo The echo command allows you to display its command line arguments to the user’s terminal.The echo command

Page 52

Command Reference2-7enumenv The enumenv command lets you assign a sequence of values to a list of variables. You assign a starting number <starting

Page 53 - Examples:

Writing Technician Interface Scripts2-8export The export command allows you to move one or more local variables to the global environment variable tab

Page 54

Command Reference2-9getenv The getenv command allows you to view the current list of variables stored in the local and global environment variable tab

Page 55 - <instance_id>

Bay Networks, Inc. 4401 Great America Parkway, Santa Clara, CA 950548 Federal Street, Billerica, MA 01821 Bay Networks Software License (continued)

Page 56

Writing Technician Interface Scripts2-10gosub The gosub command calls a subroutine inside the same script file. It must be the last command on a line.

Page 57

Command Reference2-11goto The goto command lets you specify the next line to be executed from the script file. Within the script file, the goto command

Page 58 - <MIB_object>

Writing Technician Interface Scripts2-12ifThe if command allows you to evaluate whether an expression is true. The expression can be a comparison of t

Page 59 - <label>

Command Reference2-13<string1> <string2> are ASCII character strings or numbers.<operand> is one of the following comparison operati

Page 60 - <no._of_seconds>

Writing Technician Interface Scripts2-14The backslash character (\) allows you to continue a command line on the following physical line. When used in

Page 61

Command Reference2-15if -file <filename>=1For example, the following script tests whether the install.bat file is present:if -file install.bat=

Page 62

Writing Technician Interface Scripts2-16instenvThe instenv command allows you to define a pseudo-variable array that contains the list of MIB instance

Page 63

Command Reference2-17The following example is an excerpt from a script file showing how to use the instenv command.instenv ip_ wfIpInterfaceEntryecho “

Page 64 - <vol>

Writing Technician Interface Scripts2-18let The let command allows you to evaluate a simple arithmetical or logical expression and assign the result t

Page 65

Command Reference2-19Use the arithmetical and logical operators listed in Table 2-2 and Table 2-3 with the let command. Table 2-2. Arithmetical Operat

Page 66

v Contents About This Guide Software Suites ...

Page 67

Writing Technician Interface Scripts2-20The let command provides the following string functions:• strlen( )• strindex( )• strrindex( )• strpbrk( )• st

Page 68

Command Reference2-21You can also get the ASCII code for a given character (indicated as one character within single quotes, such as ‘c’).The let comm

Page 69

Writing Technician Interface Scripts2-22let -date -time localtime = date() + time()echo $localtime10/11/95 15:24:05let -date -time london = date(“10/7

Page 70 - <variable_value>

Command Reference2-23Example:The following example shows how to use the let command to set up a slotmask:let slot = $<Enter Slot Number>let

Page 71

Writing Technician Interface Scripts2-24mibget The mibget command lets you search a MIB object table one record at a time and retrieve a set of attrib

Page 72

Command Reference2-25<next_instance_variable> is the name of the variable that stores the instance ID of the record currently read. If the routi

Page 73

Writing Technician Interface Scripts2-26# Begin loop to read entire set of records :IP_RT_LOOP:mibget $nextflag wfIpForwardEntry attr $nextid value

Page 74 - Examples

Command Reference2-27octetfmt The octetfmt command formats a MIB entry with an Octet or Opaque data type using the specified format type. The syntax fo

Page 75

Writing Technician Interface Scripts2-28UNSIGNED_INTEGER formats the data as a 4-byte unsigned integer.<MIB_object> represents the variable valu

Page 76

Command Reference2-29on error The on error command allows you to specify an error handler label within a script file. If a command returns an error or

Page 77 - Appendix A

viControlling Program Flow ...1-11Writing Messages to the

Page 78 - FDDI.MNU Script

Writing Technician Interface Scripts2-30pause The pause command allows you to suspend operation of the Technician Interface for a given interval. Duri

Page 79 - FDDI.BAT Script

Command Reference2-31printf The printf command converts, formats, and prints the input arguments (<p1>,. . .,<pN>) on the Technician Inter

Page 80

Writing Technician Interface Scripts2-32 A summary of the flags and conversion codes follows:<format> = %<flag><width>.<precisi

Page 81

Command Reference2-33<conversion_specification> can be one of the following:•d or i indicates signed decimal notation.•o indicates unsigned octal

Page 82

Writing Technician Interface Scripts2-34recordThe record command saves to an open file all messages written to the console terminal. Use this command w

Page 83

Command Reference2-35You can stop saving messages to a snapshot file temporarily by using the pause option with the record command. To change the pause

Page 84

Writing Technician Interface Scripts2-36return You use the return command in a subroutine to return to the calling routine. When the return command ex

Page 85

Command Reference2-37run The run command allows you to read and execute the Technician Interface commands in a Technician Interface script file. The ru

Page 86

Writing Technician Interface Scripts2-38The special variable $# contains the number of parameters entered on the command line following the script file

Page 87

Command Reference2-39save env The save env command allows you to save the current list of local and global variables to a script file. Use the followin

Page 88

viiverbose ...2-45 Appendix A S

Page 89

Writing Technician Interface Scripts2-40setenv The setenv command allows you to assign an ASCII string value or a numeric value to a variable in the l

Page 90

Command Reference2-41source env The source env command allows you to read and execute the Technician Interface commands in a Technician Interface scri

Page 91

Writing Technician Interface Scripts2-42sprintf The sprintf command converts and formats text, and saves the result in a specified variable for later u

Page 92

Command Reference2-43unsetenv The unsetenv command allows you to delete one or more variables from the local or global environment variable table. You

Page 93

Writing Technician Interface Scripts2-44ExamplesIf you enter: The system:unsetenv slot Deletes the variable slot from either the local or the global t

Page 94

Command Reference2-45verbose The verbose command allows you to enable the debug trace facility. When you enable the trace facility, the Technician Int

Page 96

A-1Appendix ASample ScriptsTo help you create your own scripts, this appendix contains three sample scripts:• Menu script• FDDI.mnu script• FDDI.bat s

Page 97

Writing Technician Interface ScriptsA-2set wfTftp.wfTftpDefaultVolume.0 $vol;\go to :MENU:if $ans = 4 then;\echo “Exiting ...”;\goto :EXIT:echo “Bad c

Page 98

Sample ScriptsA-3FDDI.BAT ScriptThe following example shows a protocol script for a Bay Networks router. You view output from the script by enterin

Page 100

Writing Technician Interface ScriptsA-4################################################################## Sub-command vectoring...####################

Page 101 - Sample Scripts

Sample ScriptsA-5################################################################## Parse for “show” command...######################################

Page 102

Writing Technician Interface ScriptsA-6let i = strindex(“hwfilters”, cmd)if $i = 1 then ; goto :FI_HWF:let i = strindex(“version”, cmd)if $i = 1 then

Page 103

Sample ScriptsA-7:FI_BASE_NM:setenv nextflag “”setenv pattern “”setenv nextid “*”array attr wfFDDICct wfFDDIState wfFDDIEnable wfFDDISlot array

Page 104

Writing Technician Interface ScriptsA-8################################################################## Show Alerts screen...#######################

Page 105

Sample ScriptsA-9# Do next circuit...#:FI_SKIPA:let i = $i + 1goto :FI_ALOOP:################################################################## Show D

Page 106

Writing Technician Interface ScriptsA-10################################################################## Show Enabled screen...#####################

Page 107

Sample ScriptsA-11################################################################## Print header for base/alerts/disabled/enabled screens...#########

Page 108

Writing Technician Interface ScriptsA-12:FI_STATE_ESC:printf “%-17.17s” “${value[$Madr]}”if ${value[$Bofl]} = 2 then ; \printf “%-4s” “Off” ; goto :FI

Page 109

Sample ScriptsA-13:FI_STAT_NM:setenv nextflag “”setenv pattern “”setenv nextid “*”array attr wfFDDICct wfFDDICrcErrRx wfFDDIOverrunRx array -a a

Page 110

ix Tables Table 2-1. Script Commands ...2-1Table 2-2. Arithmetical

Page 111

Writing Technician Interface ScriptsA-14:FI_STLOOP:mibget -n wfFddiEntry attr $nextid value nextidif “$nextid” = “END” then; let i = $i + 1; goto :FO

Page 112

Sample ScriptsA-15################################################################## Receive Errors screen...#########################################

Page 113

Writing Technician Interface ScriptsA-16printf “%-4.4s %-4.4s %-8.8s %-10.10s %-10.10s %-10.10s %-10.10s\n” \“” “” “” “CRC” “Overrun” “Invalid”

Page 114

Sample ScriptsA-17:MAC_EXTRACT:setenv mac_sum 0if $?(wfFddiMacEntry.wfFddiMacErrorCts.${nextid}) = 0 then ; \returnarray mac_attr wfFddiMacErrorCts/H

Page 115

Writing Technician Interface ScriptsA-18:FI_XMIT_NM:setenv nextflag “”setenv pattern “”setenv nextid “*”array attr wfFDDICct wfFDDISlot wfFDDINode

Page 116

Sample ScriptsA-19################################################################## System Errors screen...# ########################################

Page 117

Writing Technician Interface ScriptsA-20 printf “%-4.4s %-4.4s %-8.8s %-10.10s %-10.10s %-10.10s %-10.10s \ %-10.10s\n” “” “” “” “” “” “ Port” “ Int

Page 118

Sample ScriptsA-21################################################################## SMT screen...# ##################################################

Page 119

Writing Technician Interface ScriptsA-22:FI_SMT_LP:on error :FI_SMT_NXT:if $i > $list_0 then; goto :FOOTER_AND_END:let cctnum = $(wfFddiEntry.wfFDD

Page 120

Sample ScriptsA-23# Note field size is 32 because flags contains the trailing space.printf “%32s” “$flags”let state = $(wfFddiSmtEntry.wfFddiSmtEcmSta

Comments to this Manuals

No comments