Re: sysUptime uses gettimeofday

2018-04-03 Thread Pushpa Thimmaiah
Thank you Stuart Henderson. On Tue, Apr 3, 2018 at 3:51 PM, Stuart Henderson wrote: > On 2018/04/03 15:25, Pushpa Thimmaiah wrote: > > Thank you Magnus Fromreide, Anders Wallin and Stuart Henderson for the > reply. > > > > Stuart Henderson, > > > > I am usi

Re: sysUptime uses gettimeofday

2018-04-03 Thread Pushpa Thimmaiah
Thank you Magnus Fromreide, Anders Wallin and Stuart Henderson for the reply. Stuart Henderson, I am using net-snmp.5.7.1. Object sysUpTime uses API netsnmp_get_agent_uptime() and they inturn uses gettimeofday(). If time on device changes after snmpd starts then sysUpTime value is confusing

Re: sysUptime uses gettimeofday

2018-03-28 Thread Anders Wallin
Maybe not the perfect answer, but this is what the FAQ says "The system uptime (sysUpTime) returned is wrong! --- Oh no it's not. The defined meaning of 'sysUpTime' is "the time ... since the *network management

Re: sysUptime uses gettimeofday

2018-03-28 Thread Magnus Fromreide
On Wed, Mar 28, 2018 at 12:49:48PM +0530, Pushpa Thimmaiah wrote: > Hi All, > > I believed that sysUpTime is counter that increments every seconds. But In > net-snmp code , > sysUpTime being calculated as difference between 'snmpd-starttime' and > 'current

sysUptime uses gettimeofday

2018-03-28 Thread Pushpa Thimmaiah
Hi All, I believed that sysUpTime is counter that increments every seconds. But In net-snmp code , sysUpTime being calculated as difference between 'snmpd-starttime' and 'current time' . I would like to know reason for sysUpTime been calculated as difference in time in

RE: sysUpTime discrepancy

2013-09-23 Thread Mike Moreton
he way, what will happen when your device have been up for 497 days? > (TimeTicks overflows at that time) Good point, but it looks like the same is true of hrSystemUptime, and it will be true of SysUptime even if you base it on the Snmpd uptime. > I have to admit I am somewhat surprised to not find

Re: sysUpTime discrepancy

2013-09-19 Thread Magnus Fromreide
On Thu, 2013-09-19 at 07:56 +0100, Mike Moreton wrote: > On Fri, 2013-09-13 at 20:46 +, Andy Cress wrote: > > Folks, > > > > Currently net-snmp measures sysUpTime relative to when the snmpd > > starts, and perhaps that is often the same as the overall system >

Re: sysUpTime discrepancy

2013-09-18 Thread Mike Moreton
On Fri, 2013-09-13 at 20:46 +, Andy Cress wrote: > Folks, > > Currently net-snmp measures sysUpTime relative to when the snmpd > starts, and perhaps that is often the same as the overall system > uptime, but in some systems, the services could be restarted without >

Re: sysUpTime discrepancy

2013-09-13 Thread Magnus Fromreide
On Fri, 2013-09-13 at 20:46 +, Andy Cress wrote: > Folks, > > Currently net-snmp measures sysUpTime relative to when the snmpd > starts, and perhaps that is often the same as the overall system > uptime, but in some systems, the services could be restarted without >

sysUpTime discrepancy

2013-09-13 Thread Andy Cress
Folks, Currently net-snmp measures sysUpTime relative to when the snmpd starts, and perhaps that is often the same as the overall system uptime, but in some systems, the services could be restarted without rebooting, so I am proposing that the sysUpTime should be measured against the /proc

Re: What happens when the SysUpTime counter reaches the maximum value?

2010-06-23 Thread Mike Gibson
Here are a couple of useful links related to this. I think the issue lies in the OID, regardless of Net-SNMP version. https://supportforums.cisco.com/message/573246 http://puck.nether.net/pipermail/cisco-nsp/2007-November/045553.html --

What happens when the SysUpTime counter reaches the maximum value?

2010-06-23 Thread Mamun Nabi
Hello, I would like to know for net-snmp version 4.1.1 what would happen when the SysUpTime reaches the maximum value? If I am not mistaken, this is a 32-bit counter... so the maximum value should be... 2^32-1 ...which roughly computes to about 248.55 days (taking into account TimeTicks at 1

sysUpTime jumps from 24 to 472 on Linux

2007-10-09 Thread arul vadivel
tween latest version and the old version agent/mibgroups/util_func.c and .h file,I can see they modified the return type for sysUptime to u_long from int as given below:<diff>=*** util_funcs.c Tue Sep 24 16:00:08 2002--- /tmp/rh73-ucdsnmp-

Re: sysUpTime

2006-01-19 Thread Suma C
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

Re: sysUpTime

2006-01-18 Thread Dave Shield
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

Re: sysUpTime

2006-01-18 Thread Suma C
(FC1 2.6.9 ) for sysUpTime What other implications do I need to see...checked for traps too. On 1/18/06, Dave Shield <[EMAIL PROTECTED]> wrote: > On Wed, 2006-01-18 at 15:18 +0530, Suma C wrote: > > The function get_uptime is in snmplib/system.c > > > No wonder I couldn&

Re: sysUpTime

2006-01-18 Thread Dave Shield
inherited from CMU. Right from the start, this was handled separately from the 'sysUpTime' MIB object, so it looks as we've just developed the two in parallel. I *think* it should just be a matter of tweaking the 'netsnmp_get_agent_uptime()' routine to use get_uptime(),

Re: sysUpTime

2006-01-18 Thread Suma C
The function get_uptime is in snmplib/system.c Its usage is in apps/snmptrap.c and agent/mibgroup/host/hr_system.c and thanks for considering the mail Regards Suma PS : the code: /* * Returns uptime in centiseconds(!). */ long get_uptime(void) { #if !defined(solaris2) && !defined(linux)

Re: sysUpTime

2006-01-18 Thread Dave Shield
On Mon, 2006-01-16 at 15:01 +0530, Suma C wrote: > Can we use the /proc/uptime or even better the library function : > get_uptime . A library function like that would certainly be an idea. But the big question is how portable it would be. Remember that the Net-SNMP suite runs on a wide variet

sysUpTime

2006-01-16 Thread Suma C
Hi all We are using net snmp version 5.1.1 I have this query on sysUptime: As I understand the sysUpTime gives the time since the agent has started. As I understand from system_mib.c : sysUpTime gets the present time and then compares with the global "starttime" There is a situat

Re: sysUptime

2004-10-26 Thread Wes Hardaker
>>>>> On Tue, 26 Oct 2004 12:46:41 -0400, Binh Nguyen <[EMAIL PROTECTED]> said: Binh> Since sysUpTime is measured in one hundredth of a second, it Binh> will take approximately 497 days for this 32 bit counter to Binh> wrap. 497 days is not long enough because som

sysUptime

2004-10-26 Thread Binh Nguyen
Since sysUpTime is measured in one hundredth of a second, it will take approximately 497 days for this 32 bit counter to wrap.   497 days is not long enough because some telco equipment is let to run for several years.  Am I missing something?  Are there any resolutions/workaround to lift this