Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

tcl script

Does anyone know if its possible to run a .tcl script via snmp. Would like to write a scripts to add or delete a route and it needs to be able to be run by someone with priv level 1 access or from a network manager.

4 REPLIES
Cisco Employee

Re: tcl script

This is not possible directly, but you could use the CISCO-CONFIG-COPY-MIB to upload a config snippet which contains:

do tclsh flash:script.tcl

end

Assuming the script is not interactive, this will execute the script. See http://www.cisco.com/en/US/tech/tk648/tk362/technologies_configuration_example09186a0080094aa6.shtml for more details on using the CONFIG-COPY-MIB.

A safer method (assuming the device supports EEM 2.4 or higher) is to use the EEM RPC system to execute EEM policies remotely. More on EEM 2.4, and EEM RPC can be found at http://www.cisco.com/en/US/prod/collateral/iosswrel/ps6537/ps6555/ps6815/whitepaper_c11-492226.html . I have even written a Perl API to interface with EEM RPC which can be downloaded at http://forums.cisco.com/eforum/servlet/EEM?page=eem&fn=script&scriptId=1183 .

New Member

Re: tcl script

Thanks - if we used the SNMP MIB can I run that script without being in enable mode?

Cisco Employee

Re: tcl script

Yes, but you will need SNMP read-write credentials on the manager. That is, an SNMP SET operation is required.

New Member

Re: tcl script

ok thanks for your help

374
Views
0
Helpful
4
Replies