Description
Variable
The pass-through POSIX error code (9 bits = 512
values). This represents the last of the 32-bit
sequence, and the string corresponding to this error
code is contained in $_cerr_posix_err.
PPPPPPPP
Error Class Encodings for XY
The first variable, XY, references the possible error class encodings shown in the table below.
Table 170: Error Class Encodings
CERR_CLASS_SUCCESS
00
CERR_CLASS_INFO
01
CERR_CLASS_WARNING
10
CERR_CLASS_FATAL
11
An error return value of zero means SUCCESS.
SUMMARY STEPS
1.
enable
2.
show event manager policy available detailed policy-filename
3.
Cut and paste the contents of the sample policy displayed on the screen to a text editor.
4.
Define the required
event_register
Tcl command extension.
5.
Add the appropriate namespace under the ::cisco hierarchy.
6.
Program the must defines section to check for each environment variable that is used in this policy.
7.
Program the body of the script.
8.
Check the entry status to determine if a policy has previously run for this event.
9.
Check the exit status to determine whether or not to apply the default action for this event, if a default
action exists.
10.
Set Cisco Error Number (_cerrno) Tcl global variables.
11.
Save the Tcl script with a new filename, and copy the Tcl script to the device.
12.
configure terminal
13.
event manager directory user
{
library path
|
policy path
}
14.
event manager policy policy-filename
[
type
{
system
|
user
}] [
trap
]
15.
Cause the policy to execute, and observe the policy.
16.
Use debugging techniques if the policy does not execute correctly.
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1789
How to Write Embedded Event Manager Policies Using Tcl
Summary of Contents for Catalyst 2960 Series
Page 96: ......
Page 196: ......
Page 250: ......
Page 292: ......
Page 488: ......
Page 589: ...P A R T VI Cisco Flexible NetFlow Configuring NetFlow Lite page 509 ...
Page 590: ......
Page 619: ...P A R T VII QoS Configuring QoS page 539 Configuring Auto QoS page 645 ...
Page 620: ......
Page 750: ......
Page 1604: ......
Page 1740: ......
Page 2105: ...P A R T XII Configuring Cisco IOS IP SLAs Configuring Cisco IP SLAs page 2025 ...
Page 2106: ......
Page 2118: ......
Page 2164: ......