1
0
Fork 0
Commit graph

31 commits

Author SHA1 Message Date
Pavol Žáčik
4502d7abd7
Make DBusExporter reusable for other services
Do not hardcode Polkit namespace into DBusExporter,
provide it as a parameter in the constructor.
2024-02-06 16:54:54 +01:00
Jan Zerdik
3e3f4678e8 Expose TuneD API to the Unix Domain Socket.
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>
2023-02-08 12:21:05 +01:00
Jaroslav Škarvada
476be07b46
Use python3 interpreter by default
This may ease development, because development environment will
be probably already on python3.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2019-11-18 11:21:33 +01:00
Lidong Zhong
4791290f9b log: add two options(log_file_count and log_file_maxbytes) in the main config file
Currently the logrotation is not configurable. On system with large
amount of cpus a tuned start creates a lot of entries and older log
entries are lost.
2018-09-11 15:42:53 +08:00
Jaroslav Škarvada
f563c7d756
An attempt to port Tuned to python3 and keeping it python2 compatible
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-12-21 10:20:13 +01:00
Jaroslav Škarvada
209bd3291c tuned: fixed profile switching in no_daemon mode
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-07-14 17:31:02 +02:00
Jaroslav Škarvada
4cefd36c87 tuned: added one-shot no daemon mode
Most of the functionality don' work in this mode, it just
applies the settings, no rollback possible.

Disable daemon by setting 'daemon = 0' in /etc/tuned/tuned-main.conf

This settings can be overridden if running tuned with '-d' command line
option. In such case daemon mode will be used.

Resolves: rhbz#1068663

Also fixed interpretation of booleans in main config.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2015-07-02 17:17:31 +02:00
Jaroslav Škarvada
9520364fca tuned: always write PID file, even if not daemon
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2014-09-24 19:26:25 +02:00
Jaroslav Škarvada
d233fd7c31 misc: bumped year in copyright to 2013
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2013-11-27 09:30:07 +01:00
Jaroslav Škarvada
9c1f10945e tuned: new option --pid, -P to write PID file
If used without argument as --pid or -P the tuned will write the PID file even
if running in foreground. The PID file is always written if running as daemon.

If used with argument as --pid FILE or -P FILE, the PID will be written to
FILE. This is also applicable for daemon.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2013-02-18 14:31:06 +01:00
Jaroslav Škarvada
f560833d7a tuned, tuned-adm: moved dbus consts to consts file
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2013-02-18 12:18:18 +01:00
Jaroslav Škarvada
b68fea0ca9 tuned, tuned-adm: added new option --version, -v to show version
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2013-02-18 12:15:25 +01:00
Jaroslav Škarvada
7a4d1f2399 tuned: new option --log, -l to select log file
If used without argument as --log or -l the tuned will log to file even if
running on foreground. It will not log to console. This is the default if
running as daemon.

If used with argument as --log FILE, -l FILE, the log will be stored to FILE.
This is also applicable for deamon.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2013-02-18 11:09:57 +01:00
Jan Vcelak
a49f53e60f GPL headers only into executables and main module
GPL license does not require all files to have the copyright notice
and header. To save some space, I removed the headers from all files
except the executables and the main Python module.
2012-11-09 12:27:20 +01:00
Jan Vcelak
000e82f258 tuned: move daemon code into submodule, improve forking, signal handling, pidfile handling 2012-11-08 18:23:44 +01:00
Jan Vcelak
6f2c2ca6fd tuned: switch to argparse module 2012-11-08 14:26:51 +01:00
Jan Vcelak
14e183f93d tuned controller: allow state when no profile is enabled 2012-11-05 17:02:52 +01:00
Jaroslav Škarvada
7bccbc9a4e Replaced all getuid by geteuid 2012-10-31 11:00:23 +01:00
Jan Vcelak
09d20c648a run python interpret with '-Es' options 2012-10-30 11:40:29 +01:00
Jan Vcelak
20464804f8 tuned: add --no-dbus option to help 2012-10-26 17:59:29 +02:00
Jan Vcelak
d388dec6ab remove circular dependencies between library and tests 2012-10-26 17:59:29 +02:00
Jan Vcelak
c66d5e44cb Daemon: handle plugin selection logic 2012-10-26 17:59:29 +02:00
Jaroslav Škarvada
466dc4c767 Write pidfile even if running in foreground (for tuned-adm to work) 2012-10-25 12:05:10 +02:00
Jan Vcelak
2b7e754c08 move tuned initialization into separate object 2012-05-07 17:10:28 +02:00
HanzZ
d2800cbf55 Allow loading two profiles using tuned -c profile1 -c profile2 2012-05-07 09:17:14 +02:00
Jan Kaluza
762c30b97a Cleanup plugins when changing profile 2012-03-12 13:45:56 +01:00
Jan Kaluza
d3958b948d Store current profile into /etc/tuned/active_profile and read it on SIGHUP fromt here 2012-03-08 10:20:22 +01:00
Jan Kaluza
449bdac971 Probably fixed daemonize 2012-02-01 09:15:13 +01:00
Jan Vcelak
725ee9a8af move control logic from daemon to controller 2011-11-16 22:29:44 +01:00
Jan Vcelak
94e49f6473 switch signal handling to tuned.utils 2011-11-16 11:40:08 +01:00
Jan Vcelak
67e736a7f6 various fixes 2011-11-10 18:39:22 +01:00