All about MAC os , Android , Server equipment specification > Package on mac

mac check battery and life cycle via command line console howto

(1/1)

golfreeze:
###Check % of battery on mac via command link
$ pmset -g batt
Now drawing from 'Battery Power'
 -InternalBattery-0   100%; discharging; (no estimate)

###Check cycle of your battery on mac via command link
$ ioreg -l -w0 |grep Capacity
    | |           "MaxCapacity" = 4152
    | |           "CurrentCapacity" = 4128
    | |           "LegacyBatteryInfo" = {"Amperage"=18446744073709549727,"Flags"=5,"Capacity"=4152,"Current"=4128,"Voltage"=7870,"Cycle Count"=455}
    | |           "DesignCapacity" = 6700

###check cycle of charge
$system_profiler SPPowerDataType | grep "Cycle Count" | awk '{print $3}'

golfreeze:
Cycle Count คืออะไร ก็คือค่าที่มีการชาจต์แบตเตอรี่บนเครื่อง mac มากี่รอบการชาจ์ตแล้ว
 
ค่าตัวนี้จะเพิ่มขึ้นก็ต่อเมื่อ มีการใช้งาน แบตเตอรี่ ลดลงเหลือน้อยกว่าหรือเท่ากับ 9%
และขีดแบตที่โชว์จะขึ้นเป็นแถบสีแดงบริเวณ มุมซ้ายบนของเครื่อง
หลังจากนั้นเมื่อทำการชาจต์แบต ค่า Cycle Count จะเพิ่มขึ้น +1 ครับ เช่นถ้าเป็น 455 ครั้งอยู่ก่อนชาจ์ต
หลังจากทำการชาจต์ก็จะแสดงเป็น "Cycle Count"=456 ครับผม

Packetlove.com

golfreeze:
==วันนี้ได้ทำการเปลี่ยน Battery MacBookPro ที่สั่งซื้อมาใหม่เสร็จครับ
แล้วรันเชค MaxCapa กับ Cycle ดูจะขึ้นเป็น MaxCapa = 6880 , CurrentCapa = 6868
และ Cycle Count = 1  เยี่ยมไปเลย ลองดูกันว่าจะใช้ได้กี่ปี  : )

#ioreg -l -w0 |grep Capacity
    | |           "AppleRawCurrentCapacity" = 6868
    | |           "AppleRawMaxCapacity" = 6880
    | |           "MaxCapacity" = 6880
    | |           "CurrentCapacity" = 6868
    | |           "LegacyBatteryInfo" = {"Amperage"=18446744073709551318,"Flags"=4,"Capacity"=6880,"Current"=6868,"Voltage"=12274,"Cycle Count"=1}
    | |           "DesignCapacity" = 6559
    | |           "BatteryData" = {"StateOfCharge"=25600,"Voltage"=12594,"QmaxCell1"=46882,"QmaxCell2"=33570,"DesignCapacity"=6559,"QmaxCell0"=38946,"CycleCount"=1}

นำร่อง

[0] ดัชนีข้อความ

Go to full version