Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 23 Oct 2014, 05:33
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Battery Monitoring Dotpup for JWM
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 6 [87 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6 Next
Author Message
pakt


Joined: 04 Jun 2005
Posts: 1089
Location: Sweden

PostPosted: Sat 04 Nov 2006, 12:00    Post subject:  

Rickrandom, what do you get if you run:

# ls /proc/acpi/battery/

I get 'BAT0 BAT1'

If you get 'BAT0', then run:

# cat /proc/acpi/battery/BAT0/state

What does that show?

_________________
Testing Puppy since v0.9.2 - my desktop OS since v1.0.7
Running SlaxerPup-4.12 - Puppy with a Slackware 12.2 heart Cool
Back to top
View user's profile Send private message 
Rickrandom

Joined: 21 Jan 2006
Posts: 195
Location: Bedfordshire, UK

PostPosted: Sat 04 Nov 2006, 13:01    Post subject:  

I get:

sh-3.00# ls /proc/acpi/battery/
BAT1
sh-3.00# cat /proc/acpi/battery/BAT1/state
present: no
sh-3.00# cat /proc/acpi/battery/BAT01/state
cat: /proc/acpi/battery/BAT01/state: No such file or directory
sh-3.00#
sh-3.00# cat /proc/acpi/battery/BAT0/state
cat: /proc/acpi/battery/BAT0/state: No such file or directory
sh-3.00#

I managed to type BAT01 once

Confused
Back to top
View user's profile Send private message 
pakt


Joined: 04 Jun 2005
Posts: 1089
Location: Sweden

PostPosted: Sat 04 Nov 2006, 14:01    Post subject:  

Rickrandom wrote:
I get:

sh-3.00# ls /proc/acpi/battery/
BAT1

sh-3.00# cat /proc/acpi/battery/BAT1/state
present: no

sh-3.00# cat /proc/acpi/battery/BAT0/state
cat: /proc/acpi/battery/BAT0/state: No such file or directory
sh-3.00#

Strange that you don't get BAT0. That should be your main battery.

Many laptops can be fitted with a second battery, e.g. in place of the CD drive to increase battery running time. I believe BAT1 is a reference to that second battery. In your case, as in most cases, it isn't present.

I really don't know why BAT0 doesn't show up. This is why you are getting '-%'.

This is what I get on my Dell Inspiron 510m:
Code:
# ls /proc/acpi/battery/
BAT0  BAT1

# cat /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            unknown
remaining capacity:      32000 mWh
present voltage:         16157 mV

# cat /proc/acpi/battery/BAT1/state
present:                 no

Paul

_________________
Testing Puppy since v0.9.2 - my desktop OS since v1.0.7
Running SlaxerPup-4.12 - Puppy with a Slackware 12.2 heart Cool
Back to top
View user's profile Send private message 
marksouth2000

Joined: 05 Apr 2006
Posts: 620

PostPosted: Sat 04 Nov 2006, 20:32    Post subject:  

One cannot assume that a sole battery will be BAT0. The machine I'm typing this from has one battery, listed as BAT1.

I guess one needs to take the first entry returned from
Code:
ls /proc/acpi/battery/
as being the main battery, rather than assuming BAT0.
Back to top
View user's profile Send private message 
brad_chuck

Joined: 15 Aug 2005
Posts: 284
Location: Appalachian Mountains

PostPosted: Sat 04 Nov 2006, 20:55    Post subject: The script does this  

Rickrandom, can you type

Code:
ls /proc/acpi/battery/BAT1


and post the output?

Then for all the files in that dir type
Code:

cat /proc/acpi/battery/BAT1/filename



About your ideas... They sound great. When I get more work done all this can be done with a shell script.

It is bad when your are using a live CD because as of right now your laptop will just turn off! Ouch!




marksouth2000, That is what the script does now. Whatever the first dir in /proc/acpi/battery/ is the one that it uses. I also have BAT1 ?????
Back to top
View user's profile Send private message 
Rickrandom

Joined: 21 Jan 2006
Posts: 195
Location: Bedfordshire, UK

PostPosted: Sun 05 Nov 2006, 06:27    Post subject:  

Ok, did as you asked, after a bit of mis-typing:

sh-3.00# modprobe battery
sh-3.00# ls /proc/acpi/battery
BAT1
sh-3.00# ls /proc/acpi/battery/BAT1
alarm info state
sh-3.00# cat /proc/acpi/battery/BAT1/alarm
present: no
sh-3.00# cat /proc/acpi/battery/BAT1/info
present: no
sh-3.00# cat /proc/acpi/battery/BAT1/state
present: no
sh-3.00# modprobe ac
sh-3.00# ls /proc/acpi/ac
ls: /proc/acpi/ac: No such file or directory
sh-3.00# ls /proc/acpi/ac_adaptor
ls: /proc/acpi/ac_adaptor: No such file or directory
sh-3.00# ls /proc/acpi/ac_adapter
ACAD
sh-3.00# ls /proc/acpi/ac_adaptor/ACAD
ls: /proc/acpi/ac_adaptor/ACAD: No such file or directory
sh-3.00# ls /proc/acpi/ac_adapter/ACAD
state
sh-3.00# cat /proc/acpi/ac_adapter/ACAD/state
state: off-line
sh-3.00#
Back to top
View user's profile Send private message 
brad_chuck

Joined: 15 Aug 2005
Posts: 284
Location: Appalachian Mountains

PostPosted: Sun 05 Nov 2006, 10:46    Post subject: try this  

Ok, well this means that your kernel module is not loading. So we need to work on that.

Try one more thing.......

reboot and use
Code:

insmod battery
insmod ac


see if anything changes. When it works it will work so you can use batmon to test if your module is loaded. No need to type all that junk in the console.

What version of Puppy are you using?



Thank you for your patience.
Back to top
View user's profile Send private message 
Rickrandom

Joined: 21 Jan 2006
Posts: 195
Location: Bedfordshire, UK

PostPosted: Sun 05 Nov 2006, 12:56    Post subject:  

sh-3.00# insmod battery
insmod: can't read 'battery': No such file or directory
sh-3.00# insmod ac
insmod: can't read 'ac': No such file or directory
sh-3.00# modprobe battery
sh-3.00# insmod battery
insmod: can't read 'battery': No such file or directory
sh-3.00# modprobe ac
sh-3.00# insmod ac
insmod: can't read 'ac': No such file or directory

I'm using Puppy 2.10, booting from CD, with a pupsave file on the NTFS hard drive.

If you want me to look in the BIOS or elsewhere for anything, let me know, but I've no idea what to look for.
Back to top
View user's profile Send private message 
marksouth2000

Joined: 05 Apr 2006
Posts: 620

PostPosted: Sun 05 Nov 2006, 13:37    Post subject: Re: The script does this  

brad_chuck wrote:
marksouth2000, That is what the script does now. Whatever the first dir in /proc/acpi/battery/ is the one that it uses. I also have BAT1 ?????

Thanks brad_chuck. It's very rare for my feedback ever to get an acknowledgement, let alone result in a change in the code, so I'm over the moon to hear this!

Cheers,
Mark Cool
Back to top
View user's profile Send private message 
brad_chuck

Joined: 15 Aug 2005
Posts: 284
Location: Appalachian Mountains

PostPosted: Mon 06 Nov 2006, 09:13    Post subject: Try this!  

Rickrandom, You almost have me stumped. Embarassed But try to boot the CD with the startup option "puppy prefix=ram". If you can't do that make a new CD and boot that.

Then boot and try the batmon-0.0.2.tar.gz

Report results... Laughing



Just a note I have batmon-0.1.0 80% done.
Back to top
View user's profile Send private message 
amish

Joined: 24 Sep 2006
Posts: 616

PostPosted: Mon 06 Nov 2006, 09:35    Post subject: Re: Try this!  

sadly i'm not going to be able to test this, because i won't have access to the machine i did the script on. (my laptop has power management turned off)
_________________
sadly, it is not possible to separate politics from free software. free software - politics = unfree software.
Back to top
View user's profile Send private message 
kirk

Joined: 11 Nov 2005
Posts: 1419
Location: florida

PostPosted: Sun 12 Nov 2006, 22:44    Post subject:  

Tried batmon-0.0.2.tar.gz in 212beta2. Does not display in the tray, Shows up on the desktop.
Back to top
View user's profile Send private message 
brad_chuck

Joined: 15 Aug 2005
Posts: 284
Location: Appalachian Mountains

PostPosted: Mon 13 Nov 2006, 16:17    Post subject: hi kirka  

Yes, It will if you just run the exec. Check out the first post. Use the instructions to install it.

I have not put this into dotpup format yet because I don't think it is ready.
Back to top
View user's profile Send private message 
kirk

Joined: 11 Nov 2005
Posts: 1419
Location: florida

PostPosted: Mon 13 Nov 2006, 18:05    Post subject:  

Quote:
Use the instructions to install it.


Yep, I missed line. Sorry. Embarassed

Now it switches between free memory and a long line of strange symbols.

/proc/acpi/battery/BAT0/state:

Quote:
present: yes
capacity state: ok
charging state: charging
present rate: unknown
remaining capacity: 33310 mWh
present voltage: 16886 mV


I liked your original batmon with the seperate tray display. Could you re-post it?

Thanks
Back to top
View user's profile Send private message 
brad_chuck

Joined: 15 Aug 2005
Posts: 284
Location: Appalachian Mountains

PostPosted: Mon 13 Nov 2006, 21:37    Post subject: yes  

Another user requested it a while back. It is posted about half way down on the second page of this "topic".

I also prefer the no switching... This is the one I am using now.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 6 [87 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

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
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0826s ][ Queries: 13 (0.0048s) ][ GZIP on ]