On Thursday 16 May 2002 04:01 pm, Brian Fahrlander wrote:
> I just cleaned up the /etc/snmpd/snmpd.conf file to keep from
> distracting anyone. Here's the file to get you started:
>
> ###########################################################################
>#### #
> # snmpd.conf:
> # An example configuration file for configuring the ucd-snmp snmpd agent.
> #
> ###########################################################################
>#### com2sec local localhost private
> com2sec mynet 192.168.1.0/24 public
> com2sec public default public
>
> # sec.model sec.name
> group mygroup v1 mynet
> group mygroup v2c mynet
> group mygroup usm mynet
> group local v1 local
> group local v2c local
> group local usm local
> group public v1 public
> group public v2c public
> group public usm public
>
> # incl/excl subtree mask
> view all included .1 80
> view system included system fe
> view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
>
> # context sec.model sec.level prefix read write notify
> access mygroup "" any noauth exact mib2 none none
> access public "" any noauth exact system none none
> access local "" any noauth exact all all all
>
> syslocation 1830 Alta Vista Drive, Evansville, IN
> syscontact Brian Fahrlander <[EMAIL PROTECTED]>
> ------------------------------------------------------------------------
>
> Then, I did a restart of snmpd (/etc/rc.d/init.d/snmpd restart).
> Notice the last two lines are localized; ALSO NOTICE THIS OPENS UP MORE
> INFORMATION THAN YOU WANT TO SHARE. Read up on the docs...trim the access
> to your own needs; I had a more clear config file, but that machine was
> pulled down to make way for another LTSP server. :(
>
> Once you have the above worked out, use this on the same machine,
> proving:
>
> 1. It works
> 2. It provides an absurd amount of information to anyone with a mib
> browser
>
> snmpwalk 127.0.0.1 public | less
>
> I'll work on cleaning it up soon; right now I have to go get my
> daughters at my ex-wife's house and go see Star Wars!
>
> :)
Brian,
You clearly know your SNMP stuff! In going through the EXAMPLE.conf file
supplied with 4.2.5 ucd-snmp from sourceforge, it looks like we might be
able to collect the raw data needed from the clients by capturing the data in
three tables maintained in the /proc filesystem
/proc/stat
/proc/meminfo
/proc/net/dev
I added the following three lines to your config file:
exec .1.3.6.1.4.1.2021.50 meminfo /bin/sh /tmp/meminfo.sh
exec .1.3.6.1.4.1.2021.51 kernelstats /bin/sh /tmp/kernelstats.sh
exec .1.3.6.1.4.1.2021.52 netinfo /bin/sh /tmp/netinfo.sh
Each of the scripts "cats" the corresponding file in the /proc filesystem,
and the data can be obtained with the command
snmpwalk -v 1 ws004 public .1.3.6.1.4.1.2021.50
[skip@sgaede skip]$ snmpwalk -v 1 localhost private .1.3.6.1.4.1.2021.50
enterprises.2021.50.1.1 = 1
enterprises.2021.50.2.1 = "meminfo"
enterprises.2021.50.3.1 = "/bin/sh /tmp/meminfo.sh"
enterprises.2021.50.100.1 = 0
enterprises.2021.50.101.1 = " total: used: free: shared: \
buffers: cached:"
enterprises.2021.50.101.2 = "Mem: 261877760 257609728 4268032 0 \
16596992 67489792"
enterprises.2021.50.101.3 = "Swap: 254943232 246378496 8564736"
enterprises.2021.50.101.4 = "MemTotal: 255740 kB"
enterprises.2021.50.101.5 = "MemFree: 4168 kB"
enterprises.2021.50.101.6 = "MemShared: 0 kB"
enterprises.2021.50.101.7 = "Buffers: 16208 kB"
enterprises.2021.50.101.8 = "Cached: 61908 kB"
enterprises.2021.50.101.9 = "SwapCached: 4000 kB"
enterprises.2021.50.101.10 = "Active: 45356 kB"
enterprises.2021.50.101.11 = "Inactive: 184456 kB"
enterprises.2021.50.101.12 = "HighTotal: 0 kB"
enterprises.2021.50.101.13 = "HighFree: 0 kB"
enterprises.2021.50.101.14 = "LowTotal: 255740 kB"
enterprises.2021.50.101.15 = "LowFree: 4168 kB"
enterprises.2021.50.101.16 = "SwapTotal: 248968 kB"
enterprises.2021.50.101.17 = "SwapFree: 8364 kB"
enterprises.2021.50.101.18 = "NrSwapPages: 2091 pages"
enterprises.2021.50.102.1 = 0
I did the work on the server, and am now compiling the code for the clients.
What do you think: is this sufficient or should we create a custom MIB?
Thanks,
Skip
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_____________________________________________________________________
Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto:
https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help, try #ltsp channel on irc.openprojects.net