This image is the top of the content box. Unfortunately, there is no information-based reason for this div to be here. It's just here for design reasons. Sorry.
Go Back   MisticRiver :: For iriver Enthusiasts > All things Rockbox > ROCKbox Forums
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: , , ,

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old January 24th, 2008, 08:38 AM
Newbie Floating Down The Mistic River
 
Join Date: Jan 2008
Posts: 1
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
Basically this removes all text except the Time & Percentage left fields* and then outputs those two fields into a file called 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
So save this as batterybench.gp

Now to run with gnuplot:

Code:
gnuplot batterybench.gp
This will create a png file called batterygraph.png, and here it is:


*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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 07:44 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
This image is the bottom of the content box. Unfortunately, there is no information-based reason for this div to be here. It's just here for design reasons. Sorry.