RE: uptime, pmset, sysctl, syslog, ...
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
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: