Knowing real uptime

propropro

macrumors regular
Original poster
Nov 29, 2004
144
0
Spain
Just a curious question: Is there any way of knowing the real uptime of your machine, that is, without counting the time while the computer is sleeping?
 

DXoverDY

macrumors 6502a
Apr 19, 2005
810
0
propropro said:
Just a curious question: Is there any way of knowing the real uptime of your machine, that is, without counting the time while the computer is sleeping?
Not with the stock software. It would be possible with third party software that simply counted up while it was on, and then stopped when the machine was sleeping and resumed when the machine was turned back on. I'm sure someone could recommend something, but it would likely be third party software you'd need, and it wouldn't be very failsafe either.
 

dsharits

macrumors 68000
Jun 19, 2004
1,639
0
Plant City, FL
propropro said:
Just a curious question: Is there any way of knowing the real uptime of your machine, that is, without counting the time while the computer is sleeping?
The time that you computer is sleeping is also uptime. Every app that I know of that displays uptime counts the time that it is asleep. Even when you type 'uptime' in the terminal, it gives you total uptime.
 

propropro

macrumors regular
Original poster
Nov 29, 2004
144
0
Spain
dsharits said:
The time that you computer is sleeping is also uptime. Every app that I know of that displays uptime counts the time that it is asleep. Even when you type 'uptime' in the terminal, it gives you total uptime.
yeah, I know, but while the computer is "sleeping" it's not working at all (it's not "useful" time) and that time doesn`t interest me.
 

Makosuke

macrumors 603
Aug 15, 2001
6,154
343
The Cool Part of CA, USA
I've wondered this myself, but didn't find anything obvious to do it. It'd definitely need to be something 3rd party that kept a sort of "watchdog" timer running that didn't incriment while sleeping.

Actually, the logs do record sleep and wake times, so if you were clever you could write an app to sum the sleep time from the log files and subtract it from the reported uptime. I smell grep project for somebody with more time than me.
 

propropro

macrumors regular
Original poster
Nov 29, 2004
144
0
Spain
Makosuke said:
Actually, the logs do record sleep and wake times, so if you were clever you could write an app to sum the sleep time from the log files and subtract it from the reported uptime. I smell grep project for somebody with more time than me.
That would be a interesting exercise to improve my Unix command line skills, maybe when I've got more free time...
 

toothpaste

macrumors 6502
May 8, 2005
293
4
open terminal

uptime

unix command that is for uptime of your machine. but since you want something more than this,

last

it will show you your loggin time up to your current time, you will see how long your machine has been up as in when the last user logged in