View Single Post
Posts: 97 | Thanked: 318 times | Joined on Feb 2012 @ Switzerland
#295
During my testing of the new features in the 'mautz' kernels, I started to write a script that generates some basic battery 'poll data'. The last couple of days, the script has evolved and grown, and I guess it's time to share it with you.

The script does basically log the current power consumption with a given interval and (now) generates a report at the end. The report includes some useful information about the current phone settings, allowing you to compare different testing situations easily.

The first version is ready now and is compatible with the 'mautz' kernel_v8, but should also run with the default kernel, besides the fact that some files, the script is checking, are not present. You will have two files, the 'script-routine' and a 'starter', that allows you to launch the routine with individual options. The source code can be found here... https://github.com/minimec/powerstats/tree/master

The report file would look like this... report file
A 'gnuplot' of the file would look like this... gnuplot file

I recommend to download and decompress the '.tar' file with the following commands on the phone, but you can also download the file here...

Code:
curl -L -o powerstats_v1.tar.gz https://www.dropbox.com/s/2wt7hd69la4j116/powerstats_v1.tar.gz?dl=0
tar -pxvzf powerstats_v1.tar.gz
You will get a 'powerstats' file and a hidden '.powerstats-routine' in your '/home/nemo' folder. A 'powerstats-report' folder will be created during first run.

You can get an overview of the options with './powerstats -h'. If you launch the starter with './powerstats', the routine will run with default settings. The 'starter' approach allows you to close the terminal right after launch...

A good first test might be...
Code:
./powerstats -i 2 -m 1 -n 1 -p 40 -t first-try
Code:
[nemo@pris ~]$ ./powerstats --help            
Script to measure current power consumption
on devices running SailfishOS.
 
EXAMPLE:
./powerstats -i 1 -m 30 -n 1 -p 50 -t gps-moving 
 
options:
-h, --help			show brief help
-s, --stop			abort script
-i, --interval=INTERVAL	specify interval (default = 2)
-m, --minutes=MINUTES		specify measure time in minutes (default=60)
-n, --notification=NOTIFICATION	set '1' for notification (default=0)
-p, --processlog=PROCESSLOG	specify limit in mV for process logging (default=60)
-t, --title=TITLE		specify a title for output file (default=idle)
[nemo@pris ~]$

I would love and I hope to see some shared reports, that would allow us to compare the Neus5-SailfishOS experience with different OS versions and settings.

I stay tuned for questions and new ideas from your side.
 

The Following 4 Users Say Thank You to minimec For This Useful Post: