Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
RE: uptime, pmset, sysctl, syslog, ...

28 days 3 hours and 7 minutes according to iStat. I NEVER shut mine down unless I'm going to be gone for more than a few days and I'm not taking my laptop. I wonder if there is a way to look at power on hours...

Hi T5BRICK,

Unfortunately, I am a fan of the commandline (sorry), so to see those power on hours you can execute the following simple command in a Terminal window:

uptime

This returns the time since last boot, the number of users, and the load averages. If you wish to see the exact time your system booted, use:

sysctl -a | grep -i boottime

or perhaps you wish to know the system sleep and wake times:

sysctl -a | grep -i sleeptime
sysctl -a | grep -i waketime

If you wish to see the sleep/wake cycles, you can do:

pmset -g log | grep -i total

This returns the total sleep/wakes. There are other interesting uses of pmset, such as:

pmset noidle

which keeps your system from sleeping when it is idle (there is also the caffeinate command and the Caffeine app which essentially do the same thing; caffeinate for instance will execute a program and keep the system from sleeping during execution). If you wish to open your laptop's lid without waking it from sleep, use:

pmset lidwake 0

You can also schedule specific times for sleep/wake:

pmset schedule sleep "11/02/2012 00:00:00"
pmset schedule wake "11/02/2012 04:00:00"

or let's say you want to fool your boss into thinking that you have already arrived at work, say at 6:30am (you know your boss arrives at 7am and checks the office to see who is in), but that you are just somewhere else in the building doing other work. So you set your Mac to awaken at the ungodly hour of 6:30am so your boss sees it turned on while you don't actually arrive until the more civil hour of 10:00am:

pmset repeat wakeorpoweron MTWRF 06:30:00

I knew a guy that had two identical coats, one he wore and one he would drape over the back of his chair when he left work so that his boss thought he was still in the building. I guess powering on your computer is the modern version of the two coat trick. (Of course, be certain that you <pmset repeat cancel> when you go on vacation, otherwise your gig will be up.)

Or perhaps you wish to see why your system awoke from sleep, then you can execute:

syslog | grep -i "wake"

...just some commandline commands... (some of the above commands have to be exeucted with administrator privileges, either using sudo or as root)

Switon
 
Last edited:
Yes, many leave their Macs on for day, weeks or months. Nothing to worry about. And instead of shutting your Mac down, you can always put it to sleep via closing the lid or :apple: > Sleep or CMD+OPTION+EJECT.

Same goes for me too.. When I was using my MBP 2009, I did not shut it down at least for a year as much as I remember. Sleep was also my way :eek:
 
It's fine to leave MacBooks on for days or weeks on end, I personally haven't had any slow down and have not turned it off ever since 10.8.2 update - sleep mode is the best!
 
my iMac is always just on sleep at night, but on when I am at home. My MBP is just with the lid closed asleep as well. I never shut mine down. I always see it as turning off my iPhone or iPad. just put it to sleep. You will be okay
 
Macs haven't been truly off since purchase.
Did have one that was off and in a box for resale.
 
I recently went somewhere and I guess I forgot to turn my mac off while I was there. It's been 20 hours or so. The fans are normal, its not overheated, is my mac going to be okay?

I only ever shut down my mac when updates need a restart or I need to use bootcamp.

What made you think your mac would have any problem staying powered for 20 hours? The days of windows 95 are long gone.
 
I only ever shut down my mac when updates need a restart or I need to use bootcamp.

What made you think your mac would have any problem staying powered for 20 hours? The days of windows 95 are long gone.

I guess I was just used to having my computer off haha. A long time ago my parents kept saying it was bad for the computer, and myself for having my computer on. I guess I just kept it.
 
close lid, go to sleep. Restart when an update requires it.

There is no need to ever shutdown. As for screen being on that long...have you ever been into an Apple Store? They are on all day every day. They can take it!
 
I guess I was just used to having my computer off haha. A long time ago my parents kept saying it was bad for the computer, and myself for having my computer on. I guess I just kept it.

I guess they're just still following advice from the days of CRT screens - CRT screens do emit some level of radiation, as well as noise and they suck up a ton of electricity, so you wouldn't want to leave them on 24/7. LCD screens are all good tho ;)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.