Solaris laptop battery status
By danx on Nov 26, 2006
Screen shot of my IBM Thinkpad T-40 laptop running Solaris 10. It shows batstat, apcipowertool, and GNOME battery status. My old, miss-used 6-cell battery only lasts an hour, as you can see. My new 9-cell battery lasts 4 hours.
Solaris does not have a battery status or monitor applet built-in, at least yet. However, thanks to Casper Dik and Darren Moffat, these tools are available. You can run Casper Dik's batstat CLI or acpipowertool GUI, and if you're using GNOME, you can optionally run Darren Moffat's port of the gnome-battery program. Here's how to install:
- Download APCI Driver from http://opensolaris.org/os/community/laptop/downloads/acpidrv.tar.gz
- Extract with gzcat apcidrv.tar.gz | tar xvf -
- Install with cd apcidrv-2006-01-04; ./install; ./postinstall This creates the /dev/acpidrv device, the batstat CLI, and acpipowertool GUI.
- To use, type batstat or apcipowertool on the command line.
I use GNOME and miss the battery icon that's in Linux. Fortunately, Darren Moffat ported batstat to Solaris, which uses the above /dev/acpidrv device driver. Here's how to install:
- Download Solaris GNOME battstat from http://blogs.sun.com/roller/resources/darren/gnome-battery.tar.gz
- Extract with gzcat gnome-batery.tar.gz | tar xvf -
- Install with cd gnome-battery; ./install; ./postinstall
- You can now add a battery status applet by right clicking on the GNOME toolbar, and selecting Add to Panel --> Utility --> Battery Charge Monitor
- The battery status is displayed on the taskbar and you get a pop-up window when the charge goes below 15%
Update: GNOME battery status is now integrated into GNOME for OpenSolaris. To install, right click on the task bar, click on "Add to Panel" then click on "Battery Charge Monitor".
- Casper Dik's blog entry about laptop tools
- Darren Moffat's blog entry about batery status meter
- Dan Anderson's Solaris FAQ question about battery status. Basically same stuff as is here.