![]() ![]() |
Mar 7 2006, 08:41 PM
Post
#1
|
|
|
Group: Members Posts: 92 Joined: 4-March 06 Member No.: 9,288 |
as above... i'd like to see how long i've been running on batteries...
|
|
|
|
Mar 7 2006, 09:31 PM
Post
#2
|
|
|
Group: Members Posts: 1,213 Joined: 9-June 05 From: Gobi Desert, Mongolia Member No.: 7,306 |
is there an uptime command in zaurus?
|
|
|
|
Mar 7 2006, 09:35 PM
Post
#3
|
|
|
Group: Members Posts: 1,213 Joined: 9-June 05 From: Gobi Desert, Mongolia Member No.: 7,306 |
or you could do a cron or at job to log the battery status and time every so often, then you could extrapolate how much time it has run and how much time remains...just an estimate, but then again battery discharge is not quite linear...
|
|
|
|
Mar 8 2006, 05:44 AM
Post
#4
|
|
|
Group: Members Posts: 92 Joined: 4-March 06 Member No.: 9,288 |
QUOTE(bam @ Mar 8 2006, 07:35 AM) or you could do a cron or at job to log the battery status and time every so often, then you could extrapolate how much time it has run and how much time remains...just an estimate, but then again battery discharge is not quite linear... hey thanks for your answer the uptime command sounds nice, hmm if anyone knows about one, let me know... again, i just need something that tells me how much time elapsed on battery power, i don't mind if it can't calculate the remaining time, i trust myself better on that |
|
|
|
Mar 12 2006, 07:22 AM
Post
#5
|
|
|
Group: Members Posts: 271 Joined: 19-June 03 From: Beijing,China Member No.: 156 |
One or two years ago, I thought to extrapolate the usage time of the battery based on Anton's battery applet, before I wrote the code I did one simple test, and the result shows that the battery measurement is imprecise, so the time seems to be useless. My original algorithm works depends on the time difference and battery difference,
Use Time= Left_Batter/(delta_battery/delta_time), but some running results showed the delta_battery will increase in most of time. |
|
|
|
Mar 12 2006, 09:15 AM
Post
#6
|
|
|
Group: Members Posts: 1,213 Joined: 9-June 05 From: Gobi Desert, Mongolia Member No.: 7,306 |
the main problem is that current useage varies and here is no already built in way to measure this, but what can be done is a data profile of what the user does over time and a "good" estimation of battery time left, granted its not exact and if something drastically changes, say heavy wifi useage, the time error would increase but not dramatically.
|
|
|
|
Mar 23 2006, 04:23 PM
Post
#7
|
|
|
Group: Members Posts: 92 Joined: 4-March 06 Member No.: 9,288 |
thanks for your answers
QUOTE(chyang @ Mar 12 2006, 05:22 PM) One or two years ago, I thought to extrapolate the usage time of the battery based on Anton's battery applet, before I wrote the code I did one simple test, and the result shows that the battery measurement is imprecise, so the time seems to be useless. My original algorithm works depends on the time difference and battery difference, Use Time= Left_Batter/(delta_battery/delta_time), but some running results showed the delta_battery will increase in most of time. yeah i noticed it isn't precise. it stays above 70% for a while then when it gets below that the indicated charge drops much quicker... OK anyway... i'm not interested in remaining time! i mean elapsed time as battery runtime ... it would be so cool.. anyone any ideas? |
|
|
|
Mar 23 2006, 06:26 PM
Post
#8
|
|
![]() Group: Members Posts: 790 Joined: 28-October 03 From: USA Member No.: 792 |
QUOTE(cmonex @ Mar 8 2006, 08:44 AM) the uptime command sounds nice, hmm if anyone knows about one, let me know... In terminal do:CODE cat /proc/uptime Greg |
|
|
|
Apr 12 2006, 05:46 PM
Post
#9
|
|
|
Group: Members Posts: 92 Joined: 4-March 06 Member No.: 9,288 |
|
|
|
|
Apr 13 2006, 02:32 AM
Post
#10
|
|
|
Group: Members Posts: 4,515 Joined: 25-October 03 From: Bath, UK Member No.: 464 |
Well save the output of that command as soon as you resume and before suspend and you can then take the two away from one another.
While you at it, recording things to a text file (as this sound like the easiest way), you can save the battery status by 'cat /proc/apm' iirc. Then you can plot a battery percentage vs time graph. If you're running on a c7x0 machine with OpenZaurus you might also consider recording the cpufreq transitions and the actual battery voltages (from sysfs.) Si |
|
|
|
Apr 13 2006, 04:02 AM
Post
#11
|
|
|
Group: Members Posts: 92 Joined: 4-March 06 Member No.: 9,288 |
QUOTE(lardman @ Apr 13 2006, 12:32 PM) Well save the output of that command as soon as you resume and before suspend and you can then take the two away from one another. While you at it, recording things to a text file (as this sound like the easiest way), you can save the battery status by 'cat /proc/apm' iirc. Then you can plot a battery percentage vs time graph. If you're running on a c7x0 machine with OpenZaurus you might also consider recording the cpufreq transitions and the actual battery voltages (from sysfs.) Si thanks for the idea. btw actually uptime doesn't measure the time while the zaurus is switched off, just the system runtime from the last reboot. which could even be used for battery runtime if i never reboot and if i do a reboot at every recharge wow, oz really can show the actual voltage? |
|
|
|
Apr 13 2006, 04:17 AM
Post
#12
|
|
|
Group: Members Posts: 4,515 Joined: 25-October 03 From: Bath, UK Member No.: 464 |
All of the Zauruses can read the voltage (or at least a representation of the voltage from an a2d converter) in the kernel. OZ makes this info available in sysfs, I'm sure with a bit of kernel hacking it could be done for the 2.4.18 kernels.
Once you get into this, you can marvel at the wonder that is Sharp's voltage -> percentage lookup table Si |
|
|
|
Apr 14 2006, 06:49 PM
Post
#13
|
|
|
Group: Members Posts: 92 Joined: 4-March 06 Member No.: 9,288 |
QUOTE(lardman @ Apr 13 2006, 02:17 PM) All of the Zauruses can read the voltage (or at least a representation of the voltage from an a2d converter) in the kernel. OZ makes this info available in sysfs, I'm sure with a bit of kernel hacking it could be done for the 2.4.18 kernels. Once you get into this, you can marvel at the wonder that is Sharp's voltage -> percentage lookup table Si a little bit of kernel hacking sounds very exciting however i'm not the right person to even think of trying to achieve that lol very sad, because i would sure try to hack it if i could. so this lookup table is actually a wonder?! i seriously doubt it, lol... i have a c760 btw. if that matters. |
|
|
|
Jun 23 2006, 01:56 AM
Post
#14
|
|
|
Group: Members Posts: 69 Joined: 16-May 06 From: France, Metz Member No.: 9,882 |
QUOTE(cmonex @ Mar 8 2006, 06:41 AM) I've made a little script, which can give data to gnuplot : http://ldrolez.free.fr/software/zaurus/ Cheers, Ludo. |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th May 2013 - 07:51 PM |