Quote:
Originally Posted by powinmo
Ok folks, I've been sitting on some of my dev scripts for a while now. Thought I'd finally post this here first for some comments before I post a general app/script thread over at XDA...
Script: Device Uptime Viewer
Version 0.3a
Purpose:
1. uptime logging utility
2. manage a log text file with timestamp (of last recorded boot time) in most recent order
3. retain last X timestamps for historical review, default to 20
I've needed a way to track my device's uptime, and also check on prior restarts/reboots.
The latter was useful if my device restarted for some unknown reason.
This is a MortScript that requires version 4.3 or better.
Installer information:
1. the .cab does not require any user interaction beyond the standard Windows Mobile installer (wceload.exe) prompts for, so it can be used in XDA_UC/S4X without an .auto file.
2. creates a local application directory on your local device or storage card depending on how you install it
eg, \Program Files\DeviceUptime or \Storage Card\Program Files\DeviceUptime
3. inserts a shortcut to the \Windows\Startup directory to run a small script on each boot that
a. updates a boot timestamp text file on the root of your device (\uptime.log.txt) - note that it intentionally ends in ".txt" so you can use any text editor to view it manually
b. prunes old boot timestamp entries
c. copies the log file to your Storage Card for archival purposes, if it detects a SD card present
d. if you just flashed a new ROM or did a hard reset, the first time the startup script is run it will check if you have an archived log file on your SD card and copy that as your initial log file. Useful to continue the uptime history tracking.
4. creates a shortcut in "\Windows\Start Menu\UpTime Viewer.lnk" to launch a basic MortScript menu based UI
a. you can view the current uptime statistics
b. you can view the last 20 boot timestamps in most recent order
c. about information
*** be sure to double tap the menu option, or tap once and then select the OK soft button - the UI limitations are due to MortScript **
5. There are no custom icons yet
6. automatically installs MortScript 4.3b15 to its local installation directory so it does not intefere if you have a certain default version of MortScript active.
Future items:
? Use JMLMenuSense for the UI if there is enough requests for it
FAQ:
a. if the script window or dialog box disappears, go to ArkSwitch or what ever task manager you use and bring the script back in to focus.
Depending on what you tap while the script painting a dialog box, etc it may be put in to the background.
b. the date format is DD/MM/YY. I may allow an option for different date formats later.
Credits: original author copenhagen @ XDA
|
Installed your cab.
It required me to create the uptime.log.txt file in order for it to open.
Once installed the first report of the uptime is not correct. Showed the last date for restart was 1/1/70....giving me one hell of an uptime value in days...
.
Upon first restart after installing, it corrects itself.
Will run this for a while and see how it works out for me....shooting for a ROM that I can live with for 30+ days without restart.
Thanks given.