[Olsr-dev] httpinfo uptime

Teco Boot (spam-protected)
Fri Jun 20 10:41:30 CEST 2014


You may be right.

/proc/uptime is correct.

(spam-protected):~# wget -qO- -t 1 -T 5 http://127.0.0.1:8080/config | grep uptime ; cat /proc/uptime |  awk '{print $1 " this is " $1/3600/24 " days"}'
<br>System time: <em>Fri, 20 Jun 2014 08:36:30</em><br>Olsrd uptime: <em>16 day(s) 23 hours 03 minutes 55 seconds</em><br/>
483443.51 this is 5.59541 days

Why is uptime.tv_sec incorrect?

Teco


Op 19 jun. 2014, om 23:25 heeft Ferry Huberts <(spam-protected)> het volgende geschreven:

> 
> 
> On 19/06/14 23:20, Ferry Huberts wrote:
>> I'm guessing you started olsrd with an 'off' system clock, then got an
>> ntp sync and are now looking at the uptime.
>> 
>> If you subtract those 14 years, do you by chance end up on 1-1-2000 0:00?
>> 
> 
> yes you do :-))
> 
> http://www.timeanddate.com/date/durationresult.html?d1=1&m1=1&y1=2000&d2=19&m2=6&y2=2014&h1=0&i1=0&s1=0&h2=21&i2=0&s2=0
> 
>> :-)
>> 
>> On 19/06/14 23:11, Teco Boot wrote:
>>> Recent olsrd is very stable, my olsrd has uptime over 14 years ;-))
>>> 
>>> 
>>> Version: olsr.org -
>>> pre-0.6.7-git_c346897-hash_57ec501e60916bb35e5d4127d457d6fe (built on
>>> 2014-05-01 18:02:25 on nbs-jenkins-wheezy-32)
>>> OS: GNU/Linux
>>> System time: Thu, 19 Jun 2014 21:00:00
>>> Olsrd uptime: 5283 day(s) 20 hours 58 minutes 39 seconds
>>> 
>>> 
>>> Also less high values are invalid, e.g. this one:
>>> 
>>> Version: olsr.org -
>>> pre-0.6.7-git_c346897-hash_57ec501e60916bb35e5d4127d457d6fe (built on
>>> 2014-05-01 18:02:25 on nbs-jenkins-wheezy-32)
>>> OS: GNU/Linux
>>> System time: Thu, 19 Jun 2014 21:03:55
>>> Olsrd uptime: 16 day(s) 11 hours 31 minutes 21 seconds
>>> 
>>> It was up for 5 days.
>>> root      3934     1  0 Jun14 ?        00:31:12 /usr/sbin/olsrd -f
>>> /etc/olsrd/olsrd.conf -d 0
>>> 
>>> 
>>> Something wrong with variable type ?
>>> 
>>> Teco
>>> 
>> 
> 
> -- 
> Ferry Huberts





More information about the Olsr-dev mailing list