tuned
tuned copied to clipboard
Avoid printing ERROR logs even if they are not really errors
Some log examples on my laptop:
2019-06-26 18:08:19,339 ERROR tuned.utils.commands: Executing modinfo error: modinfo: ERROR: Module cpufreq_conservative not found. 2019-06-26 18:08:19,339 ERROR tuned.plugins.plugin_modules: kernel module 'cpufreq_conservative' not found, skipping it
or:
2019-06-26 18:08:19,341 ERROR tuned.utils.commands: Error when reading file '/sys/class/drm/card0/device/power_method': '[Errno 2] No such file or directory: '/sys/class/drm/card0/device/power_method''
Some more from some RT servers:
2019-06-26 02:15:16,376 ERROR tuned.plugins.plugin_sysctl: Failed to read sysctl parameter 'kernel.numa_balancing', the parameter does not exist 2019-06-26 02:15:16,376 ERROR tuned.plugins.plugin_sysctl: sysctl option kernel.numa_balancing will not be set, failed to read the original value.
or:
2019-06-26 03:01:16,847 ERROR tuned.plugins.plugin_scheduler: Failed to set affinity of PID 4084 to '[0, 2, 4, 6, 8, 10]': [Errno 22] Invalid argument
AFAICT all these ERRORs that I pasted are not vital or even many of them are just informative. Would it make sense that we change these ERRORs into WARNINGs or even INFOs (we obviously know we can skip cpufreq_conservative)? These could help people who is not yet familiar with tuned to better understand what has really went wrong, instead of thinking that tuned was not working properly. Also, people can grep ERROR for real errors.
Thanks for the report. I agree with your comments. This is something we are trying to gradually improve. Feel free to provide PR.