Uptime wrong

Discussion in 'macOS' started by mduser63, Aug 10, 2005.

  1. mduser63 macrumors 68040

    mduser63

    Joined:
    Nov 9, 2004
    Location:
    Salt Lake City, UT
    #1
    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.
     
  2. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #2
    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.
     
  3. mduser63 thread starter macrumors 68040

    mduser63

    Joined:
    Nov 9, 2004
    Location:
    Salt Lake City, UT
    #3
    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.
     
  4. Plymouthbreezer macrumors 601

    Plymouthbreezer

    Joined:
    Feb 27, 2005
    Location:
    Massachusetts
    #4
    Humm... No problem here, but I just hit 14 days on my G4.
     
  5. aussiemac86 macrumors 6502

    Joined:
    Apr 12, 2004
    Location:
    the land of OZ
    #5
    how do you check your uptime? does it require a third party app?
     
  6. Nermal Moderator

    Nermal

    Staff Member

    Joined:
    Dec 7, 2002
    Location:
    New Zealand
  7. mduser63 thread starter macrumors 68040

    mduser63

    Joined:
    Nov 9, 2004
    Location:
    Salt Lake City, UT
    #8
  8. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #9
    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?
     
  9. mduser63 thread starter macrumors 68040

    mduser63

    Joined:
    Nov 9, 2004
    Location:
    Salt Lake City, UT
    #10
    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.
     
  10. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #11
    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.
     
  11. Plymouthbreezer macrumors 601

    Plymouthbreezer

    Joined:
    Feb 27, 2005
    Location:
    Massachusetts
    #12
    While on this topic, how do I check record uptime in Terminal?
     
  12. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #13
    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).
     
  13. mduser63 thread starter macrumors 68040

    mduser63

    Joined:
    Nov 9, 2004
    Location:
    Salt Lake City, UT
    #14
    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!
     

    Attached Files:

  14. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #15
    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?
     
  15. mduser63 thread starter macrumors 68040

    mduser63

    Joined:
    Nov 9, 2004
    Location:
    Salt Lake City, UT
    #16
    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.
     
  16. yellow Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
    #17
    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
     
  17. mduser63 thread starter macrumors 68040

    mduser63

    Joined:
    Nov 9, 2004
    Location:
    Salt Lake City, UT
    #18
    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.
     
  18. Plymouthbreezer macrumors 601

    Plymouthbreezer

    Joined:
    Feb 27, 2005
    Location:
    Massachusetts
    #19
    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:
     
  19. YS2003 macrumors 68020

    YS2003

    Joined:
    Dec 24, 2004
    Location:
    Finally I have arrived.....
    #20
    is it normal to show 2 user in uptime via Terminal

    I ran uptime from Terminal. I only have one user set up (myself) and the uptime says there are 2 users. Is this normal?
     
  20. .:*Robot Boy*:. macrumors 6502

    Joined:
    Jan 21, 2005
    Location:
    New Zealand
    #21
    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 :).
     
  21. YS2003 macrumors 68020

    YS2003

    Joined:
    Dec 24, 2004
    Location:
    Finally I have arrived.....
    #22
    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.
     
  22. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #23
    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.
     
  23. yellow Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
    #24
    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.
     
  24. Abstract macrumors Penryn

    Abstract

    Joined:
    Dec 27, 2002
    Location:
    Location Location Location
    #25
    Well what about this uptime business? I'm kinda curious, but can't think of any reasons why this is happening myself.
     

Share This Page