ACPI/PMU procfs HAL test program. Version 002.

Paul Ionescu i_p_a_u_l at yahoo.com
Mon Jan 24 02:00:08 PST 2005


On Mon, 24 Jan 2005 07:56:51 +0000, Richard Hughes wrote:

> On Mon, 24 Jan 2005 09:42:11 +0200, Paul Ionescu wrote:
>>> system.processor.maximum_speed
> 
> not sure where this can be found...

in /sys/devices/system/cpu/cpu0/cpufreq are a lot of goodies:

cpuinfo_cur_freq
cpuinfo_max_freq
cpuinfo_min_freq
scaling_available_frequencies
scaling_available_governors
scaling_cur_freq
scaling_driver
scaling_governor
scaling_max_freq
scaling_min_freq
scaling_setspeed

so we might add at least:
system.processor.minimum_speed
system.processor.current_speed

if not more appropriate:

system.processor.available_speeds (instead of min and max)

because on Pentium M we have multiple frequencies: 
cat scaling_available_frequencies 
1700000 1400000 1200000 1000000 800000 600000 



>>> battery.type
> 
> hard-coded to laptop for all batteries found in /proc/acpi?...

Well, I think we have to add another battery key:
battery.present BOOL
because we may have an acpi entry for 2 batteries, but only one currently
present.
At least I have it this way, and I know some others have this too:
 find /proc/acpi/battery/
/proc/acpi/battery/
/proc/acpi/battery/BAT1
/proc/acpi/battery/BAT1/alarm
/proc/acpi/battery/BAT1/state
/proc/acpi/battery/BAT1/info
/proc/acpi/battery/BAT0
/proc/acpi/battery/BAT0/alarm
/proc/acpi/battery/BAT0/state
/proc/acpi/battery/BAT0/info

[root at t41 root]# cat /proc/acpi/battery/BAT1/info
present:                 no
[root at t41 root]# cat /proc/acpi/battery/BAT0/info
present:                 yes
design capacity:         47520 mWh
last full capacity:      36350 mWh
battery technology:      rechargeable
design voltage:          10800 mV
design capacity warning: 1817 mWh
design capacity low:     200 mWh
capacity granularity 1:  1 mWh
capacity granularity 2:  1 mWh
model number:            IBM-08K8193
serial number:            1681
battery type:            LION
OEM info:                SANYO


> 
>>> battery.charge_level.maximum.real
>>> battery.charge_level.current
>>> battery.charge_level.unit
> 
> cat /proc/acpi/battery/BAT1/info ....
> 
> 
>> I think I could. Just let me some time to fully wake up :)
> 
> Pahh, some of us have to be up at the crack of dawn.... :-)

Yeah, I was just starting to sleep at the crack of dawn.. :)


_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list