Uptime wrong

mduser63

macrumors 68040
Original poster
Nov 9, 2004
3,039
30
Salt Lake City, UT
Has anybody seen this problem before? My uptime shows 40 days and 5 hours right now, but I know that my Mac hasn't been up that long. I don't know for sure when I last rebooted it, but it can't be longer ago than July 12, because that's when 10.4.2 was released, and I have that installed. That was only 29 days ago. uptime reported 38 days and some odd hours when I woke up this morning (about 15 hours ago), now it says 40 days, and 5 hours. My system clock is correct, and I haven't reset it or anything. Just wondering if anyone else has seen this behavior and knows why it might be happening.
 

mkrishnan

Moderator emeritus
Jan 9, 2004
29,776
12
Grand Rapids, MI, USA
The major possibility I can see is that your system time was somehow wrong at the time of your reboot, and became right at a later time via network time sync'ing. But that seems hard to believe. Otherwise, I guess it's just a glitch? I haven't seen that.
 

mduser63

macrumors 68040
Original poster
Nov 9, 2004
3,039
30
Salt Lake City, UT
mkrishnan said:
The major possibility I can see is that your system time was somehow wrong at the time of your reboot, and became right at a later time via network time sync'ing. But that seems hard to believe. Otherwise, I guess it's just a glitch? I haven't seen that.
That's a good though, but I don't think that's what happened. AFAIK, my system time has been right for a long time, and I use it as a clock pretty often, so I think I'd notice if it was wrong. Besides that, I've been noticing the uptime going to fast, but not always. Just today it went from 38 days to over 40 days, and I've noticed it do that on other days before today too. Anyway, it's not really a serious problem, but kinda weird nonetheless.
 

iMeowbot

macrumors G3
Aug 30, 2003
8,634
0
Okay, that's weird. The uptime and w commands get their value by comparing the boot time stored in the kernel against the current time.

Try the command sysctl kern.boottime and see what is returned. Does that date make any sense?
 

mduser63

macrumors 68040
Original poster
Nov 9, 2004
3,039
30
Salt Lake City, UT
iMeowbot said:
Okay, that's weird. The uptime and w commands get their value by comparing the boot time stored in the kernel against the current time.

Try the command sysctl kern.boottime and see what is returned. Does that date make any sense?
Hmm...it tells me that the kernel was booted at 13:54 on Jun 24. That would sound OK, except that I've definitely got 10.4.2 and AFAIK, that was released on July 12.
 

iMeowbot

macrumors G3
Aug 30, 2003
8,634
0
Yeah, the update was in July. At least on some of the machines here with 10.4.2, the kernel happens to be dated June 24. Is it possible that your system clock was messed up at boot time and the network clock update corrected it soon thereafter? Your logs may have already rolled over and destroyed the evidence, but it might be interesting to poke around and see if you can find a bogus boot time in console.log or some wierdo offset value from ntpd in system.log or its archives.
 

iMeowbot

macrumors G3
Aug 30, 2003
8,634
0
Plymouthbreezer said:
While on this topic, how do I check record uptime in Terminal?
You can use the command last reboot to get a history for the last month or so. If you want to keep all-time records, you might want to install uptimed (it's available through Fink and DarwinPorts).
 

mduser63

macrumors 68040
Original poster
Nov 9, 2004
3,039
30
Salt Lake City, UT
iMeowbot said:
Yeah, the update was in July. At least on some of the machines here with 10.4.2, the kernel happens to be dated June 24. Is it possible that your system clock was messed up at boot time and the network clock update corrected it soon thereafter? Your logs may have already rolled over and destroyed the evidence, but it might be interesting to poke around and see if you can find a bogus boot time in console.log or some wierdo offset value from ntpd in system.log or its archives.
Well, the problem with this idea is that it's continuing to get ahead of itself, even though my system clock is correct every time I look at it (which is often). Earlier today uptime said 41 days, now it says 48 days, 10 hours, 11 minutes!
 

Attachments

iMeowbot

macrumors G3
Aug 30, 2003
8,634
0
mduser63 said:
Well, the problem with this idea is that it's continuing to get ahead of itself, even though my system clock is correct every time I look at it (which is often). Earlier today uptime said 41 days, now it says 48 days, 10 hours, 11 minutes!
The 48 and some days makes sense for that boot date, which hasn't changed from your last post. Did you check those logs for unusual times?
 

mduser63

macrumors 68040
Original poster
Nov 9, 2004
3,039
30
Salt Lake City, UT
The earliest entry in console.log is the following:

Mac OS X Version 10.4.2 (Build 8C46)
2005-07-16 21:11:36 -0600
2005-07-16 21:11:48.597 SystemUIServer[216] lang is:en

That's after selecting console.log, hitting reload and then sliding the slider all the way to the right (to load the whole log) in Console.
 

yellow

Moderator emeritus
Oct 21, 2003
16,032
1
Portland, OR
console.log gets recreated everytime you reboot, you should be looking at system.log which will hold the info on ntpd resetting wildly out of date time offsets.

Code:
Aug  4 11:56:33 localhost ntpdate[253]: step time server 17.254.0.31 offset 0.259303 sec
 

mduser63

macrumors 68040
Original poster
Nov 9, 2004
3,039
30
Salt Lake City, UT
It's up to 58 days now, and the kernel boot time now says June 17. Kinda fun to have such an exaggerated uptime. I should use it to show off.
 

Plymouthbreezer

macrumors 601
Feb 27, 2005
4,238
77
Massachusetts
iMeowbot said:
You can use the command last reboot to get a history for the last month or so. If you want to keep all-time records, you might want to install uptimed (it's available through Fink and DarwinPorts).
Yeah, last reboot gave me some info, but I mean for the life of the computer. Of course, since I had to Erase & Install last April due to errors and Tiger, it isn't possible.

Anyway, I had to kill my 17 days of uptime, due to a system lockup. Yeah. First MAJOR lockup I've had with OS X itself in a while. :confused:
 

.:*Robot Boy*:.

macrumors 6502
Jan 21, 2005
373
0
New Zealand
YS2003 said:
I ran uptime from Terminal. I only have one user set up (myself) and the uptime says there are 2 users. Is this normal?
This is normal. One of the users is yourself, the other is 'root'. I have a third user called 'windowserver'.

I have no idea what they're for, all I know is that they're normal :).
 

YS2003

macrumors 68020
Dec 24, 2004
2,139
0
Finally I have arrived.....
.:*Robot Boy*:. said:
This is normal. One of the users is yourself, the other is 'root'. I have a third user called 'windowserver'.
Hey, Robot. Thanks for enlightening me on this. At first, I thought someone has hacked into my Mac from my wireless network (even though encrypted, password protected, and non-broadcast mode). So, that means Superuser (sudo) is always on regardless my user account is the sole administrator on machine.
 

mkrishnan

Moderator emeritus
Jan 9, 2004
29,776
12
Grand Rapids, MI, USA
YS2003 said:
So, that means Superuser (sudo) is always on regardless my user account is the sole administrator on machine.
Not exactly. What sudo does is that it allows a non-superuser to act as a superuser. Sudo is *not* always on. The root user *is* actually a superuser, and doesn't need sudo. But, while the root user has active processes on the system, no one is logged into it, per se, and without sudo, or logging in as root, no one can execute tasks as the superuser.

Root is there because processes like the daemons *MUST* be owned by the root, because they must always execute with superuser privileges -- if they didn't the system would likely panic.

It's normal on all Unix systems that root is always logged in.

Besides...what user would own tasks that were being run while you were not yet logged in? :D No one could run the login window if only the user account could own processes, because the user wouldn't be logged in, and couldn't run processes. ;)

I think Windowserver has to do with X-Windows being launched, but I'm not 100% sure about that. I don't think there's a windowserver account normally for me, at least.
 

yellow

Moderator emeritus
Oct 21, 2003
16,032
1
Portland, OR
There should be 2 users, 1. you logged in at the Console (your normal GUIfied login) and 2. the tty for the shell you just opened in Terminal.

There shouldn't be a "WindowServer" user that is logged in, as it's a "false" login. It's only used for the identity of a daemon, and is never logged in. You need to look in NetInfo Manager and make damn sure there's no password for the "WindowServer" user.

And unless you logged in as root, root should not be a user logged into your box.
 

Similar threads

  • filbert42
0
Replies
0
Views
197
  • oddnalo
1
Replies
1
Views
350
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.