Battery is command line program displaying information about the battery in portable computers running Mac OS X. It should be run from a Terminal window.
The program should handle both single and dual battery systems, even though only a single battery system has been used for testing. Feedback on any problem is appreciated.
Version 1.0 of the battery script did not work with Panther (Mac OS 10.3) as the format of the output from the ioreg program has changed. Panther users should upgrade to the current version available here.
Versions up to 1.2 of the battery script does not work with Mac OS 10.3.8 as the format of the output from the ioreg program has changed again.
Mac OS 10.3.8 and 10.3.9 requires version 1.3 or later of the battery script.
Mac OS 10.4 requires version 1.4 of the battery script available here.
The output from the ioreg program has drastically changed for the new Intel based hardware. The Intel Macs will require a new version of the battery script.
|battery||Display battery information in long form.|
|battery long||Display battery information in long form.|
|battery short||Display battery information in short form.|
|battery compact||Display battery information in compact form.|
|battery csv||Display battery information in csv form.|
$ battery Battery 1 Battery: battery installed, below warning level, raw LOW signal Charger: charger not connected, not charging UPS: UPS not installed Voltage: 10.304V Current: 1.144A (approx 0:10) Capacity: 0.188Ah of 4.149Ah (4.5%) $ battery short 2003-03-17 01:06:29 1 L__W_i__ 10.284V 1.140A 0.188Ah of 4.149Ah (4.5%) $ battery short 2003-03-17 01:10:21 1 _____i+c 11.499V 1.200A 0.249Ah of 4.149Ah (6.0%) $ battery Battery 1 Battery: battery installed, above warning level Charger: charger connected, not charging UPS: UPS not installed Voltage: 12.596V Current: 1.200A (approx 3:27) Capacity: 4.149Ah of 4.149Ah (100.0%) $ battery compact 20030317 124528 1 00000101 12.556 1.200 4.134 4.149 99.6 $ battery csv 20030317,124530,1,00000101,12.556,1.200,4.134,4.149,99.6 $
ip_decoder is command line program used to display the
contents of an IP packet.
It should be run from a Terminal window.
ip_decoder program reads a, possibly truncated, IP packet
from standard input (as blank or newline separated hex format bytes) and
outputs a decoded description of the IP packet.
The intended use was to decode the first 48 bytes of the IP packet that
that triggered the last connection as displayed by the
D-Link DI-106 ISDN router in Menu 24.1, but any source
for the IP packet bytes can be used.
There is no requirement that the IP packet must be 48 bytes either,
ip_decoder decodes what it can from the bytes it is given.
# ip_decoder Enter IP packet as hex bytes separated by blanks or newlines. End with ^d after last line. 45 00 00 54 19 5F 40 00 FE 01 23 F3 C0 A8 0A 02 C0 47 B4 64 08 00 0D 51 47 51 00 00 3C CA 5A F9 00 01 20 96 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 ^D Decoded IP packet: IP header Protocol = 1 ICMP Source address = 192.168.10.2 Destination address = 18.104.22.168 ICMP Type of message = 8 Echo request Type sub code = 0 N/A #
Apple added support for RAW image files in Mac OS X 10.4. Programs such as Preview, iPhoto and Aperture depends on the builtin support to handle RAW files. One of the supported RAW image file formats added by the Mac OS X 10.4.3 upgrade is for the Konica Minolta Maxxum 7D, a camera that is known as the Konica Minolta Dynax 7D in Europe and Konica Minolta Alpha 7D in Japan. Unfortunately Apple didn't know/care about the Maxxum/Dynax/Alpha name games and only added support for the Maxxum!
The instructions below shows how to fix this problem in Mac OS X 10.4.3 for the Dynax 7D. Implementing the same fix for Alpha will most likely also fix the problem with the Alpha 7D.
An alternative to the instructions below is to upgrade to Mac OS X 10.4.4.
Information used by the image I/O framework to read RAW files are stored in a file deep iside Mac OS X. The file can be edited to add support for the Konica Minolta Dynax 7D.
Upgrade to Mac OS X 10.4.3 if you haven't done this already.
Open a Terminal window and type the following commands. Enter your admin password when the sudo command asks for it.
cd /System/Library/Frameworks cd ApplicationServices.framework/Versions/A cd Frameworks/ImageIO.framework/Versions/A cd Resources sudo cp Raw.plist MACOSX-Raw.plist sudo cp Raw.plist ~/Desktop
The reason for copying the file to the desktop is that a normal user
does not have the privileges to change files in the Resources folder
sudo command is used to temorarily gain extra
Ordinary GUI editors, like TextEdit, does not have the equivalent of
sudo so the desktop is used as a place where the user
can change the file.
Now open the
Raw.plist file found on your desktop
using a text editor, e.g. TextEdit, and search for the text
One alternative is to replace
This adds support for the Dynax 7D, but drops support for the Maxxum 7D.
The other alternative is to copy the section that looks like this
<key>MINOLTA-MAXXUM 7D</key> <dict> . . . . </dict>
MAXXUM in the copied section with
so it looks like this
<key>MINOLTA-DYNAX 7D</key> <dict> . . . . </dict>
This alternative keeps the support for the Maxxum 7D.
Back in the terminal window type:
sudo cp ~/Desktop/Raw.plist .
When completed this will have added support for the Dynax 7D in Preview, iPhoto, Aperture and all other programs that use the builtin RAW file support.
The page has been visited
times since 2003-03-17.
Last modified 2006-09-03 23:10:13 (built 2013-01-22 19:54:27).
Copyright © 2002-2013 Göran Larsson. All rights reserved.