[tkined] Re: Change port# and New Suggestion

Vincent Qing Yin (vyin@cs.ubc.ca)
Thu, 23 Jul 1998 23:30:35 -0700 (PDT)

# Vincent> How do we make tkined query a port# other than the default
# Vincent> 161? I tried the menu "SNMP Monitor -> Set SNMP Parameter",
# Vincent> but it doesn't seem to work.
#
# It works fine here.
# You can however define SNMP parameters as node attributes.
#
# Attribute name: SNMP:Config
# Attribute value: -port 8042 -address feist.ibr.cs.tu-bs.de

Yes, now it works with SNMP:Config. Thanks.

But the menu "SNMP Monitor/Browser -> Set SNMP Parameter" doesn't
work with the "SNMP Tree" menu. I suppose they are meant to be
different things. Nevertheless, the "SNMP Tree" menu doesn't
have an option to set the port#. So the only way to change the
port# in "SNMP Tree" is through SNMP:Config attribute as you
mentioned. Is that right?

I'd like to suggest a small feature to the script tnm/library/snmp.tcl...

When viewing a MIB tree (script: tnm/examples/mibtree), we can
bring up a pop-up menu on a MIB node and choose menu "Show MIB
Variable". That'll query the agent and display the returned
value in a text widget like the following:

fs1.cs.ubc.ca [142.103.7.1] [Thu Jul 23 23:19:42 PDT 1998]:
sysLocation.0 : CICSR/CS 155

The first line tells us the agent host and time. I'd *really*
like to see the port #, too. For example:
fs1.cs.ubc.ca [142.103.7.1 : ***161***] ...

To do that, we just need to change one line in the script
tnm/library/snmp.tcl
from
writeln "$host \[$ip\] \[[clock format [clock seconds]]\]:"
to
writeln "$host \[$ip:$port\] \[[clock format [clock seconds]]\]:"
where $port is obtained with
set port [$s cget -port]

That simple addition of port# will make the whole thing a lot more
informative.

Could you consider doing that? Thanks!

-- 

Q Vincent Yin | Repeat vyin@cs.ubc.ca | delete(next->bug); (604) 876-9096 (H) | Until 0 = 1;

--
!! 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.