OT: Linux uptime can't be more than 496 days!

Sebastian Edman sebastian at egf.net
Wed Oct 31 02:41:30 PST 2001

At 21:57 2001-10-30, you wrote:


When I pull out my calculator I get nothing that makes sense about this.
An extract from the page above...
--- snip ---
struct sysinfo { long uptime; /* Seconds since boot */
--- snip ---
A long is 4 bytes right? that makes 2^32-1 seconds unsigned and (2^32)/2
seconds signed. Which is 4,294,967,295 (unsigned) and 2,147,483,648
Calculating this to days would mean
2.1 billion /60 /60 /24 = 24,855 days.
hmm, 496? where does that number come from?
And, since this number is signed (as defined above) it would wrap around to 
a negative value...
Well to tell you the truth, I'm a bit lost here. Where does my logic fail?


Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message

More information about the lfs-support mailing list