EasyManuals Logo

Juniper SYSTEM BASICS - CONFIGURATION GUIDE V 11.1.X User Manual

Juniper SYSTEM BASICS - CONFIGURATION GUIDE V 11.1.X
640 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #524 background imageLoading...
Page #524 background image
Enter configuration commands, one per line. End with ^Z.
ERX-40-94-fb(config)#interface fastEthernet 500
^
% invalid interface format
Macro 'badInterfaceCommandMacro' in file 'testInterfaceCommand.mac' ending execution (Id: 402)
You can determine the execution progress through the runStatus result entry in the
macroData log file. For this example, the runStatus value of 500 indicates that the
macro ended early.
host1(config)# show log data category macroData severity debug
NOTICE 01/07/2006 09:46:57 macroData: Macro 'badInterfaceCommandMacro' in file 'testInterfaceCommand.mac'
starting execution (Id: 402) on vty, 0
ERROR 01/07/2006 09:46:57 macroData: (Id: 402) Command error: interface fastEthernet 500, Command execution
error
NOTICE 01/07/2006 09:46:57 macroData: (Id: 402) commandError is interface fastEthernet 500
NOTICE 01/07/2006 09:46:57 macroData: (Id: 402) commandErrorStatus is Command execution error
NOTICE 01/07/2006 09:46:57 macroData: (Id: 402) runStatus is Loop:500
NOTICE 01/07/2006 09:46:57 macroData: Macro 'badInterfaceCommandMacro' in file 'testInterfaceCommand.mac'
ending execution (Id: 402) on vty, 0
Detecting Invalid Commands
In this example, the following macro file (badExecCommand.mac) is programmed to
executes four exec mode commands. However, the second command in the sequence
is invalid.
<# badExecCommandMacro #>
<# env.setResult("runStatus","start" ) #>
show clock
<# env.setResult("runStatus","after first show clock" ) #>
foo
<# env.setResult("runStatus","after foo" ) #>
show privilege
<# env.setResult("runStatus","after show privilege" ) #>
show clock
<# env.setResult("runStatus","complete" ) #>
<#endtmpl#>
<# onerror #>
<# errCmd := env.getErrorCommand #>
<# errStatus := env.getErrorStatus #>
<# env.setResult("commandError", errCmd) #>
<# env.setResult("commandErrorStatus", errStatus) #>
<#endtmpl#>
If the macro were to run to completion, the following commands would be executed:
show clock
foo
show privilege
show clock
494 â–  Detecting and Recording Macro Errors
JUNOSe 11.1.x System Basics Configuration Guide

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Juniper SYSTEM BASICS - CONFIGURATION GUIDE V 11.1.X and is the answer not in the manual?

Juniper SYSTEM BASICS - CONFIGURATION GUIDE V 11.1.X Specifications

General IconGeneral
BrandJuniper
ModelSYSTEM BASICS - CONFIGURATION GUIDE V 11.1.X
CategorySoftware
LanguageEnglish

Related product manuals