Show pageOld revisionsBacklinksExport to PDFODT exportBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Cisco TCL/EEM HowTo ====== Some pointers for TCL/EEM setup. ===== Basic EEM config ===== <code> (config)# event manager directory user policy "flash0:/" # show event manager directory user library (config)# event manager policy monitorCO.tcl # show event manager policy registered (config)# no event manager policy monitorCO.tcl # show event manager history events # event manager run monitorCO.tcl </code> ===== To execute monitor in a loop ===== <code> (config)# event manager environment monitorCO_INTERVAL 30 # show event manager environment </code> ===== How to get the TCL code to Cisco flash ===== - Start tclsh; - Enter <code tcl> puts [open "flash0:/monitorCO.tcl" w+] { </code> Do **NOT hit the ENTER key** at the end of the line. - Copy-paste the file contents. The contents should not include unmatched curly right brackets (every curly right bracket has to be preceded by a matching curly left bracket). - After the file contents have been pasted, enter }, and press ENTER. - End the tclsh session with tclquit. Check that your file was correctly inserted to flash: <code> # more monitorCO.tcl </code> ===== kron example ===== <code> ! kron occurrence minute in 1 recurring policy-list monitorCOrun ! kron policy-list monitorCOrun cli event manager run monitorCO.tcl ! </code> cobgp/cisco_tcl_eem Last modified: 2013-09-30T15:49by kuski