This repository has been archived on 2023-08-23. You can view files and clone it, but cannot push or open issues or pull requests.
obsdfreqd/obsdfreqd.1

98 lines
2.7 KiB
Groff

.Dd $Mdocdate: March 16 2021 $
.Dt OBSDFREQD 1
.Os
.Sh NAME
.Nm obsdfreqd
.Nd manage the CPU frequency on OpenBSD from userland
.Sh SYNOPSIS
.Nm
.Op Fl hv
.Op Fl d Ar downstepfrequency
.Op Fl i Ar inertia
.Op Fl m Ar maxfrequency
.Op Fl l Ar minfrequency
.Op Fl r Ar threshold
.Op Fl s Ar stepfrequency
.Op Fl t Ar timefrequency
.Oo Fl T Ar maxtemperature
.Op Fl S Ar sensorpath
.Oc
.Sh DESCRIPTION
.Nm
is a program to play with the CPU frequency scheduler by providing
many variables involved in the process.
.Nm
will switch the frequency policy to manual to manage the frequency itself
and will restore the policy to auto upon exit.
.Sh OPTIONS
Arguments can be comma separated to provide different values for when on
battery, if so, the first value is used when power plug is connected and second
value when on battery.
.Bl -tag -width Ds
.It Fl v
Enable verbose output in CSV format.
.It Fl h
Display usage
.It Fl d Ar downstepfrequency
Defines the frequency decrease step in percent.
.It Fl i Ar inertia
Defines the number of cycles under the CPU threshold before decreasing
frequency.
.It Fl m Ar maxfrequency
Defines the maximum frequency in percent the CPU can be increased to.
.It Fl l Ar minfrequency
Defines the minimum frequency in percent the CPU can be reduced to.
.It Fl r Ar threshold
Defines the CPU usage in percent above which the frequency is increased.
The default is to use a value that match the usage of 80% of a single core.
Example: for a 4 CPU system, the threshold will be 100/4*0.8 = 20%
.It Fl s Ar stepfrequency
Defines the frequency increase step in percent.
.It Fl t Ar timefrequency
Defines the time in milliseconds between each cycle.
.It Fl T Ar maxtemperature
Defines the maximum temperature in Celcius
.Nm
will allow before lowering the maximum frequency until the temperature
cooled down.
.It Fl S Ar sensorpath
In conjunction with
.Sy -T,
.No allows you to specify which sensor to use for temperature readings. If unspecified,
.Nm
will try to guess which temperature sensor to use (usually hw.sensors.cpu0.temp0).
.El
.Sh EXIT STATUS
.Ex
.Sh EXAMPLES
Temperature throttling at 50°C
.Bd -literal -offset indent
obsdfreqd -T 50
.Ed
.Pp
Temperature throttling at 50°C using sensor hw.sensors.acpithinkpad0.temp0
.Bd -literal -offset indent
obsdfreqd -T 50 -S hw.sensors.acpithinkpad0.temp0
.Ed
.Sh DIAGNOSTICS
.Nm
has a verbose mode to get realtime information about frequency.
.Sh AUTHORS
.An See the LICENSE file for the authors .
.Sh LICENSE
See the LICENSE file for the terms of redistribution.
.Sh BUGS
When set to run a startup, if you also start the
.Xr apmd 8
service, make sure to start it with
.Fl H
or
.Fl L
to avoid
.Xr apmd 8
to reset the performance policy to automatic which would cause
.Nm
to crash.
.Pp
There may be other bugs.