01-20-2011 12:02 AM
hi all experts.
I want to monitor a specific link. Lets say when it goes down, i want to write the following to a file in flash called link_mon.txt
link down <show clock output>
When it gets back up
link up <show clock output>
I know how to write the applets and use sla tracking for monitoring, i just want to know how to write the output(user defined) to a file in flash ?
01-21-2011 09:38 AM
Not a single reply ?
I know no one is obliged to answer but this is very de-motivational for me :-(
Where should i ask questions now :-(
01-22-2011 10:45 AM
What you want to do is not possible using applets. You can write CLI output to flash using the redirect command:
action 1.0 cli command "enable"
action 2.0 cli command "show clock | redirect flash:/output.txt"
But you cannot include your own custom text. For that, you will need to use an EEM Tcl policy. Within the Tcl policy, the code to write the output to flash would look like:
if { [catch {cli_open} result] } {
error $result $errorInfo
}
array set cli $result
set fd [open "flash:/output.txt" "a"]
set output [cli_exec $cli(fd) "show clock"]
puts $fd "link down $output"
close $fd
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: