TuneD is listening on paths specified in config in option unix_socket_paths and send signals to paths in option unix_socket_signal_paths.
Example call:
printf '[{"jsonrpc": "2.0", "method": "active_profile", "id": 1}, 1]' | sudo nc -U /run/tuned/tuned.sock
printf '{"jsonrpc": "2.0", "method": "switch_profile", "params": {"profile_name": "balanced"}, "id": 1}' | sudo nc -U /run/tuned/tuned.sock
This PR also introduce possibility to disable dbus API in main TuneD config.
Resolves: rhbz#2113900
Signed-off-by: Jan Zerdik <jzerdik@redhat.com>
When the reapply_sysctl option in tuned-main.conf is set to 1, "system"
sysctls from /run/sysctl.d/*.conf, /etc/sysctl.d/*.conf and
/etc/sysctl.conf will be set *after* TuneD sysctl settings are applied.
As reapply_sysctl=1 is TuneD default, this can be confusing to TuneD
users who only rely on TuneD profile settings and do not know about this
functionality. We also need a way to inform other components using
TuneD about this.
This PR adds information about reapplied sysctls in TuneD logs.
Signed-off-by: Jiri Mencak <jmencak@users.noreply.github.com>
Extends the runtime API by the method:
instance_acquire_devices(devices, instance_name)
E.g. consider the following TuneD profile:
[cpus_perf]
type=cpu
devices=cpu0, cpu1
governor=performance
[cpus_idle]
type=cpu
devices=${f:cpulist2devs:2-3}
governor=ondemand
[cpus_idle2]
type=cpu
devices=${f:cpulist2devs:4-5,7}
governor=ondemand
Notice that it's possible to use internal function 'cpulist2devs' to easily
specify cpulists.
After the following API call:
instance_acquire_devices("cpulist:2-5,7", "cpus_perf")
It will result in cpu0 - cpu5 and cpu7 having the "performance" governor.
It's also possible to specify full device names in the API instead of the
cpulist, e.g.:
instance_acquire_devices("cpu2,cpu3,cpu4,cpu5,cpu7", "cpus_perf")
In case the comma is part of the device name, it can be escaped by "\,".
In case the device name starts with the string "cpulist:", e.g. there is
by accident device named "cpulist:abcd", it's possible to use
"cpulist:cpulist:abcd" to escape it and don't recognize it as the cpulist.
The cpulist expand feature also supports bitmasks variant prefixed by the
0x and written as a string, e.g. "0xffffffff", i.e. all the standard
TuneD cpulist syntaxes are supported.
Resolves: rhbz#2113925
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Now it should allow duplicate options and sections in the INI files, the
latest value is taken, the previous values are ignored, e.g.:
[selinux]
avc_cache_threshold=4096
avc_cache_threshold=8192
The avc_cache_threshold will be set to the 8192.
Related: rhbz#2071418
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
The new profile sets the intel_acpi driver to passive mode to
be able to set the standard acpi governors (ondemand/userspace)
and provides more flexibility on the C-states, as it is exposed
as a new variable.
Signed-off-by: Christophe Fontaine <cfontain@redhat.com>