cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1562
Views
0
Helpful
5
Replies

File command doesnt work in 28XX series router

Shri2
Level 1
Level 1

Hello,

I was trying to get output of tracert and ping then send the result to flash.

below is the snippet of EEM script. It works fine with 38XX series router however it doesnt work with 28XX router.

 

Is there any other way to achieve the requirement with 28XX router ?

 

 action 5.3    cli command "ping $_sub2"

 action 5.4    file open fd flash:TSIP.txt a

 action 5.5    file write fd "$_cli_result"

 action 5.6    file close fd

 action 5.7    cli command "traceroute $_sub2"

 action 5.8    file open fd flash:TSIP.txt a

 action 5.9    file write fd "$_cli_result"

 action 5.91   file close fd

5 Replies 5

Cristian Matei
VIP Alumni
VIP Alumni

Hi,

 

   What exactly does not work? It does not write anything, or it can't append? See if the file "TSIP.txt" exists in flash, and delete it first. Run the following debug when EEM runs and post the debug output: "debug event manager action cli".

 

Regards,

Cristian Matei.

It doesnt accept command "file", as soon as i enter "file", it says invalid.

Hi,

 

    Is there a difference between the EEM version of 3800 and 2800? Use "show event manager version" for that. If it is, can you upgrade the IOS code on the 2811 to be the same as on the 3800, to get the same EEM version?

 

 

Regards,

Cristian Matei.

sorry, file command is working in 29/39XX series router. Yes there is difference in EEM version.
38XX/28XX - is using IOS 15.1(4)M12a- EEM version 3.20- file command doesnt accept
29XX/39XX - is having IOS 15.4 or 15.6 - EEM version 4.0 - file command works.

as we know cisco stopped supporting 28/38XX series router. So is there any other way of achieving my request with EEM with old router ?

Hi,

 

   Run the latest possible IOS version on 28xx/38xx and see if you get the options in EEM. Otherwise, i have no idea, For "show commands", you could have done the appending from the CLI itself, not needing the "file" option, but for ping/traceroute, this is not an option.

 

 action 5.3    cli command "show version | append flash:TSIP.txt"

 

Regards,

Cristian Matei.