![Juniper JUNOSE 11.3 Скачать руководство пользователя страница 508](http://html1.mh-extra.com/html/juniper/junose-11-3/junose-11-3_configuration-manual_2032852508.webp)
A is 5
Viewing Macro Errors
You can view macro error information in the macroData log file using the
show log data
command and specifying the
macroData
keyword for the category.
NOTE:
Each execution of a macro, by any user and by any name, obtains a
unique ID. This ID appears in the starting and ending message of the macro
output and for each log message in the macroData log.
show log data
•
Use to display log event data using the
category
keyword and the macroData category.
•
delta
—Limits the display to events that occurred after the time set with the log baseline
command.
•
severity
—Displays events that have a specific severity level.
•
Example
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
•
See show log data.
onError Macro Examples
The following examples provide an indication of how the onError macro can assist in
using and troubleshooting macro files. The examples purposely contain errors and show
the result when using the onError macro.
Detecting Invalid Command Formats
In this example, the following macro file (
badInterfaceCommand.mac
) performs a loop.
Within each loop, the CLI executes the
interface fastEthernet
command using an invalid
interface format:
<# badInterfaceCommandMacro #>
<# env.setResult("runStatus","start" ) #>
<# theLoopCount := 500 #>
conf t
<# while theLoopCount > 0 #>
<# env.setResult("runStatus", "Loop:" $ theLoopCount ) #>
interface fastEthernet <# theLoopCount; '\n' #>
<# --theLoopCount #>
Copyright © 2010, Juniper Networks, Inc.
478
JunosE 11.3.x System Basics Configuration Guide
Содержание JUNOSE 11.3
Страница 6: ...Copyright 2010 Juniper Networks Inc vi...
Страница 8: ...Copyright 2010 Juniper Networks Inc viii JunosE 11 3 x System Basics Configuration Guide...
Страница 24: ...Copyright 2010 Juniper Networks Inc xxiv JunosE 11 3 x System Basics Configuration Guide...
Страница 32: ...Copyright 2010 Juniper Networks Inc 2 JunosE 11 3 x System Basics Configuration Guide...
Страница 146: ...Copyright 2010 Juniper Networks Inc 116 JunosE 11 3 x System Basics Configuration Guide...
Страница 166: ...Copyright 2010 Juniper Networks Inc 136 JunosE 11 3 x System Basics Configuration Guide...
Страница 432: ...Copyright 2010 Juniper Networks Inc 402 JunosE 11 3 x System Basics Configuration Guide...
Страница 488: ...Copyright 2010 Juniper Networks Inc 458 JunosE 11 3 x System Basics Configuration Guide...
Страница 524: ...Copyright 2010 Juniper Networks Inc 494 JunosE 11 3 x System Basics Configuration Guide...
Страница 554: ...Copyright 2010 Juniper Networks Inc 524 JunosE 11 3 x System Basics Configuration Guide...
Страница 566: ...Copyright 2010 Juniper Networks Inc 536 JunosE 11 3 x System Basics Configuration Guide...
Страница 588: ...Copyright 2010 Juniper Networks Inc 558 JunosE 11 3 x System Basics Configuration Guide...
Страница 613: ...PART 3 Index Index on page 585 583 Copyright 2010 Juniper Networks Inc...
Страница 614: ...Copyright 2010 Juniper Networks Inc 584 JunosE 11 3 x System Basics Configuration Guide...
Страница 632: ...Copyright 2010 Juniper Networks Inc 602 JunosE 11 3 x System Basics Configuration Guide...