We are looking for something similar that would operate in Microsoft Windows
using the winsock interface. It does not have to use Tcl. A commercial
product would be OK. Does anyone have any suggestions or pointers?
Ted Haines
Bolt Beranek and Newman
Cambridge MA
#!/usr/local/bin/scotty -f
if { $argc != 1 } then {
puts "Usage: ipstat <hostname>"
exit
}
puts "IP interface status for $argv"
proc val {v n} { return [lindex [lindex $v $n] 2] }
set ses [snmp session -address $argv]
$ses walk x {ipAdEntAddr ipAdEntIfIndex} {
set ifIndex [val $x 1]
set ifStat [$ses get ifOperStatus.$ifIndex]
puts "[val $x 0] ($ifIndex): [val $ifStat 0]"
}
exit