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

List:       net-snmp-bugs
Subject:    [ net-snmp-Bugs-408388 ] not enough solaris snapshot data moved
From:       noreply () sourceforge ! net
Date:       2001-03-15 21:31:51
[Download RAW message or body]

Bugs item #408388, was updated on 2001-03-13 16:32
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=112694&aid=408388&group_id=12694

Category: agent
Group: None
>Status: Closed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Wes Hardaker (hardaker)
Summary: not enough solaris snapshot data moved

Initial Comment:
ucd-snmp 4.2. 
Solaris 2.6,2.7, 8

Within the update_stats routine of vmstat_solaris2.c in
the
ucd-snmp mibgroup of the agent, an insufficient amount
of
snapshot data is being moved within the snapshot data
array at the
end of each poll interval.  As a result, css_old, which
points to
snapshot[number_of_snapshots], will never be updated
after
POLL_VALUES polls have occurred since start of the
agent since
only (POLL_VALUES - 2) amount of data is moved.

I found this by setting POLL_VALUES to 1 so that
calculations
would be based over 1 minute as opposed to 5 minutes.

Currently the data moved is performed by:

memmove(&snapshot[1], &snapshot[0], (size_t)(((char
*)&snapshot[POLL_VALUES - 1]) - ((char
*)&snapshot[0])));

moves only (POLL_VALUES - 2) amount of data.

As a correction, change it to:

memmove(&snapshot[1], &snapshot[0], (size_t)(((char
*)&snapshot[POLL_VALUES ]) - ((char *)&snapshot[0])));

which will move (POLL_VALUES - 1) amount of data.

----------------------------------------------------------------------

Comment By: Wes Hardaker (hardaker)
Date: 2001-03-15 13:31

Message:
Logged In: YES 
user_id=76242

Thanks for the bug report!  We've fixed the problem for the next release of the net-snmp package.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2001-03-13 17:06

Message:
Logged In: NO 

Oops, gave wrong amounts moved but the bug is there and the fix is correct. Current amount moved is 
(POLL_VALUES - 1) and should be POLL_VALUES.  Calculations are made between snapshot[0] and 
snapshot[number_of_snapshots].  Example: If POLL_VALUES = 5, then number_of_snapshots will become a 
maximum value of 5.  So ... calculations will be made between snapshot[0] and snapshot[5].  Currently 
the memmove will only move the memory in snapshot[0] thru snapshot[3].  It fails to move the memory in 
snapshot[4] which is the 5th (or reference value) that needs to be moved into snapshot[5].

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=112694&aid=408388&group_id=12694

_______________________________________________
Net-snmp-bugs mailing list
Net-snmp-bugs@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/net-snmp-bugs

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

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