2008年7月7日月曜日

いまさらcpufreq-infoを知る

自動起動のからみで、CPUモジュールを自分でインストールして、cpufreq-infoあたりを初めて知った

お暇なときはこんな感じに

$ cpufreq-info
cpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to linux@brodo.de, please.
analyzing CPU 0:
  driver: powernow-k8
  CPUs which need to switch frequency at the same time: 0 1
  hardware limits: 1000 MHz - 2.00 GHz
  available frequency steps: 2.00 GHz, 1.80 GHz, 1000 MHz
  available cpufreq governors: conservative, userspace, ondemand, powersave, performance
  current policy: frequency should be within 1000 MHz and 2.00 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1000 MHz.
analyzing CPU 1:
  driver: powernow-k8
  CPUs which need to switch frequency at the same time: 0 1
  hardware limits: 1000 MHz - 2.00 GHz
  available frequency steps: 2.00 GHz, 1.80 GHz, 1000 MHz
  available cpufreq governors: conservative, userspace, ondemand, powersave, performance
  current policy: frequency should be within 1000 MHz and 2.00 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1000 MHz.

CPU温度も下ってる

$ sensors
k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp:  +34.0°C
Core1 Temp:  +24.0°C

設定前は、40.0°C前後だった

Ubuntu 8.04で自動起動

PowerEdge T105のUbuntu 8.04(Server版)で自動起動をおこなう

19:30に自動起動をさせようと思ってこんなことをしてみた

# echo "2008-07-01 10:30:00" > /proc/acpi/alarm

当日の1回だけしか起動せず、これだけではダメなことが判明
powersavedが未インストールだったので、インストールをおこなった

$ sudo apt-get install powersaved

acpidが無いといわれた(ような気がした)ので、インストール

$ sudo apt-get install acpid

途中で、"FATAL: Module speedstep_centrino not found"とかいわれたので、下のものをインストール

$ sudo apt-get install cpufrequtils
$ sudo apt-get install sysfsutils

関係ないかもしれなけど、CPUモジュールをインストールしてみた

$ sudo modprobe powernow-k8

これで完璧かと思ったらまだダメで、/etc/init.d/hwclock.shの変更が必要だった

*** 30,35 ****
--- 30,36 ----
  # as machine hardware clock type for Alphas.
  HWCLOCKPARS=

+ ACPITIME=`cat /proc/acpi/alarm`
  hwclocksh()
  {
      [ ! -x /sbin/hwclock ] && return 0
***************
*** 130,135 ****
--- 131,137 ----
                if /sbin/hwclock --systohc $GMT $HWCLOCKPARS $BADYEAR; then
                    verbose_log_action_msg "Hardware Clock updated to `date`"
                fi
+               echo "$ACPITIME" > /proc/acpi/alarm
            else
                verbose_log_action_msg "Not saving System Clock"
            fi

参考