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:~#
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.
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.
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.
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.
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:~#