MoonPoint Support Logo

 


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
January
Sun Mon Tue Wed Thu Fri Sat
         
31            
2016
Months
Jan


Sun, Jan 31, 2016 11:32 pm

Checking the battery charge from the command line on OS X

On a laptop running Apple's OS X oerating system, it is usually easy to check the state of the battery by just glancing at the top of the screen, but if you connect remotely to a system by Secure Shell (SSH) or just spend a lot of time at a command line interface (CLI), aka shell prompt, which you can obtain using the Terminal app, you may want a way to check the battery charge level by issuing a command from a command line. If so, you can use pmset -g batt (note: use "batt" not "battery").
$ pmset -g batt
Currently drawing from 'AC Power'
 -InternalBattery-0	100%; charged; 0:00 remaining
$ pmset -g batt
Currently drawing from 'Battery Power'
 -InternalBattery-0	86%; discharging; (no estimate)

In the first instance of the command being issued above on a MacBook Pro laptop, the power cable was plugged into the laptop and it was charging. In the second instance, the power cable was disconnected and the internal battery is discharging.

[/os/os-x] permanent link

Once You Know, You Newegg AliExpress by Alibaba.com

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo