Upon next reboot? Have a battery ACPI problem that reports my battery life incorrectly. I wanna see how long i can last actually.. For example, my battery life can last 2 hours. But the ACPI reports it as less than 2 hours. Like 1hr 15mins.
You can use an ahk script
Are you going to let it run until it dies? This script will log its uptime every 30 seconds
Are you going to let it run until it dies? This script will log its uptime every 30 seconds
Code:
#Persistent SetWorkingDir %A_ScriptDir% FileDelete, log.txt SetTimer, logTime, 30000 return logTime: FileAppend, % A_TickCount "ms have elapsed`r`n", log.txt return
Last edited by GGF0RCE (2009-06-19 23:12:32)
Yeah. Sorry but whats the script? Do i have to download it?
Oh sorry. Save that text as an .ahk file and run it with autohotkey which you can find here: http://www.autohotkey.com/download/
So i save it in notepad as an ahk format then i use the hotkey to convert it to exe and thats fine? Btw, how do i shpw the uptime in hours and mins? It shows me in milliseconds.
Last edited by Ayumiz (2009-06-19 23:33:36)
Yeah that should work. Just use a calculator to convert from milliseconds, i don't have time right now to make it output hours and minutes. Let me know how it works out
You know, you really don't need a script to determine uptime.
Assuming you're running a Windows OS, every time your computer boots it makes an entry in Event Viewer (right-click on My Computer, choose Manage, and on the left-hand pane expand Event Viewer and select the System log). The entry looks similar to this:
So, just find the amount of time between those log entries and there you have it. Of course, this only works if your computer boots immediately after going down...
Assuming you're running a Windows OS, every time your computer boots it makes an entry in Event Viewer (right-click on My Computer, choose Manage, and on the left-hand pane expand Event Viewer and select the System log). The entry looks similar to this:
And immediately after you'll see another log item like this:Microsoft (R) Windows (R) 5.01. 2600 Service Pack 3 Uniprocessor Free.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Both will be of type "Information" and will have their "source" listed as "eventlog"The Event log service was started.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
So, just find the amount of time between those log entries and there you have it. Of course, this only works if your computer boots immediately after going down...
Last edited by JdeFalconr (2009-06-20 00:56:55)
bump. Anymore?
Everest logs your uptime
you could always use mirc with a script to log uptime. that should be pretty lightweight and you don't even have to connect to a server.
you only need the mirc .exe file. put it in a folder.
then take the following code and save it as "up.mrc". put in the same folder.
the first time you run mirc you'll need to configure it. under options > connect > options, uncheck all the boxes.
under tools > script editor > file > load your up.mrc file.
now your done.... from now on, anytime you run the mirc.exe it will start the script and you dont have to do anything.
the file uptime.txt will be overwritten every 15 seconds in the root of C drive (C:\) with your current uptime.
Just be sure to open the file and check the last uptime before you start mirc again.
or remove the "-c" in the code to have the info appended to the file and nothing overwritten. (the file may get big).
you can adjust the "15" in the code to change the seconds the script refreshes / writes.
you only need the mirc .exe file. put it in a folder.
then take the following code and save it as "up.mrc". put in the same folder.
Code:
alias titles { titlebar - uptime: $uptime(system, 2) | write -c C:\uptime.txt $duration($uptime(system,3)) } on *:START:./timertitle 0 15 /titles
under tools > script editor > file > load your up.mrc file.
now your done.... from now on, anytime you run the mirc.exe it will start the script and you dont have to do anything.
the file uptime.txt will be overwritten every 15 seconds in the root of C drive (C:\) with your current uptime.
Just be sure to open the file and check the last uptime before you start mirc again.
or remove the "-c" in the code to have the info appended to the file and nothing overwritten. (the file may get big).
you can adjust the "15" in the code to change the seconds the script refreshes / writes.