From ee35b241ad58a56ad52f59fbfae9d663c793baba Mon Sep 17 00:00:00 2001 From: Solene Rapenne Date: Sat, 12 Nov 2022 21:05:56 +0100 Subject: [PATCH] README: tweaks --- README.md | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7086a76..4b875ad 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,11 @@ Userland CPU frequency scheduling for OpenBSD >= 7.1 # TLDR -- clone this repository -- as root `make install` +- `pkg_add obsdfreqd` - as root `rcctl enable obsdfreqd` and `rcctl stop apmd ; rcctl disable apmd` - as root `rcctl start obsdfreqd` - apmd can be kept but not with flag `-A` -- most interesting flag for end users is `-T` +- if any tuning is needed, it may be `-T` for temperature limit # Compilation @@ -19,10 +18,25 @@ As easy as `make` Run `obsdfreqd` as root, quit with `Ctrl+C`. -# Installation +# Source installation -`make install` as root, enable the service using `rcctl enable -obsdfreqd`. +`make install` as root, enable the service using `rcctl enable obsdfreqd`. + +Create `/etc/rc.d/obsdfreqd` with this content and make it executable: + +``` +#!/bin/ksh + +daemon="/usr/local/sbin/obsdfreqd" + +. /etc/rc.d/rc.subr + +pexp="${daemon}.*" +rc_reload=NO +rc_bg=YES + +rc_cmd $1 +``` Start the service with `rcctl start obsdfreqd`. @@ -42,6 +56,7 @@ Parameters are applied when both plugged on the wall or on battery, parameters c - `-s stepfrequency` sets the percent of frequency added every cycle when increasing, 10% is default - `-t timefreq` sets the milliseconds between each poll, 300 is the default - `-T maxtemperature` sets the temperature threshold under which the maximum frequency will be temporary lowered until the CPU cools down +- `-S sensor` specify a sensor (using its sysctl path) to use with `-T` **Example**: