Well, first you have to setup a table into which you want to collect stuff.
Here's a table I use:
msqlsel $db "create table hub$ip ( month int, day int, hour int, minute int, sec
ond int, fps int, cols char(5), crc int, align int, runts int, giants int)"
Then you have to collect data (using scotty) and store it (using msql)
Here's a sample:
set db [msqlconnect euclid]
msqluse $db network
set s [snmp session]
$s configure -timeout 2 -retries 2
$s configure -address $hubaddress
set systype [lindex [lindex [$s get system.1.0] 0] 2]
set colls($hub) [expr [lindex [lindex \
[$s get dot3StatsSingleCollisionFrames.5] 0] 2] \
+ [lindex [lindex [$s get dot3StatsMultipleCollisionFrames.5] 0] 2]]
set tstuff [fmtclock [getclock] "%m, %y, %d, %H, %M, %S"]
set frames($hub) [lindex [lindex [$s get dot1dTpPortOutFrames.5] 0] 2]
set octets($hub) [lindex [lindex [$s get ifOutOctets.5] 0] 2]
....
....
msqlsel $db "insert into $hubname (month, year, day, hour, minute, second, fps, cols) \
values ($tstuff, $fps, '$cols')"
(Of course, this is just a fragment of a larger piece of code that loops
over all hubs/probes in a list, tries to figure out what kind of hub/probe
it is, collects the appropriate data, formats it, and stores it in the
database - so, it may not work as shown, but it will give you a rough idea
of how 'we' do it)
-- ____________________________________________________________________________ Doug Hughes Engineering Network Services System/Net Admin Auburn University doug@eng.auburn.edu
-- !! 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.