Community discussions

MikroTik App
 
miko385
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Fri Mar 17, 2017 10:00 pm

wrong uptime (uptime reset, device didn't)

Thu Sep 30, 2021 3:01 pm

i noticed on 2 of my long time running mikrotiks that their uptime time has been reset, but the devices themselves didn't reboot.
noticed that my LHG shows uptime 4 days, while in fact has been running for about 1.5 years.
same with another device which has been running over 2.5 years without reboot but is showing a shorter uptime (177 days currently, but it has been runningwith no reboot since may 2019).
why is that so?
ubnt devices on same location on same ups normally show uptime of ~750 days.

why is this happening? i have about 5-6 mikrotiks on UPS on important locations, other ~10 or so are on plain wall power so get reset during blackouts.

thanks.
You do not have the required permissions to view the files attached to this post.
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: wrong uptime (uptime reset, device didn't)

Sat Oct 02, 2021 6:37 pm

Line 0 on Router's log indicates that the device is Rebooted ...
Also your Router has either wrong date or its an old screenshot

Do you have any Log information that shows no reboot whereas the Uptime is 1-2 days long so that we can compare to the Log information ?
The log keeps by default a specific number of lines ( 1000 ), so how can you tell that indeed it didn't reboot ?
 
miko385
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Fri Mar 17, 2017 10:00 pm

Re: wrong uptime (uptime reset, device didn't)

Mon Oct 04, 2021 11:00 am

the date in the log is correct - the router rebooted on may 16 / 2020 and has been up since that date.
the last item in log (like winbox login) shows today date.
but uptime in winbox is reset for some reason.

it happened on other machines too, where uptime is reset and starts counting from 0, but device has been up and running for 1+ years with no reset.
You do not have the required permissions to view the files attached to this post.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10221
Joined: Mon Jun 08, 2015 12:09 pm

Re: wrong uptime (uptime reset, device didn't)

Mon Oct 04, 2021 11:30 am

It is quite common for uptimes to wrap after 497 days, when a 32-bit variable is used to count 10ms "clockticks" (100 per second).
After 2^32 ticks (4294967296) it wraps to zero, that is after 4294967296/100/86400 days = 497 days.
In the competitor's product, they even wrap after 49.7 days as they apparently use 1ms ticks.
 
miko385
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Fri Mar 17, 2017 10:00 pm

Re: wrong uptime (uptime reset, device didn't)

Mon Oct 04, 2021 1:24 pm

thanks, didn't know about this detail.
so every 497 days it restarts the uptime count, good to know.
i was eager to see 1000 days uptime.
M5 is now in 797 days, will do a screenshot after 1000 :D
 
pe1chl
Forum Guru
Forum Guru
Posts: 10221
Joined: Mon Jun 08, 2015 12:09 pm

Re: wrong uptime (uptime reset, device didn't)

Mon Oct 04, 2021 2:48 pm

Yes it depends on the environment, sometimes you see this wrap at 497 days, sometimes it just counts to 1000 or more.
E.g. the uptime visible via SNMP often wraps at 497 even when at other places in the system higher values can be shown.
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: wrong uptime (uptime reset, device didn't)

Wed Oct 06, 2021 10:10 pm

It is quite common for uptimes to wrap after 497 days, when a 32-bit variable is used to count 10ms "clockticks" (100 per second).
After 2^32 ticks (4294967296) it wraps to zero, that is after 4294967296/100/86400 days = 497 days.
In the competitor's product, they even wrap after 49.7 days as they apparently use 1ms ticks.
Nice to know that ...

Who is online

Users browsing this forum: Google [Bot], homerouter, Jonty, Kuwait, raiser, sbert, vingjfg and 116 guests