EasyManuals Logo

Cisco Catalyst 2960 Series User Manual

Cisco Catalyst 2960 Series
2288 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1904 background imageLoading...
Page #1904 background image
set rbuf ""
if {[llength $clist] < 1} {
return -code ok $rbuf
}
if {[catch {cli_open} result]} {
return -code error $result
} else {
array set cliarr $result
}
if {[catch {cli_exec $cliarr(fd) "enable"} result]} {
return -code error $result
}
if {[catch {cli_exec $cliarr(fd) "term length 0"} result]} {
return -code error $result
}
foreach cmd $clist {
if {[catch {cli_exec $cliarr(fd) $cmd} result]} {
return -code error $result
}
append rbuf $result
}
if {[catch {cli_close $cliarr(fd) $cliarr(tty_id)} result]} {
puts "WARNING: $result"
}
return -code ok $rbuf
}
proc run_cli_interactive { clist } {
set rbuf ""
if {[llength $clist] < 1} {
return -code ok $rbuf
}
if {[catch {cli_open} result]} {
return -code error $result
} else {
array set cliarr $result
}
if {[catch {cli_exec $cliarr(fd) "enable"} result]} {
return -code error $result
}
if {[catch {cli_exec $cliarr(fd) "term length 0"} result]} {
return -code error $result
}
foreach cmd $clist {
array set sendexp $cmd
if {[catch {cli_write $cliarr(fd) $sendexp(send)} result]} {
return -code error $result
}
foreach response $sendexp(responses) {
array set resp $response
if {[catch {cli_read_pattern $cliarr(fd) $resp(expect)} result]} {
return -code error $result
}
if {[catch {cli_write $cliarr(fd) $resp(reply)} result]} {
return -code error $result
}
}
if {[catch {cli_read $cliarr(fd)} result]} {
return -code error $result
}
append rbuf $result
}
if {[catch {cli_close $cliarr(fd) $cliarr(tty_id)} result]} {
puts "WARNING: $result"
}
return -code ok $rbuf
}
array set arr_einfo [event_reqinfo]
set args $arr_einfo(argc)
set cmds [list]
for { set i 0 } { $i < $args } { incr i } {
set arg "arg${i}"
# Split each argument on the '^' character. The first element is
# the command, and each subsequent element is a prompt followed by
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1822
Configuration Examples for Writing Embedded Event Manager Policies Using Tcl

Table of Contents

Other manuals for Cisco Catalyst 2960 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Cisco Catalyst 2960 Series and is the answer not in the manual?

Cisco Catalyst 2960 Series Specifications

General IconGeneral
LayerLayer 2
Power over Ethernet (PoE)Available on some models
RAM128 MB
Flash Memory32 MB
MAC Address Table Size8000
Operating Temperature0°C to 45°C (32 to 113°F)
Ports24 or 48 x 10/100/1000

Related product manuals