|
|
2010-01-27
, 03:40
|
|
Posts: 311 |
Thanked: 110 times |
Joined on Nov 2007
@ Boston, MA
|
#101
|
|
|
2010-01-27
, 07:31
|
|
Posts: 8 |
Thanked: 3 times |
Joined on Nov 2009
@ Finland
|
#102
|
#!/bin/sh
# plot.sh -- for n900
# pyllyukko at maimed dot org -- 18.1.2010
[ ! -x /usr/bin/gnuplot ] && {
echo "error: no gnuplot!" 1>&2
exit 1
}
[ -n "${1}" ] && INFILE="${1}" || INFILE="/root/battery.log"
[ ! -f "${INFILE}" ] && {
echo "error: input file \`${INFILE}' does not exist!" 1>&2
exit 1
}
PIC_DIR="/home/user/MyDocs/.images"
NOW=$(date +%s)
TODATE=$(date +%Y%m%d)
# BEFORE = 24 hours ago
BEFORE=$((${NOW}-60*60*24))
gnuplot -persist <<-EOP
set terminal png
set output "${PIC_DIR}/battery-${TODATE}.png"
set title "n900 battery status"
set xdata time
set nokey
set timefmt "%s"
# enable this to plot only the last 24 hours
#set xrange ["${BEFORE}":]
set yrange [0:]
set xlabel "time"
set ylabel "mAh"
set y2label "load avg"
set y2tics
plot "${INFILE}" using 1:2 with lines,\
"${INFILE}" using 1:6 axes x1y2 with lines
EOP
exit 0
| The Following User Says Thank You to pyllyukko For This Useful Post: | ||
|
|
2010-01-27
, 20:58
|
|
Posts: 248 |
Thanked: 43 times |
Joined on Nov 2009
@ US
|
#103
|
And here's a script that uses gnuplot (available in extras-devel):
To create graphs like this:Code:#!/bin/sh # plot.sh -- for n900 # pyllyukko at maimed dot org -- 18.1.2010 [ ! -x /usr/bin/gnuplot ] && { echo "error: no gnuplot!" 1>&2 exit 1 } [ -n "${1}" ] && INFILE="${1}" || INFILE="/root/battery.log" [ ! -f "${INFILE}" ] && { echo "error: input file \`${INFILE}' does not exist!" 1>&2 exit 1 } PIC_DIR="/home/user/MyDocs/.images" NOW=$(date +%s) TODATE=$(date +%Y%m%d) # BEFORE = 24 hours ago BEFORE=$((${NOW}-60*60*24)) gnuplot -persist <<-EOP set terminal png set output "${PIC_DIR}/battery-${TODATE}.png" set title "n900 battery status" set xdata time set nokey set timefmt "%s" # enable this to plot only the last 24 hours #set xrange ["${BEFORE}":] set yrange [0:] set xlabel "time" set ylabel "mAh" set y2label "load avg" set y2tics plot "${INFILE}" using 1:2 with lines,\ "${INFILE}" using 1:6 axes x1y2 with lines EOP exit 0
|
|
2010-01-27
, 21:19
|
|
Posts: 8 |
Thanked: 3 times |
Joined on Nov 2009
@ Finland
|
#104
|
Does not make sense at all, even no load, looking at the graph, the battery still drain...so what does it tell you what cause the battery drain????
| The Following User Says Thank You to pyllyukko For This Useful Post: | ||
|
|
2010-01-28
, 18:25
|
|
Posts: 10 |
Thanked: 4 times |
Joined on Jan 2010
@ Washington, DC
|
#105
|
Thanks for that.
)|
|
2010-01-28
, 19:45
|
|
Posts: 992 |
Thanked: 995 times |
Joined on Dec 2009
@ California
|
#106
|
|
|
2010-01-30
, 12:04
|
|
Posts: 25 |
Thanked: 1 time |
Joined on Dec 2009
@ NE-Scotland
|
#107
|
|
|
2010-01-31
, 12:06
|
|
|
Posts: 1,090 |
Thanked: 476 times |
Joined on Jan 2010
@ Ingolstadt, Germany
|
#108
|
Does anyone know that with pre PR.1.1 the Xorg logfile /tmp/Xord.0.log was set to -logverbose? It now is and i have been seeing constant cpu usage at 6%.
|
|
2010-01-31
, 14:45
|
|
|
Posts: 1,090 |
Thanked: 476 times |
Joined on Jan 2010
@ Ingolstadt, Germany
|
#109
|
|
|
2010-01-31
, 15:28
|
|
Posts: 264 |
Thanked: 90 times |
Joined on Jan 2010
|
#110
|