battery capacity indicator button not working

i have this button (battery capacity indicator) in my macbook pro 2011 series that shows battery capacity, but when i press it nothing happens.

can i know if it is plugged in or not via a terminal command?

e.g.: ubuntu have 'lspci' command to know the plugged in devices

or how can i know if it is plugged via hardware disassembly ?

Edit:

here is how the button look like, its on the left of the macbook

enter image description here

Thanks


Solution 1:

Your indicator light seems broken and is pretty much hardwired. Did it ever see any moisture? Replacing it is a relatively difficult procedure, as seen in this video. You will find more guides on iFixit (e.g. this one) explaining how to get to the Battery Indicator Light. But I don't know where you could get a new one if yours is broken.

If you are looking for a terminal command to get your current power status, use pmset. pmset -g batt will tell your the current power source and remaining battery capacity:

$ pmset -g batt

Now drawing from 'AC Power'
 -InternalBattery-0 99%; charged; 0:00 remaining 

Solution 2:

I would personally recommend a SMC reset.

The SMC (System Management Controller) is involved in controlling peripherals such as LEDs, fans, touch pads, keyboards etc, and resetting it can often solve many related problems.

To reset the SMC, reboot the MacBook, and when the apple chime noise sounds and the screen is at blank white state. Press and hold the buttons Shift, Control and Option, release these 3 buttons simultaneously after a few seconds to successfully reset the SMC.

For More information: http://www.makeuseof.com/tag/reset-macs-smc-pram/

Of course there is always the possibility that this is a hardware problem. If this is the case, then (according to this blog) this small black cable has either come loose or is damaged; a problem which can be rectified by the nearest apple store, and they will likely do it for free.

enter image description here

Hope this has helped, and interested to know if the SMC reset worked out.