Thursday June 14, 2007
Battery information on a Solaris laptop
Continuing from my previous blog on frkit, I now have access to battery information on my laptop with the acpipowertool and the batstat command.
The frkit modules are downloaded to /var/spool/frkit/downloads. Unzip and untar the acpidrv.tar.gz. (ACPI stands for Advanced Configuration and Power Interface). The batstat and acpipowertool are located in the acpidrv directory. Run the batstat command to get the battery information.
bash-3.00# batstat
System temperature = 43.0C
Battery 0 status:
Percentage remaining: 85.7%
Battery is currently discharging
Time remaining 1:31
Battery 1 not present
The batstat command has a number of options. From the README :
The batstat command supports a number of options:
-v - dump raw output
-x - xtitle output (implies looping)
-l - loop
-i sec - number of seconds for each loop
-p - use poll on acpidrv
-I - initialize the default batstat parameters for low
battery shutdown
$ batstat -v
System temperature = 43.0C
battery 0
bif_unit = 0
bif_design_cap = c648
bif_last_cap = b5e9
bif_tech = 1
bif_voltage = 2a30
bif_warn_cap = 3ab
bif_low_cap = 0
bif_gran1_cap = 0
bif_gran2_cap = 0
bif_model = G71C0004G810
bif_serial = 0120330707
bif_type = Li-ION
bif_oem_info =
battery 1
bif_unit = 0
bif_design_cap = 0
bif_last_cap = 0
bif_tech = 0
bif_voltage = 0
bif_warn_cap = 0
bif_low_cap = 0
bif_gran1_cap = 0
bif_gran2_cap = 0
bif_model =
bif_serial =
bif_type =
bif_oem_info =
battery 0
bst_state = 1
bst_rate = 68a6
bst_rem_cap = 8fd9
bst_voltage = 2bc0
battery 1
bst_state = 0
bst_rate = 0
bst_rem_cap = ffffffff
bst_voltage = 0
Battery 0 status:
Percentage remaining: 79.1%
Battery is currently discharging
Time remaining 1:22
Posted at 02:06PM Jun 14, 2007 by Jyothi Srinath in Sun | Comments[15]
Today's Page Hits: 116