thenuke
Group: Members
Posts: 3
Joined: Nov. 2004 |
|
Posted: Nov. 15 2004,06:01 |
|
I was exploring through the fascinating filesystem of Linux and then I found /proc/acpi/battery/MBAT/ There can be found current battery capacity among other stuff in a text file named state.
So I thought about learning a bit of scripting and now I have a crontab running a script which logs current battery capacity every minute with clock time.
Grab it from there if you wish to: http://cygserv.cygnnet.jkl.fi/thenuke/batlog
If you happen to ask what could be done with this. I'm going to try to draw some graphs with some spreadsheet software outta the data I gather.
"Crontab is a program that allows users to create jobs that will run at a given time."
Crontab is not installed on DSL by default, I used apt-get install cron to get that. Because I do not like vi-editor I command EDITOR=nano followed by crontab -e which then opens my favourite editor nano. On the first empty line I write * * * * * /home/thenuke/batlog That then runs batlog-script every minute. Check man crontab for more info on that if you wish.
p.s. This was like my first linux script and contribution to these forums, I am sure that one could do the same with one line of code but I'm not the one yet ;-)
join the irc.freenode.net & #damnsmalllinux
|