File: README

package info (click to toggle)
powernowd 0.90-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 92 kB
  • ctags: 52
  • sloc: ansic: 461; sh: 66; makefile: 45
file content (174 lines) | stat: -rw-r--r-- 6,708 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
PowerNow Daemon, (c) 2003-2004 John Clemens
Daemon to control the speed and voltage of CPUs.

This is a simple client to the CPUFreq driver that uses Linux kernel v2.5/v2.6 
sysfs interface.  You need a supported CPU and a kernel that supports 
sysfs to run this daemon.  The name is somewhat misleading, as this will work
with any CPUfreq capable processor, not just processors supporting AMD's 
PowerNow! technology.  However, it is designed to work better on processors 
that support more then 2 frequency steps like those with AMD's PowerNow! or the
new Pentium M processors. 

This daemon has been tested on:
	AMD Mobile Duron 850MHz
	PowerPC G3 900MHz
	AMD K6-2+ 450MHz

I have gotten successful reports of people running this on:
	SMP Intel P4-m (speedstep, hyperthreading)
	Intel P3
	Intel Pentium-M
	
Because there's really nothing AMD-specific about this daemon, I may change 
the name in the near future.. I was thinking of 'freqout', so be prepared ;-)

COMPILING:
----------

cd powernowd-x.xx/
make

(then, as root)
make install

This will make the binary and install it in /usr/sbin with permissions "755".

USAGE:
------

As root:

	powernowd <options>

Available Options:
	-h	print help message
	-d	don't detach from terminal (default is to
		detach and run in the background)
	-v	Increase output verbosity, can be used more than once. 
	-q	Quiet mode, only emergency output.
	-n	Include 'nice'd processes in calculations
	-m #	Modes of operation, can be 0, 1, 2, or 3:
		0 = SINE, 1 = AGGRESSIVE (default), 2 = PASSIVE, 3 = LEAPS
	-s #	Frequency step in kHz (default = 100000)
	-p #	Polling frequency in msecs (default = 1000)
	-u #	CPU usage upper limit percentage [0 .. 100, default 80]
	-l #    CPU usage lower limit percentage [0 .. 100, default 20]

MODES:
------

There are 3 modes supported by this client:

Mode 0, SINE : Changes the frequency as a sine wave function, raising the 
               frequency by "step" Hz every time the CPU usage goes over 80%,
	       and decreases it by "step" Hz when the CPU usage falls under
	       20%.
Mode 1, AGGRESSIVE : Changes frequency by a sawtooth function.	Immediately
		     jumps to the highest frequency whenever CPU usage goes 
		     over 80%, and decreases by "step" Hz as it drops below
		     20%.  This is the default behavior as I've found it to
		     give the best results.
Mode 2, PASSIVE : The inverse of AGGRESSIVE. Immediately jump to lowest 
		  frequency when usage drops below 20%. Raise by "step" Hz
		  if it goes above 80%.
Mode 3, LEAPS :	Immediately jump to the highest frequency if usage above 80%.
		Immediately jump to the lowest frequency if usage below 20%.


PAUSING:
--------

PAUSING was a feature added in v0.85, and removed in v0.90.  You can achieve
the same behavior by killing the daemon and restarting it, and I felt it 
wasn't worth the extra complexity and possible security concerns to keep 
this extra interface.  

PHILOSOPHY:
-----------

OK, so why ANOTHER CPUFreq client daemon?  There are several others out there,
and many of them are very good.  So why make another one? Well, there are 
several reasons.  

* A lot of daemons out there now are much better suited for two speed states, 
  like Intel's Speedstep technology.  They toggle between two states based upon 
  load.  I happen to own an AMD Duron w/ PowerNow with several power states, so 
  I wanted something that would do intermediate steps. 

* Some daemons are written in Perl/python or in C++.  I wanted just a simple C
  daemon.

* I wrote mine around the time everyone else was writing their's, so there 
  weren't that many when I started :)

* Many of them rely on APM or ACPI and change their behavior based upon 
  battery status, AC status, temperature, etc.. or other things that I
  strongly feel are the wrong things to measure.  If I'm using the CPU, i need 
  it, and if I'm not, i don't.  PowerNowd measures one thing and one thing
  only; CPU load. It bases it's decisions solely upon that.  It doesn't matter 
  if I'm on battery, or on AC, or whatever.  What good is having a nice 
  powerful laptop if you can't use it at full speed, even for a few seconds, 
  while on batter power?  If I desperately wanted longer battery life, I 
  wouldn't be running a daemon to dynamically control my CPU speed, I'd just 
  set it to "low".  And, considering most laptops sit idle 99% of the time, the
  other things will follow anyway.

* The reliance on APM or ACPI makes some other daemons unportable to different
  architectures, such as PPC or UltraSparc, which support CPUFreq.

* For kicks, i wanted to make one SMP capable, and allow CPUfreq's use in it's
  other most useful place... servers.

I did not find any other daemons which met all the above criteria. So i wrote 
my own.  If you don't agree with the above, look elsewhere.  Or, use my code
as a starting point for your own endeavors. 

CHANGELOG:
----------

(7-13-03)
v0.75	Initial Release

(8-9-03)
v0.80	Better error reporting/handling (some ideas from Warren Togami 
          <warren@togami.com>)
	Added syslog output support
	Added Makefile, README, LICENSE, etc.
	Remove find_mount() function (sysfs is supposed to be in /sys)
	Added -s and -p options to override default frequency step and polling
	  frequency.
	Added -u and -l options to override high/low water marks.
	Fixed bug where we were defaulting to SINE, not AGGRESSIVE. 

(11-30-03)
v0.85   Better error text, more helpful then "couldn't open file".
	Fixed a few memory initialization bugs reported by users. 
	Added -n option to force inclusion of nice'd processes.
	Added -b option and SIGUSR1/2 support for pausing/restarting the
	  daemon.  See README, section 'PAUSING'.
	Added code to handle buggy Athlons, but ifdef'd out because i think
	  the bug has been fixed, so it isn't needed anymore. 
	Fixed up a few of my more egregious spelling mistakes (from haste).

(2-8-04)
v0.90   Added support for drivers (longhaul) which report speed values in 
	  MHz instead of KHz.
	Removed -b option and PAUSING support.
	Removed dead code to work around buggy athlon bios's, the driver now
	  does this correctly.
	Added sample powernowd init script to show how to emulate old PAUSE
	  behavior. 
	Spell checked the README and web page, finally ;)
	Added LEAPs mode and verbosity patches from Hans Ulrich Niedermann.
	Fixed up verbosity mode/printf/syslog infrastructure.

AUTHOR:
-------

Written by John Clemens <clemej@alum.rpi.edu>

You can find out more information and download the latest version of
powernowd from http://www.deater.net/john/powernowd.html

You can find out more information about me at http://www.deater.net/john
I welcome comments and contributions :)