Re: FreeBSD SNMP OID Question

2013-09-19 Thread Dan Nelson
In the last episode (Sep 18), Mark Saad said:
 On Tue, Sep 17, 2013 at 2:11 PM, Dan Nelson dnel...@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
dnel...@allantgroup.com
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD SNMP OID Question

2013-09-18 Thread Mark Saad
On Tue, Sep 17, 2013 at 2:11 PM, Dan Nelson dnel...@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.


 --
 Dan Nelson
 dnel...@allantgroup.com


Dan
  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 ?

-- 
mark saad | nones...@longcount.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD SNMP OID Question

2013-09-17 Thread Dan Nelson
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.


-- 
Dan Nelson
dnel...@allantgroup.com
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


FreeBSD SNMP OID Question

2013-09-17 Thread Mark Saad
All
  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 .

The mystery is the graphs show pages swapping in and out all the time.
However the sysctls for swap usage show no indication of swap being used

# sysctl -a |fgrep -i swap
vm.swap_enabled: 1
vm.nswapdev: 1
vm.swap_async_max: 4
vm.swap_idle_threshold2: 10
vm.swap_idle_threshold1: 2
vm.stats.vm.v_swappgsout: 0
vm.stats.vm.v_swappgsin: 0
vm.stats.vm.v_swapout: 0
vm.stats.vm.v_swapin: 0
vm.disable_swapspace_pageouts: 0
vm.defer_swapspace_pageouts: 0
vm.swap_idle_enabled: 0

# uptime
 2:51PM  up 203 days, 22:29, 1 user, load averages: 0.00, 0.01, 0.00


# 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



I am using net-snmp-5.4.2.1 on FreeBSD 9.1-RELEASE amd64



See *http://net-snmp.sourceforge.net/docs/mibs/ucdavis.html


-- 
mark saad | nones...@longcount.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org