snmpget's don't time out

Dave Siegel (dave@rtd.net)
Fri, 25 Jul 1997 12:57:19 -0700 (MST)

I have a problem with scotty whereby if a host is unavailable, the scotty
process will hang until it is kill -HUP'd.

I have tried manually adjusting the timeout parameter, but under no
circumstances does scotty timeout correctly.

Is this a scotty bug? Is there a workaround to this problem?

Here is our smallest script that we use that suffers from this problem.
I thank you in advance for any solution you can provide.

Dave

--------

if {$argc != "3"} {puts "usage: <program name> <hostname> <community string> <if
Index>"}

# snmp configuration

mib load cisco.mib
set host [snmp session]
set site [lindex $argv 0]
set commun [lindex $argv 1]
set ifIndex [lindex $argv 2]
$host configure -address $site -community $commun

# retrieve stats with snmp

set avgIn [lindex [lindex [$host get locIfInBitsSec.$ifIndex] 0] 2]
set avgOut [lindex [lindex [$host get locIfOutBitsSec.$ifIndex] 0] 2]
set timeStamp [getclock]

set logfile [open /var/log/stats/$site-$ifIndex a]
puts $logfile "$timeStamp\t$avgIn\t$avgOut"
close $logfile

exit

-- 
Dave Siegel						dave@rtd.net
President						dave@pager.rtd.com
RTD System & Networking, Inc.				(520)388-9000 x130
Communication Solutions For a New Age		http://www.rtd.com/~dsiegel/
--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.