| Home | Forums | Register | FAQ | Search | Today's Posts | Mark Forums Read |
|
Welcome to the misticriver forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| Tags: battery_benchtxt, dork, graph, linux |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
graphing battery_bench (linux)
Just thought someone might find this useful. I've been running into some trouble when using rockbox, the player randomly locks up and I've been doing various things to try and pinpoint the problem. But that's another topic..
Anyway last night I left the player on to see what the batterybench plugin revealed. After checking through battery_bench.txt I figured it could be made a lot more readable if it was converted into a graph. And hey, everyone loves graphs. To do this: First you need to get gnuplot to (contain your shock) plot the graphs. After copying battery_bench.txt to your ~/ we need to make it understandable for gnuplot. So we run the following command: Code:
cut -c1-8,22-25 battery_bench.txt > cut.txt Then we can run gnuplot with the following little script I cobbled together: Code:
set terminal png small set output 'batterygraph.png set title "iRiver H10 Battery Performance" set ylabel "(Charge %)" set xlabel "(Hours)" set xdata time # The x axis data is time set timefmt "%H:%M:%S" # The times in the file look like 23:59:59 set format x "%H:%M" # On the x-axis, we want tics like 23:59 plot "~/gnuplot/cut.txt" using 1:2 notitle with line Now to run with gnuplot: Code:
gnuplot batterybench.gp ![]() *Some of the info text at the top of battery_bench.txt is kept, but gnuplot ignores it Last edited by evol__ : January 24th, 2008 at 11:32 AM. |