Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Give your battery a thorough checkup' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Give your battery a thorough checkup
Authored by: robx on Mar 13, '03 05:39:18PM

have very strange values: with two batteries on LOMBARD {right slot}
1:
voltage=11161 flags=133/0x085 amperage=1200 capacity=2642 current=0 voltage=0 flags=1 amperage=0 capacity=0 current=0 [0.0%]
2:
voltage=12699 flags=133/0x085 amperage=1200 capacity=4425 current=0 voltage=0 flags=1 amperage=0 capacity=0 current=0 [0.0%]

please help- need some information about the flags, whats wrong??



[ Reply to This | # ]
show the raw data
Authored by: gcole on Mar 13, '03 08:41:19PM
Try this, and post the results; it may indicate where the issue lies.

/usr/sbin/ioreg -p IODeviceTree -n battery -w 0 | sed -n '/battery/','/}$/'p

(That's "w zero pipe" after the first "battery", where pipe is probably shift-\.) The sed portion shows everything between "battery" and the next line that ends in "}", which is the end of the battery block.

[ Reply to This | # ]

-> the raw data
Authored by: robx on Mar 14, '03 05:41:40AM
1:
% /usr/sbin/ioreg -p IODeviceTree -n battery -w 0 | sed -n '/battery/','/}$/'p
      | | +-o battery@3  
      | | |   {
      | | |     "reg" = 
      | | |     "AAPL,phandle" = 
      | | |     "device_type" = 
      | | |     "name" = 
      | | |     "IOBatteryInfo" = (
{"Voltage"=12657,"Flags"=133,
"Amperage"=1055,"Capacity"=4425,"Current"=0},
{"Voltage"=0,"Flags"=1,
"Amperage"=0,"Capacity"=0,"Current"=0})
      | | |   }

2:
% /usr/sbin/ioreg -p IODeviceTree -n battery -w 0 | sed -n '/battery/','/}$/'p
      | | +-o battery@3  
      | | |   {
      | | |     "reg" = 
      | | |     "AAPL,phandle" = 
      | | |     "device_type" = 
      | | |     "name" = 
      | | |     "IOBatteryInfo" = (
{"Voltage"=11154,"Flags"=133,
"Amperage"=1055,"Capacity"=2642,"Current"=0},
{"Voltage"=0,"Flags"=1,
"Amperage"=0,"Capacity"=0,"Current"=0})
      | | |   }
BOTH:
% /usr/sbin/ioreg -p IODeviceTree -n battery -w 0 | sed -n '/battery/','/}$/'p
      | | +-o battery@3  
      | | |   {
      | | |     "reg" = 
      | | |     "AAPL,phandle" = 
      | | |     "device_type" = 
      | | |     "name" = 
      | | |     "IOBatteryInfo" = (
{"Voltage"=11154,"Flags"=133,
"Amperage"=1200,"Capacity"=2642,"Current"=0},
{"Voltage"=12520,"Flags"=133,
"Amperage"=1200,"Capacity"=4425,"Current"=0})
      | | |   }
     

[ Reply to This | # ]