[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: FreeBSD SNMP OID Question
From:       Dan Nelson <dnelson () allantgroup ! com>
Date:       2013-09-19 15:08:54
Message-ID: 20130919150854.GC97298 () dan ! emsphone ! com
[Download RAW message or body]

In the last episode (Sep 18), Mark Saad said:
> On Tue, Sep 17, 2013 at 2:11 PM, Dan Nelson <dnelson@allantgroup.com> wrote:
> > In the last episode (Sep 17), Mark Saad said:
> > >   Can someone shed some light on a OID mystery I have. I am using
> > > cacti to trend some snmp data off a bunch of FreeBSD servers.
> > >
> > > I noticed someone added a graph to a cluster for UCDavis - ssRawSwapIn /
> > > UCDavis - ssRawSwapOut  . The OIDs are .1.3.6.1.4.1.2021.11.62 /
> > > .1.3.6.1.4.1.2021.11.63  Their description is  Number of blocks swapped
> > > in / Number of blocks swapped out .
> >
> > > # snmpwalk -c MyPassword -v2c -Of server00 .1.3.6.1.4.1.2021.11.62.0
> > > .iso.org.dod.internet.private.enterprises.ucdavis.systemStats.ssRawSwapIn.0 = Counter32: 3588
> >
> > That's a counter, so it's reporting the total number of pageins since
> > boot (or since snmp started, depending on the particular value you're
> > fetching).  Cacti should be able to poll that OID and graph the
> > difference over time to show pageins/sec.
> 
>   I guess to better refine the question , what is raw swap vs  the sysctl
> vm.stats.vm.v_swappgs{out/in} .  I see that net-snmpd has ssSwapOut and
> ssRawSwapOut .  where raw is the current value and "cooked"
> (ssswap{out/in}) is the average value .  I am just at a loss when I am
> trying to debug this graph issue as the "cooked" oid returns negative ints
> and the raw returns positive ints, but the sysctrls and top show no usage
> ?
> 
> Has anyone seen this before ?

I don't know.  I would have expected that ssRawSwapIn and ssRawSwapOut would
have mapped directly to the sysctls vm.stats.vm.v_swappgsout
vm.stats.vm.v_swappgsin, but apparently they don't.  It's probably a bug in
net-snmp; the vm stats code is pretty hairy due to having to support every
version of every Unix out there, and no standard API for fetching stats like
this.

The values don't match on any of my systems, either.

$ sysctl vm.stats.vm | grep swappgs
vm.stats.vm.v_swappgsout: 1088669
vm.stats.vm.v_swappgsin: 85576

$ snmpget localhost ssRawSwapOut.0 ssRawSwapIn.0
enterprises.ucdavis.systemStats.ssRawSwapOut.0 = Counter32: 115135
enterprises.ucdavis.systemStats.ssRawSwapIn.0 = Counter32: 5671


-- 
	Dan Nelson
	dnelson@allantgroup.com
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic