OESF Portables Forum
Everything Else => General Support and Discussion => Zaurus General Forums => Archived Forums => Software => Topic started by: cmonex on March 07, 2006, 11:41:16 pm
-
as above... i'd like to see how long i've been running on batteries... couldn't find anything..
-
is there an uptime command in zaurus?
-
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...
-
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...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=117501\"][{POST_SNAPBACK}][/a][/div]
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
-
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.
-
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.
-
thanks for your answers
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=118170\"][{POST_SNAPBACK}][/a][/div]
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?
-
the uptime command sounds nice, hmm if anyone knows about one, let me know...
In terminal do:cat /proc/uptime
Greg
-
the uptime command sounds nice, hmm if anyone knows about one, let me know...Â
In terminal do:cat /proc/uptime
Greg
[div align=\"right\"][a href=\"index.php?act=findpost&pid=120019\"][{POST_SNAPBACK}][/a][/div]
hehe thanks. though this shows only system uptime
-
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
-
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
[div align=\"right\"][a href=\"index.php?act=findpost&pid=122978\"][{POST_SNAPBACK}][/a][/div]
thanks for the idea. hmm yeah it'd be nice to have some script for this. hmmm, now it only has to be actually created (and dunno yet, how )
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? sounds more useful than this percentage thing in cacko which is very incorrectly measured. i sometimes get the feeling that someone was as crazy as to specify 50% at 3.6V (and 100% at 4.20V of course)...
-
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 which is again contained within the kernel. I should add that this table has been redesigned in the past for the 2.4.x kernels and has also been re-designed for the 2.6.x kernel used by the OZ machines (depends which machine you have though, as the 2.6 kernel is onyl usable on the c7x0 and cx000 machines atm).
Si
-
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 which is again contained within the kernel. I should add that this table has been redesigned in the past for the 2.4.x kernels and has also been re-designed for the 2.6.x kernel used by the OZ machines (depends which machine you have though, as the 2.6 kernel is onyl usable on the c7x0 and cx000 machines atm).
Si
[div align=\"right\"][a href=\"index.php?act=findpost&pid=122997\"][{POST_SNAPBACK}][/a][/div]
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 (i'm no linux guru)
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.
-
as above... i'd like to see how long i've been running on batteries... couldn't find anything..
[div align=\"right\"][{POST_SNAPBACK}][/a][/div] (http://index.php?act=findpost&pid=117493\")
I've made a little script, which can give data to gnuplot : [a href=\"http://ldrolez.free.fr/software/zaurus/]http://ldrolez.free.fr/software/zaurus/[/url]
Cheers,
Ludo.