Skip to contentSkip to conversation

utmp rollover at 496 days?

DISCUSSION jim roy 4 participants 4 messages May 9, 2002

lore
Share & tools
lore

jim roy

author
#0 lore raw

I have two machines which have not been rebooted sind Dec 2000.

At day 497, on both machines, the uptime command began anew at day 0.

Anybody know what's up with that?

Jim Roy

#1 lore raw
Quoted 1 line · you

I have two machines which have not been rebooted sind Dec 2000.

Way to go.

Quoted 1 line

At day 497, on both machines, the uptime command began anew at day 0.

Don't you think it's time for a good cleaning and maybe replace a hard drive or two by now?

Quoted 1 line

Anybody know what's up with that?

Guessing Linus didn't figure you would run it so long, with out some kind of maintenance, so using a very short integer to count days would save space in the kernel. I've only seen this question asked about 3 times, and once was for an SCO UNIX (maybe XENIX) that would crash on day 498.

The 2.4.19 kernel has or is patched to fix this.

#2 lore raw

On Thu, May 09, 2002 at 11:09:05AM -0700, Scott Taylor wrote:

| At 10:53 AM 09/05/2002, you wrote:
| 
| >I have two machines which have not been rebooted sind Dec 2000.
| 
| Way to go.

Indeed! And I thought 200 days was good :)

| >At day 497, on both machines, the uptime command began anew at day 0.
| 
| Don't you think it's time for a good cleaning and maybe replace a hard 
| drive or two by now?

Nah, if it still works, leave it be. Although it has rolled over, so it doesn't look as "eleet" when you type "uptime" any more...

| >Anybody know what's up with that?
| 
| Guessing Linus didn't figure you would run it so long, with out some kind 
| of maintenance, so using a very short integer to count days would save 
| space in the kernel.  I've only seen this question asked about 3 times, and 
| once was for an SCO UNIX (maybe XENIX) that would crash on day 498.

There's another way to track uptime now. It requires a very technical tool known as a "black marker". Every time the counter rolls, make a mark on the computer's casing :-)

Signature · 4 lines
This punishment is not boring and pointless  
 
6AD6 865A BF6E 76BB 1FC2 | www.piku.org.uk/public-key.asc
E4C4 DEEA 7D08 D511 E149 | www.piku.org.uk [email protected] (rot13'd)
#3 lore raw
In reply to jim roy
Quoted 8 lines · jim roy

I have two machines which have not been rebooted sind Dec 2000.

At day 497, on both machines, the uptime command began anew at day 0.

Anybody know what's up with that?

Jim Roy

Hi,

This is a known problem with older kernels.
uptime is kept in a 32 bits counter with a resolution of 1/100th of a second so it rollover after 497 days.

It has been discussed in linux-kernel mailing list a few months ago and I think it is now fixed in 2.4 kernel.

Regards
--
Joseph Bueno
NetClub/Trader.com