2008年1月21日星期一

testing cpufreq hal

svccfg import + filename: import a service
svcs service_name: to show whether a service is online
svcs -x service_name: to show the dependencies of the service.

1.Get processor properties
# lshal|grep processor
processor.can_throttle = false (bool)
processor.maximum_speed = 2391 (0x957) (uint64)
processor.number = 0 (0x0) (int)
info.capabilities = {'processor'} (string list)

2.introspect the interface
$ dbus-send --system --print-reply
--dest=org.freedesktop.Hal
/org/freedesktop/Hal/devices/computer
org.freedesktop.DBus.Introspectable.Introspect
....







direction="in"/>



call a method using dbus-send
# dbus-send --system --print-reply
--dest=org.freedesktop.Hal
/org/freedesktop/Hal/devices/computer
org.freedesktop.Hal.Device.CPUFreq.SetCPUFreqGovernor string:performance

没有评论: