All times are UTC-06:00




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Mon Mar 07, 2011 5:17 am 
Offline

Joined: Sat Feb 12, 2011 5:05 am
Posts: 10
Location: Moscow
Hi!

I want to use Conky for display battery status of my Smartbook. So, where i can grep (/proc?) information for conky?

I'm used Debian Squeeze armel and latest kernel from your git.

Thanks


Top
   
 Post subject:
PostPosted: Mon Mar 07, 2011 2:54 pm 
Offline
Genesi

Joined: Tue Feb 07, 2006 4:49 pm
Posts: 145
Location: San Antonio, TX
The battery information can be found in /sys/class/power_supply/battery. If conky can be used to probe upower for the information that might be even better, it is what gnome-power-manager uses on Ubuntu to get the different stats. I would be interested to see how this turns out, mind providing a screenshot once you have it all set up?

_________________
Steev Klimaszewski, Genesi USA Inc.
Senior Software Engineer


Top
   
 Post subject: Result
PostPosted: Mon Mar 07, 2011 8:31 pm 
Offline

Joined: Sat Feb 12, 2011 5:05 am
Posts: 10
Location: Moscow
Yeap,
Image

And, finaly, battery part of .conkyrc:
Code:
${color #8193a6}Charge: $color${execi 10 echo "scale=2; `cat /sys/class/power_supply/battery/charge_now` / `cat /sys/class/power_supply/battery/charge_full`" | bc | sed "s/^[\.]*//" | sed "s/^[0]*//"}% ${color #8193a6}Status: $color${execi 10 cat /sys/class/power_supply/battery/status}
Thanks, steev!


Top
   
 Post subject: Re: Result
PostPosted: Tue Mar 08, 2011 10:14 am 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
Quote:
Yeap,
Image

And, finaly, battery part of .conkyrc:
Code:
${color #8193a6}Charge: $color${execi 10 echo "scale=2; `cat /sys/class/power_supply/battery/charge_now` / `cat /sys/class/power_supply/battery/charge_full`" | bc | sed "s/^[\.]*//" | sed "s/^[0]*//"}% ${color #8193a6}Status: $color${execi 10 cat /sys/class/power_supply/battery/status}
Thanks, steev!
This would be more correct:
Code:
upower -i `upower -e | grep battery`
You can pull the data from there. One of the more interesting things to pull might be the "energy-rate" value as this is your system power consumption in watts.

_________________
Matt Sealey


Top
   
 Post subject:
PostPosted: Tue Mar 08, 2011 11:05 am 
Offline

Joined: Sat Feb 12, 2011 5:05 am
Posts: 10
Location: Moscow
Thanks...
Code:
upower -i `upower -e | grep battery` | grep percentage | awk '{print $2}'


Top
   
 Post subject:
PostPosted: Wed Mar 09, 2011 2:15 pm 
Offline

Joined: Sat Feb 12, 2011 5:05 am
Posts: 10
Location: Moscow
Upower geting wrong information some times :(


Top
   
 Post subject:
PostPosted: Wed Mar 09, 2011 9:14 pm 
Offline
Genesi

Joined: Tue Feb 07, 2006 4:49 pm
Posts: 145
Location: San Antonio, TX
Which kernel?

_________________
Steev Klimaszewski, Genesi USA Inc.
Senior Software Engineer


Top
   
 Post subject:
PostPosted: Thu Mar 10, 2011 3:25 am 
Offline

Joined: Sat Feb 12, 2011 5:05 am
Posts: 10
Location: Moscow
2.6.31 from genesi git

But information in /sys always correct...


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 8 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
PowerDeveloper.org: Copyright © 2004-2012, Genesi USA, Inc. The Power Architecture and Power.org wordmarks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org.
All other names and trademarks used are property of their respective owners. Privacy Policy
Powered by phpBB® Forum Software © phpBB Group