Re: [tkined] High volume SNMP poller

From: Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de)
Date: Tue Feb 15 2000 - 11:56:08 MET


>>>>> Szokoli Gabor writes:

Szokoli> I'm working on a generic SNMP poller, for network performance
Szokoli> statistics and a lot more. The number of nodes forces me to
Szokoli> optimise for network utilisation.
 
Szokoli> I'm using scotty2.1.10

Szokoli> That's where my questions start:

Szokoli> 1,Is that the latest version? How "alpha" is the 3.0.0? Are
Szokoli> there major changes? Should I be using that, or the stable
Szokoli> one?

Its alpha. The API has changes and it will change a bit more before
declaring it final. Thats basically why it is alpha.

Szokoli> 2,I am looking for extensions, examples, mostly in the field
Szokoli> of SNMP polling. Is there a more detailed index for such
Szokoli> contributions than the ones I've found so far?

There is a very nice paper on this to be published at the upcoming
NOMS 2000 conference <URL:http://www.comsoc.org/confs/noms/2000/>.
You may want to go there if you happen to be in Hawaii.

Szokoli> 3,I want Tnm's get (n) and getnext (n) NOT to format types
Szokoli> like TimeTicks in sysUptime, I know how to format them back,
Szokoli> but why waste those CPU cycles? I've got hundreds of hosts
Szokoli> to poll for thousands of variables.

3.0.0 does not format TimeTicks anymore.

Szokoli> 4,I seem to have Tcl problems with scotty: the program does
Szokoli> not exit when the script ends, as if I used vwait or wish.

Make sure all your SNMP sessions are properly destroyed. (Otherwise
the interpreter will stay in its event loop.)

Szokoli> 5, This one is pure Tcl: How can my script be avare of
Szokoli> signals sent to it? Perl assigns procedures to signals, can
Szokoli> Tcl do that?

Not in plain Tcl. You either need to write C code (fairly simple) or
you have to use TclX.

Szokoli> 6,I wrote a "smart SNMP walk", one that retrieves multiple
Szokoli> subtrees (tables), with the minimum number of UDP packets
Szokoli> possible (assuming the number of rows to be unknown, like in
Szokoli> ifTable): each snmpnext carries multiple variables, a whole
Szokoli> row. (I need to prepare it for the tooBig error yet, but I
Szokoli> won't use it to get more than 63 columns anyway ) It is about
Szokoli> 2 pages with loads of commnets, and I'm new to TcL. I mean
Szokoli> it's easy, even I did it, and it interfaces more or less like
Szokoli> snmpwalk: callback script, % things regsubst-ed and all. It
Szokoli> works asyncronously for now, you may block with vwait. How
Szokoli> come nobody does it this way? What fatal problem did I
Szokoli> overlook? HP's snmpwalk, the UCD example snmpwalk, even
Szokoli> Tnm's snmpwalk wastes one PDU per variable in each "row" of
Szokoli> the tables. What's wrong with sending a whole row in a
Szokoli> single PDU? (Should I post it here?)

In 3.0.0, you simply do:

   set s [snmp generator -address xxxx]
   $s walk [mib children ifEntry] { puts "%E %V" }

This is all asynchronous - so you can walk hundred of systems
simultaneously if you like. Sure, the walk command does not do tooBig
handling nor does it unpack data from instance identifiers. But there
are mib pack and unpack commands that make this easier to code in
Tcl. The Tkined scripts are smart and walk tables row by row unless an
error (such as tooBig) shows up.

In 2.1.X, you can't do an asynchronous walk row by row. But you can
already do synchrouns walks row by row:

    set s [snmp session -address xxxx]
    $s walk [mib successor ifEntry] { puts $x}

/js

-- 
Juergen Schoenwaelder      Technical University Braunschweig
<schoenw@ibr.cs.tu-bs.de>  Dept. Operating Systems & Computer Networks
Phone: +49 531 391 3289    Bueltenweg 74/75, 38106 Braunschweig, Germany
Fax:   +49 531 391 5936    <URL:http://www.ibr.cs.tu-bs.de/~schoenw/>

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



This archive was generated by hypermail 2b29 : Mon Jan 08 2001 - 15:27:35 MET