On 1/18/06, Dave Shield <[EMAIL PROTECTED]> wrote:
> On Wed, 2006-01-18 at 19:11 +0530, Suma C wrote:
> > For Linux , heres wt I have done :
>         [snip]
> > Have tested it on my system(FC1 2.6.9 )  for sysUpTime
>
> Tested in what way?
> What *exactly* did you test - what did you expect to see,
> and what did you actually see?   What sorts of time-shift
> have you tested this with?  Forward?  Backwards?  Small
> shifts?  Large shifts?
>
I know  my previous mail was very very *vague*!!!!!
Heres how  I tested :

1. GET  sysUpTime: .....added a printf  in the  GET code to display
the netsnmp_get_agent_uptime ( the previous function o/p) as well as
the o/p from the modified  netsnmp_get_agent_uptime function. They
matched ( with a difference of 4 centiseconds ...not sure why )

the code : (in system_mib.c)
case UPTIME:
        ulret = netsnmp_get_agent_uptime_old(); /*the previous implementation*/
        printf("OLD UPTIME :%ld\n",ulret);
        ulret = netsnmp_get_agent_uptime(); /*the modified function*/
        printf("NEW UPTIME :%ld\n",ulret);
       return ((u_char *) & ulret);
O/P:
OLD UPTIME :6672
NEW UPTIME :6668


2 .For traps : Generate  a trap (which was already there ). On the
manager side checked the  trap info...the uptime matches with the
sysuptime

3. Changed the system time ( the date to the next day's) : carried on
the above two tests ...the values reflected were the right ones (not
some  huge value)

> > What other implications do I need to see...checked for traps too.
>
> You say you tested sysUpTime.
> What other MIB objects did you test?
>
> There are various objects that make explicitly reference
> to sysUpTime.  Have you checked any of those to see whether
> they work as expected.  (Which implies that you must first
> be clear about how you'd expect them to work!)
>
For this I just checked in the net snmp source for all the references
to netsnmp_get_agent_uptime ....found its being used in agent_trap.c.
Thats why the test on trap.


> Also, various delta-values objects (counters, etc) rely
> on sysUpTime and similar MIB objects to indicate
> discontinuities.   Have you tested these - if so, how?
>
hmm...Iam not sure I understand u
> And that's just of the top of my head - I haven't had
> the chance to sit down and think through properly about
> what the implication are.  (Let alone discuss this with
> any of my colleagues).   Now perhaps you see why I'm being
> a little cautious about just blindly making this change
> to the main Net-SNMP agent?
>
Yeah ...its just an idea.... and drop it if u r not interested
> Dave
>

Goodbye
Suma


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to