On Tue, 21 Mar 2006 11:52:32 +0100 Malcolm wrote:
MT> We have used the getkstat function to retrieve the ipackets and opackets
MT> values.
MT> 1) From previous answers:
MT> "The code takes care of using a 32 bit counter and watching for it to wrap,
MT> and updating the
MT> hc counters."
MT> Q: So do we just enter the 32 bit value that is retrieved using kstat into
MT> entry -> stats.ibytes.low


MT> What do I have to put in entry -> stats.ibytes.high if this is the case ?

Nothing. It should have been initialized to 0.

MT> 2) The values are only updated after roughly 27 seconds. You have to wait
MT> this amount of time before a new value is posted.

The getkstat values, or snmpd value?

MT> Q1: Where can one modify this value modified ?
MT> Q2: Why is this value roughly 25 seconds ?

If it's the snmpd value, because that should be frequent enough that even a
gigabit interface wouldn't have time to wrap a 32bit counter.

MT> Q3: It seems that snmp_api.c (/snmplib directory) funtion
MT> snmp_sess_select_info deals with this. What do we need to do to make this
MT> quicker ??

ifTable_data_access.h:#define IFTABLE_CACHE_TIMEOUT 30

Keep in mind that you are increasing the load on the system by more frequent

MT> 3) Why do we have to multiply 308 by ipackets to get ifInOctets and if
MT> InHCoctets?

I have no earthly idea. That's old code, and I think maybe the byte counts
weren't available, and so they are fudging it based on packets and a guess at
average packet size. If you can get real values, go for it.

NOTE: messages sent directly to me, instead of the lists, will be deleted
unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie

You are lost in a twisty maze of little standards, all different.

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Net-snmp-coders mailing list