uptime anomaly on Beaglebone

I have noticed that on my Beaglebone Linux demo image that “uptime” returns an incorrect result, but “/proc/uptime” appears to be correct. Is this just a bug in uptime or indicative of something more serious?

root@beaglebone:~# uptime
14:33pm up 4380 days 17:29, 1 user, load average: 0.65, 0.56, 0.23
root@beaglebone:~# cat /proc/uptime
129.50 108.64
root@beaglebone:~# date
Fri Dec 30 14:34:14 GMT 2011
root@beaglebone:~#

It is a tribute to the awesome stability of embedded Linux :wink:

Yeah I noticed the same thing on mine, it's most likely a kernel bug
somewhere
because if you run dmesg you'll see the timestamps for each printk
that look reasonable.

I've looked at stuff like this for a different arm soc, so I might try
to figure it out if I get time.

Sonny

...and I was so impressed that mine had been running for 12 years :slight_smile:

Hey, that's exactly when the century started. Sort of an inverse Y2K
bug.

Yeah after re-reading the original message which points out that /proc/
uptime is correct and dmesg is correct points to the uptime utility
itself. The fact that it points to when the century started is pretty
suspect too -- sounds like it might be related to RTC somehow?

I'll put something besides angstrom on and see what I get out of
uptime there.

Uptime for ubuntu on beaglebone is normal.

Yeah after re-reading the original message which points out that /proc/
uptime is correct and dmesg is correct points to the uptime utility
itself. The fact that it points to when the century started is pretty
suspect too -- sounds like it might be related to RTC somehow?

I'll put something besides angstrom on and see what I get out of
uptime there.

I installed Debian sid, and that gets it right. Looks like an Angstromism.

David

I noticed that /usr/bin/uptime is a symlink link to uptime.coreutils. Changing it to uptime.procps works correctly. Looks like the culprit is in coreutils.

Dave L.

It seems that using the latest image and do a opkg update and upgrade
will solve the problem.

I tried your suggestion below, and still get the following:

root@beaglebone:~# uptime.coreutils
  14:22pm up 4385 days 16:07, 1 user, load average: 0.01, 0.04, 0.05
root@beaglebone:~# uptime.procps
  14:22:17 up 38 min, 1 user, load average: 0.01, 0.03, 0.05
root@beaglebone:~#

I have installed Angstrom-Cloud9-IDE-eglibc-ipk-v2011.12-core-beaglebone-2011.12.26.img.gz and run opkg update/upgrade. Is there a later image?

That's expected, what does plain 'uptime' give you?

I notice that plain uptime is now a symlink to uptime.procps, so this is now correct. My concern is that why uptime.coreutils, which gives the correct time on my Beagleboard xM, gives this erroneous time on my Beaglebone. Also, I suspect that other programs might use coreutils, one example being systemctl, which reports similar erroneous times:

root@beaglebone:~# systemctl status cloud9.service
cloud9.service - Cloud9 IDE
Loaded: loaded (/lib/systemd/system/cloud9.service; enabled)
Active: active (running) since Mon, 03 Jan 2000 22:14:14 +0000; 12 years and 0 months ago
Main PID: 101 (node)
CGroup: name=systemd:/system/cloud9.service
└ 101 /usr/bin/node /usr/share/cloud9/bin/cloud9.js -l 0...
root@beaglebone:~#