Prev: 871W
Next: world2015.org
From: stephan on 11 Feb 2010 15:40 Hi All, For an automated backup of a running config I try to use EEM. But cant figure out how to add the current date and time to the filename. event manager environment mybackuploc tftp://192.168.200.11/ event manager environment myfilename cr-u1-cfgbkp event manager environment myfilenameext .txt event manager environment dash - event manager applet bkp_when_changed trap event cli pattern "wr" sync no skip no action 1.0 cli command "enable" action 2.0 cli command "config t" action 3.0 cli command "file prompt quiet" action 4.0 cli command "end" action 5.0 cli command "copy running $mybackuploc$myfilename$myfilenameext" action 6.0 cli command "config t" action 7.0 cli command "no file prompt quiet" action 8.0 cli command "end" Is there a way to read the current time and use it as a env-variable? somethink like: event manager environment currdate $$$date$$$ event manager environment currtime $$$time$$$ so, that the $mybackuploc$myfilename$dash$currdate$dash$currtime$myfilenameext creates a file like cr-u1-cfgbkp-02-11-2010-21.37.txt on the tftp-srvr? Any help would be very much appreciated. stephan
From: Alexander Romanov on 12 Feb 2010 22:06 12.02.10 8:40, stephan �����: > Hi All, > > For an automated backup of a running config I try to use EEM. > But cant figure out how to add the current date and time to the filename. maybe a bad answer, but try to use RANCID - Really Awesome New Cisco confIg Differ http://www.shrubbery.net/rancid/ i use it for two years, about hundred of different devices - 26xx, 28xx, 29xx, 72xx, etc very good soft --- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---
From: stephan on 13 Feb 2010 11:51 Hi Alexander > maybe a bad answer, but > try to use RANCID - Really Awesome New Cisco confIg Differ > http://www.shrubbery.net/rancid/ No, its a good answer. As good as Kiwi-CatTools. Thats the app I used. My idea was to work with a built-in feature then using an external app. Thanks anyway. /s
From: bod43 on 15 Feb 2010 22:15 On 13 Feb, 16:51, stephan <stephan.stu...(a)hispeed.ch> wrote: > Hi Alexander > > > maybe a bad answer, but > > try to use RANCID - Really Awesome New Cisco confIg Differ > >http://www.shrubbery.net/rancid/ > > No, its a good answer. > As good as Kiwi-CatTools. Thats the app I used. > > My idea was to work with a built-in feature then using an external app. > > Thanks anyway. > /s If you switch to using tcl scripts from EEM then you can do anything you want. For example, as a way to learn a bit about tcl I worte a "game of life" in tcl that I could run by pasting the code into the router. (Of course the code could have been put in a file on the flash, but I have still not got the necesary round tuits.) Was way cool seeing the evolving lifescape scrolling up the console screen. Sadly, it was not enough to get me a job as a test engineer chez cisco:) http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life I got the idea from a game of life written in postscript that you could run on a printer. The lifescape emerged on pieces of paper:-))) If your router does tcl, you can see some nice sample scripts as follows:- router#show event manager policy available No. Type Time Created Name 1 system Thu Feb 7 06:28:15 2036 ap_perf_test_base_cpu.tcl 2 system Thu Feb 7 06:28:15 2036 no_perf_test_init.tcl 3 system Thu Feb 7 06:28:15 2036 sl_intf_down.tcl 4 system Thu Feb 7 06:28:15 2036 tm_cli_cmd.tcl 5 system Thu Feb 7 06:28:15 2036 tm_crash_reporter.tcl 6 system Thu Feb 7 06:28:15 2036 tm_fsys_usage.tcl router# show event manager policy available detailed ap_perf_test_base_cpu.tcl or whatever the script you want to view is called. There are also sample scripts here - http://forums.cisco.com/eforum/servlet/EEM?page=search_results&fn=topdownloads&catId=0&count=20 EEM info - http://www.cisco.com/en/US/products/ps6815/products_ios_protocol_group_home.html
|
Pages: 1 Prev: 871W Next: world2015.org |