Avaya Writing Technician Interface Scripts Manual do Utilizador

Consulte online ou descarregue Manual do Utilizador para não Avaya Writing Technician Interface Scripts. Avaya Writing Technician Interface Scripts User's Manual Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 120
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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
Vista de página 0
1 2 3 4 5 6 ... 119 120

Resumo do Conteúdo

Página 1 - Writing Technician Interface

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

Página 3 - Bay Networks Software License

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

Página 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

Página 5 - Contents

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

Página 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.$

Página 7

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

Página 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

Página 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

Página 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

Página 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 = $

Página 12

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

Página 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

Página 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

Página 15

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

Página 16 - Acronyms

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

Página 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:

Página 18 - About Variables

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

Página 19 - My color is $a

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 28 - Performing Error Recovery

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

Página 29 - Debugging a Script File

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

Página 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

Página 31 - Command Reference

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

Página 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

Página 33

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

Página 34

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

Página 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

Página 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

Página 37

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

Página 38

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

Página 39

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

Página 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

Página 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)

Página 42

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

Página 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

Página 44

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

Página 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

Página 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,

Página 47 - command

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

Página 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,

Página 49

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 55 - <instance_id>

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

Página 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.

Página 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

Página 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

Página 59 - <label>

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

Página 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

Página 61

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

Página 62

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

Página 63

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

Página 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

Página 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

Página 66

v Contents About This Guide Software Suites ...

Página 67

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

Página 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

Página 69

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

Página 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

Página 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

Página 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

Página 73

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

Página 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

Página 75

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

Página 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

Página 77 - Appendix A

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

Página 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

Página 79 - FDDI.BAT Script

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

Página 80

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

Página 81

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

Página 82

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

Página 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

Página 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

Página 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

Página 86

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

Página 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

Página 88

viiverbose ...2-45 Appendix A S

Página 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

Página 90

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

Página 91

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

Página 92

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

Página 93

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

Página 94

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

Página 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

Página 97

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

Página 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

Página 100

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

Página 101 - Sample Scripts

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

Página 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

Página 103

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

Página 104

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

Página 105

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

Página 106

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

Página 107

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

Página 108

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

Página 109

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

Página 110

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

Página 111

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

Página 112

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

Página 113

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

Página 114

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

Página 115

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

Página 116

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

Página 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

Página 118

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

Página 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

Página 120

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

Comentários a estes Manuais

Sem comentários