�ɲɾ�����ӯ�����һ��ˣ��������С���˴��ͣ�������P���ҹ��ñ˽��ά�Բ��������˸߸ԣ�������ơ��ҹ��ñ�����ά�Բ���ˡ���˳^�ӣ������ӡ� ���ͯj�ӣ��ƺ���ӣ� ? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!PK b0]g~\j tuned.pidnu[3043908PK k0]>WW bootcmdlinenu[# This file specifies additional parameters to kernel boot command line and # initrd overlay images. Its content is set by the TuneD bootloader plugin # and sourced by the grub2-mkconfig (/etc/grub.d/00_tuned script). # # Please do not edit this file. Content of this file can be overwritten by # switch of TuneD profile. # # If you need to add parameters to the kernel boot command line, create # TuneD profile containing the following: # # [bootloader] # cmdline = YOUR_ADDITIONAL_KERNEL_PARAMETERS # # Then switch to your newly created profile by: # # tuned-adm profile YOUR_NEW_PROFILE # # Your current grub2 config will be patched, but you can also # regenerate it anytime by: # # grub2-mkconfig -o /boot/grub2/grub.cfg # # YOUR_ADDITIONAL_KERNEL_PARAMETERS will stay preserved. # # Similarly if you need to add initrd overlay image, create TuneD profile # containing the following: # # [bootloader] # initrd_add_img = INITRD_OVERLAY_IMAGE # # or to generate initrd overlay image from the directory: # # [bootloader] # initrd_add_dir = INITRD_OVERLAY_DIRECTORY TUNED_BOOT_CMDLINE= TUNED_BOOT_INITRD_ADD= PK k0]o profile_modenu[auto PK k0]post_loaded_profilenu[PK k0]kactive_profilenu[virtual-guest PK k0]>zZ  tuned-main.confnu[# Global tuned configuration file. # Whether to use daemon. Without daemon it just applies tuning. It is # not recommended, because many functions don't work without daemon, # e.g. there will be no D-Bus, no rollback of settings, no hotplug, # no dynamic tuning, ... daemon = 1 # Dynamicaly tune devices, if disabled only static tuning will be used. dynamic_tuning = 0 # How long to sleep before checking for events (in seconds) # higher number means lower overhead but longer response time. sleep_interval = 1 # Update interval for dynamic tunings (in seconds). # It must be multiply of the sleep_interval. update_interval = 10 # Recommend functionality, if disabled "recommend" command will be not # available in CLI, daemon will not parse recommend.conf but will return # one hardcoded profile (by default "balanced"). recommend_command = 1 # Whether to reapply sysctl from /run/sysctl.d/, /etc/sysctl.d/ and # /etc/sysctl.conf. If enabled, these sysctls will be re-appliead # after TuneD sysctls are applied, i.e. TuneD sysctls will not # override user-provided system sysctls. reapply_sysctl = 1 # Default priority assigned to instances default_instance_priority = 0 # Udev buffer size udev_buffer_size = 1MB # Log file count log_file_count = 2 # Log file max size log_file_max_size = 1MB # Preset system uname string for architecture specific tuning. # It can be used to force tuning for specific architecture. # If commented, "uname" will be called to fill its content. # uname_string = x86_64 # Preset system cpuinfo string for architecture specific tuning. # It can be used to force tuning for specific architecture. # If commented, "/proc/cpuinfo" will be read to fill its content. # cpuinfo_string = Intel # Enable TuneD listening on dbus # enable_dbus = 1 # Enable TuneD listening on unix domain socket # As this functionality is not used commonly, we disable it by default # and it is needed to allow it manually # enable_unix_socket = 0 # Path to socket for TuneD to listen # Existing files on given path will be removed # unix_socket_path = /run/tuned/tuned.sock # Paths to sockets for TuneD to send signals to separated by , or ; # unix_socket_signal_paths = # Default unix socket ownership # Can be set as id or name, -1 or non-existing name leaves unchanged # unix_socket_ownership = -1 -1 # Permissions for listening sockets # unix_socket_permissions = 0o600 # Size of connections backlog for listen function on socket # Higher value allows to process requests from more clients # connections_backlog = 1024 # TuneD daemon rollback strategy. Supported values: auto|not_on_exit # - auto: rollbacks are always performed on a profile switch or # graceful TuneD process exit # - not_on_exit: rollbacks are always performed on a profile # switch, but not on any kind of TuneD process exit # rollback = auto PKp0]G=grub2/00_tunednuȯ#! /bin/sh set -e # grub-mkconfig helper script. # Copyright (C) 2014 Red Hat, Inc # Author: Jaroslav Škarvada # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # tunedcfgdir=/etc/tuned tuned_bootcmdline_file=$tunedcfgdir/bootcmdline . $tuned_bootcmdline_file echo "set tuned_params=\"$TUNED_BOOT_CMDLINE\"" echo "set tuned_initrd=\"$TUNED_BOOT_INITRD_ADD\"" PKp0]0rdefirqaffinity.pynuȯ#!/usr/libexec/platform-python # Helper script for realtime profiles provided by RT import os import sys irqpath = "/proc/irq/" def bitmasklist(line): fields = line.strip().split(",") bitmasklist = [] entry = 0 for i in range(len(fields) - 1, -1, -1): mask = int(fields[i], 16) while mask != 0: if mask & 1: bitmasklist.append(entry) mask >>= 1 entry += 1 return bitmasklist def get_cpumask(mask): groups = [] comma = 0 while mask: cpumaskstr = '' m = mask & 0xffffffff cpumaskstr += ('%x' % m) if comma: cpumaskstr += ',' comma = 1 mask >>= 32 groups.append(cpumaskstr) string = '' for i in reversed(groups): string += i return string def parse_def_affinity(fname): if os.getuid() != 0: return try: with open(fname, 'r') as f: line = f.readline() return bitmasklist(line) except IOError: return [ 0 ] def verify(shouldbemask): inplacemask = 0 fname = irqpath + "default_smp_affinity"; cpulist = parse_def_affinity(fname) for i in cpulist: inplacemask = inplacemask | 1 << i; if (inplacemask & ~shouldbemask): sys.stderr.write("verify: failed: irqaffinity (%s) inplacemask=%x shouldbemask=%x\n" % (fname, inplacemask, shouldbemask)) sys.exit(1) # now verify each /proc/irq/$num/smp_affinity interruptdirs = [ f for f in os.listdir(irqpath) if os.path.isdir(os.path.join(irqpath,f)) ] # IRQ 2 - cascaded signals from IRQs 8-15 (any devices configured to use IRQ 2 will actually be using IRQ 9) try: interruptdirs.remove("2") except ValueError: pass # IRQ 0 - system timer (cannot be changed) try: interruptdirs.remove("0") except ValueError: pass for i in interruptdirs: inplacemask = 0 fname = irqpath + i + "/smp_affinity" cpulist = parse_def_affinity(fname) for i in cpulist: inplacemask = inplacemask | 1 << i; if (inplacemask & ~shouldbemask): sys.stderr.write("verify: failed: irqaffinity (%s) inplacemask=%x shouldbemask=%x\n" % (fname, inplacemask, shouldbemask)) sys.exit(1) sys.exit(0) sys.stderr.write("defirqaffinity.py is deprecated. Use isolated_cores or other built-in functionality instead.\n") # adjust default_smp_affinity cpulist = parse_def_affinity(irqpath + "default_smp_affinity") mask = 0 for i in cpulist: mask = mask | 1 << i; if len(sys.argv) < 3 or len(str(sys.argv[2])) == 0: sys.stderr.write("%s: invalid arguments\n" % os.path.basename(sys.argv[0])) sys.exit(1) line = sys.argv[2] fields = line.strip().split(",") for i in fields: if sys.argv[1] == "add": mask = mask | 1 << int(i); elif sys.argv[1] == "remove" or sys.argv[1] == "verify": mask = mask & ~(1 << int(i)); if sys.argv[1] == "verify": verify(mask) string = get_cpumask(mask) fo = open(irqpath + "default_smp_affinity", "w") fo.write(string) fo.close() # now adjust each /proc/irq/$num/smp_affinity interruptdirs = [ f for f in os.listdir(irqpath) if os.path.isdir(os.path.join(irqpath,f)) ] # IRQ 2 - cascaded signals from IRQs 8-15 (any devices configured to use IRQ 2 will actually be using IRQ 9) try: interruptdirs.remove("2") except ValueError: pass # IRQ 0 - system timer (cannot be changed) try: interruptdirs.remove("0") except ValueError: pass ret = 0 for i in interruptdirs: fname = irqpath + i + "/smp_affinity" cpulist = parse_def_affinity(fname) mask = 0 for j in cpulist: mask = mask | 1 << j; for j in fields: if sys.argv[1] == "add": mask = mask | 1 << int(j); elif sys.argv[1] == "remove": mask = mask & ~(1 << int(j)); string = get_cpumask(mask) try: fo = open(fname, "w") fo.write(string) fo.close() except IOError as e: sys.stderr.write('Failed to set smp_affinity for IRQ %s: %s\n' % (str(i), str(e))) ret = 1 sys.exit(ret) PKJ0]y6balanced/tuned.confnu[# # tuned configuration # [main] summary=General non-specialized tuned profile [modules] cpufreq_conservative=+r [cpu] priority=10 governor=conservative|powersave energy_perf_bias=normal energy_performance_preference=balance_performance [acpi] platform_profile=balanced [audio] timeout=10 [video] radeon_powersave=dpm-balanced, auto [disk] # Comma separated list of devices, all devices if commented out. # devices=sda [scsi_host] alpm=medium_power PKJ0]%G##virtual-host/tuned.confnu[# # tuned configuration # [main] summary=Optimize for running KVM guests include=throughput-performance [sysctl] # Start background writeback (via writeback threads) at this percentage (system # default is 10%) vm.dirty_background_ratio = 5 [cpu] # Setting C3 state sleep mode/power savings force_latency=cstate.id_no_zero:3|70 [scheduler] runtime=0 # The total time the scheduler will consider a migrated process # "cache hot" and thus less likely to be re-migrated # (system default is 500000, i.e. 0.5 ms) sched_migration_cost_ns = 5000000 PKJ0]UTv$$network-latency/tuned.confnu[# # tuned configuration # [main] summary=Optimize for deterministic performance at the cost of increased power consumption, focused on low latency network performance include=latency-performance [vm] transparent_hugepages=never [sysctl] net.core.busy_read=50 net.core.busy_poll=50 net.ipv4.tcp_fastopen=3 kernel.numa_balancing=0 kernel.hung_task_timeout_secs = 600 kernel.nmi_watchdog = 0 vm.stat_interval = 10 kernel.timer_migration = 0 [bootloader] cmdline_network_latency=skew_tick=1 tsc=reliable rcupdate.rcu_normal_after_boot=1 [rtentsk] PKJ0]+XQiirecommend.d/50-tuned.confnu[# Tuned rules for recommend_profile. # # Syntax: # [PROFILE1] # KEYWORD11=RE11 # KEYWORD21=RE12 # # [PROFILE2] # KEYWORD21=RE21 # KEYWORD22=RE22 # KEYWORD can be: # virt - for RE to match output of virt-what # system - for RE to match content of /etc/system-release-cpe # process - for RE to match running processes. It can have arbitrary # suffix, all process* lines have to match for the PROFILE # to match (i.e. the AND operator) # /FILE - for RE to match content of the FILE, e.g.: # '/etc/passwd=.+'. If file doesn't exist, its RE will not # match. # chassis_type - for RE to match the chassis type as reported by dmidecode # syspurpose_role - for RE to match the system role as reported by syspurpose # All REs for all KEYWORDs have to match for PROFILE to match (i.e. the AND operator). # If 'virt' or 'system' is not specified, it matches for every string. # If 'virt' or 'system' is empty, i.e. 'virt=', it matches only empty string (alias for '^$'). # If several profiles matched, the first match is taken. # # Limitation: # Each profile can be specified only once, because there cannot be # multiple sections in the configuration file with the same name # (ConfigObj limitation). # If there is a need to specify the profile multiple times, unique # suffix like ',ANYSTRING' can be used. Everything after the last ',' # is stripped by the parser, e.g.: # # [balanced,1] # /FILE1=RE1 # # [balanced,2] # /FILE2=RE2 # # This will set 'balanced' profile in case there is FILE1 matching RE1 or # FILE2 matching RE2 or both. [atomic-host] virt= syspurpose_role=.*atomic.* [atomic-guest] virt=.+ syspurpose_role=.*atomic.* [virtual-guest] virt=.+ [balanced] syspurpose_role=(.*(desktop|workstation).*)|^$ chassis_type=.*(Notebook|Laptop|Portable).* [throughput-performance] PKJ0]"optimize-serial-console/tuned.confnu[# # tuned configuration # # This tuned configuration optimizes for serial console performance at the # expense of reduced debug information to the console. [main] summary=Optimize for serial console use. [sysctl] kernel.printk="4 4 1 7" PKJ0]ot<t< functionsnu[# # This is library of helper functions that can be used in scripts in tuned profiles. # # API provided by this library is under heavy development and could be changed anytime # # # Config # STORAGE=/run/tuned STORAGE_PERSISTENT=/var/lib/tuned STORAGE_SUFFIX=".save" # # Helpers # # Save value # $0 STORAGE_NAME VALUE save_value() { [ "$#" -ne 2 ] && return [ "$2" -a -e "${STORAGE}" ] && echo "$2" > "${STORAGE}/${1}${STORAGE_SUFFIX}" } # Parse sysfs value, i.e. for "val1 [val2] val3" return "val2" # $0 SYSFS_NAME parse_sys() { local V1 V2 [ -r "$1" ] || return V1=`cat "$1"` V2="${V1##*[}" V2="${V2%%]*}" echo "${V2:-$V1}" } # Save sysfs value # $0 STORAGE_NAME SYSFS_NAME save_sys() { [ "$#" -ne 2 ] && return [ -r "$2" -a ! -e "${STORAGE}/${1}${STORAGE_SUFFIX}" ] && parse_sys "$2" > "${STORAGE}/${1}${STORAGE_SUFFIX}" } # Set sysfs value # $0 SYSFS_NAME VALUE set_sys() { [ "$#" -ne 2 ] && return [ -w "$1" ] && echo "$2" > "$1" } # Save and set sysfs value # $0 STORAGE_NAME SYSFS_NAME VALUE save_set_sys() { [ "$#" -ne 3 ] && return save_sys "$1" "$2" set_sys "$2" "$3" } # Get stored sysfs value from storage # $0 STORAGE_NAME get_stored_sys() { [ "$#" -ne 1 ] && return [ -r "${STORAGE}/${1}${STORAGE_SUFFIX}" ] && cat "${STORAGE}/${1}${STORAGE_SUFFIX}" } # Restore value from storage # $0 STORAGE_NAME restore_value() { [ "$#" -ne 1 ] && return _rs_value="`get_stored_sys \"$1\"`" unlink "${STORAGE}/${1}${STORAGE_SUFFIX}" >/dev/null 2>&1 [ "$_rs_value" ] && echo "$_rs_value" } # Restore sysfs value from storage, if nothing is stored, use VALUE # $0 STORAGE_NAME SYSFS_NAME [VALUE] restore_sys() { [ "$#" -lt 2 -o "$#" -gt 3 ] && return _rs_value="`get_stored_sys \"$1\"`" unlink "${STORAGE}/${1}${STORAGE_SUFFIX}" >/dev/null 2>&1 [ "$_rs_value" ] || _rs_value="$3" [ "$_rs_value" ] && set_sys "$2" "$_rs_value" } # # DISK tuning # DISKS_DEV="$(command ls -d1 /dev/[shv]d*[a-z] 2>/dev/null)" DISKS_SYS="$(command ls -d1 /sys/block/{sd,cciss,dm-,vd,dasd,xvd}* 2>/dev/null)" _check_elevator_override() { /bin/fgrep -q 'elevator=' /proc/cmdline } # $0 OPERATOR DEVICES ELEVATOR _set_elevator_helper() { _check_elevator_override && return SYS_BLOCK_SDX="" [ "$2" ] && SYS_BLOCK_SDX=$(eval LANG=C /bin/ls -1 "${2}" 2>/dev/null) # if there is no kernel command line elevator settings, apply the elevator if [ "$1" -a "$SYS_BLOCK_SDX" ]; then for i in $SYS_BLOCK_SDX; do se_dev="`echo \"$i\" | sed 's|/sys/block/\([^/]\+\)/queue/scheduler|\1|'`" $1 "elevator_${se_dev}" "$i" "$3" done fi } # $0 DEVICES ELEVATOR set_elevator() { _set_elevator_helper save_set_sys "$1" "$2" } # $0 DEVICES [ELEVATOR] restore_elevator() { re_elevator="$2" [ "$re_elevator" ] || re_elevator=cfq _set_elevator_helper restore_sys "$1" "$re_elevator" } # SATA Aggressive Link Power Management # usage: set_disk_alpm policy set_disk_alpm() { policy=$1 for host in /sys/class/scsi_host/*; do if [ -f $host/ahci_port_cmd ]; then port_cmd=`cat $host/ahci_port_cmd`; if [ $((0x$port_cmd & 0x240000)) = 0 -a -f $host/link_power_management_policy ]; then echo $policy >$host/link_power_management_policy; else echo "max_performance" >$host/link_power_management_policy; fi fi done } # usage: set_disk_apm level set_disk_apm() { level=$1 for disk in $DISKS_DEV; do hdparm -B $level $disk &>/dev/null done } # usage: set_disk_spindown level set_disk_spindown() { level=$1 for disk in $DISKS_DEV; do hdparm -S $level $disk &>/dev/null done } # usage: multiply_disk_readahead by multiply_disk_readahead() { by=$1 # float multiplication not supported in bash # bc might not be installed, python is available for sure for disk in $DISKS_SYS; do control="${disk}/queue/read_ahead_kb" old=$(cat $control) new=$(echo "print int($old*$by)" | python) (echo $new > $control) &>/dev/null done } # usage: remount_disk options partition1 partition2 ... remount_partitions() { options=$1 shift for partition in $@; do mount -o remount,$options $partition >/dev/null 2>&1 done } remount_all_no_rootboot_partitions() { [ "$1" ] || return # Find non-root and non-boot partitions, disable barriers on them rootvol=$(df -h / | grep "^/dev" | awk '{print $1}') bootvol=$(df -h /boot | grep "^/dev" | awk '{print $1}') volumes=$(df -hl --exclude=tmpfs | grep "^/dev" | awk '{print $1}') nobarriervols=$(echo "$volumes" | grep -v $rootvol | grep -v $bootvol) remount_partitions "$1" $nobarriervols } DISK_QUANTUM_SAVE="${STORAGE}/disk_quantum${STORAGE_SUFFIX}" set_disk_scheduler_quantum() { value=$1 rm -f "$DISK_QUANTUM_SAVE" for disk in $DISKS_SYS; do control="${disk}/queue/iosched/quantum" echo "echo $(cat $control) > $control" >> "$DISK_QUANTUM_SAVE" 2>/dev/null (echo $value > $control) &2>/dev/null done } restore_disk_scheduler_quantum() { if [ -r "$DISK_QUANTUM_SAVE" ]; then /bin/bash "$DISK_QUANTUM_SAVE" &>/dev/null rm -f "$DISK_QUANTUM_SAVE" fi } # # CPU tuning # CPUSPEED_SAVE_FILE="${STORAGE}/cpuspeed${STORAGE_SUFFIX}" CPUSPEED_ORIG_GOV="${STORAGE}/cpuspeed-governor-%s${STORAGE_SUFFIX}" CPUSPEED_STARTED="${STORAGE}/cpuspeed-started" CPUSPEED_CFG="/etc/sysconfig/cpuspeed" CPUSPEED_INIT="/etc/rc.d/init.d/cpuspeed" # do not use cpuspeed CPUSPEED_USE="0" CPUS="$(ls -d1 /sys/devices/system/cpu/cpu* | sed 's;^.*/;;' | grep "cpu[0-9]\+")" # set CPU governor setting and store the old settings # usage: set_cpu_governor governor set_cpu_governor() { governor=$1 # always patch cpuspeed configuration if exists, if it doesn't exist and is enabled, # explicitly disable it with hint if [ -e $CPUSPEED_INIT ]; then if [ ! -e $CPUSPEED_SAVE_FILE -a -e $CPUSPEED_CFG ]; then cp -p $CPUSPEED_CFG $CPUSPEED_SAVE_FILE sed -e 's/^GOVERNOR=.*/GOVERNOR='$governor'/g' $CPUSPEED_SAVE_FILE > $CPUSPEED_CFG fi else if [ "$CPUSPEED_USE" = "1" ]; then echo >&2 echo "Suggestion: install 'cpuspeed' package to get best tuning results." >&2 echo "Falling back to sysfs control." >&2 echo >&2 fi CPUSPEED_USE="0" fi if [ "$CPUSPEED_USE" = "1" ]; then service cpuspeed status &> /dev/null [ $? -eq 3 ] && touch $CPUSPEED_STARTED || rm -f $CPUSPEED_STARTED service cpuspeed restart &> /dev/null # direct change using sysfs elif [ -e /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ]; then for cpu in $CPUS; do gov_file=/sys/devices/system/cpu/$cpu/cpufreq/scaling_governor save_file=$(printf $CPUSPEED_ORIG_GOV $cpu) rm -f $save_file if [ -e $gov_file ]; then cat $gov_file > $save_file echo $governor > $gov_file fi done fi } # re-enable previous CPU governor settings # usage: restore_cpu_governor restore_cpu_governor() { if [ -e $CPUSPEED_INIT ]; then if [ -e $CPUSPEED_SAVE_FILE ]; then cp -fp $CPUSPEED_SAVE_FILE $CPUSPEED_CFG rm -f $CPUSPEED_SAVE_FILE fi if [ "$CPUSPEED_USE" = "1" ]; then if [ -e $CPUSPEED_STARTED ]; then service cpuspeed stop &> /dev/null else service cpuspeed restart &> /dev/null fi fi if [ -e $CPUSPEED_STARTED ]; then rm -f $CPUSPEED_STARTED fi else CPUSPEED_USE="0" fi if [ "$CPUSPEED_USE" != "1" -a -e /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ]; then for cpu in $CPUS; do cpufreq_dir=/sys/devices/system/cpu/$cpu/cpufreq save_file=$(printf $CPUSPEED_ORIG_GOV $cpu) if [ -e $cpufreq_dir/scaling_governor ]; then if [ -e $save_file ]; then cat $save_file > $cpufreq_dir/scaling_governor rm -f $save_file else echo userspace > $cpufreq_dir/scaling_governor cat $cpufreq_dir/cpuinfo_max_freq > $cpufreq_dir/scaling_setspeed fi fi done fi } _cpu_multicore_powersave() { value=$1 [ -e /sys/devices/system/cpu/sched_mc_power_savings ] && echo $value > /sys/devices/system/cpu/sched_mc_power_savings } # enable multi core power savings for low wakeup systems enable_cpu_multicore_powersave() { _cpu_multicore_powersave 1 } disable_cpu_multicore_powersave() { _cpu_multicore_powersave 0 } # # MEMORY tuning # THP_ENABLE="/sys/kernel/mm/transparent_hugepage/enabled" THP_SAVE="${STORAGE}/thp${STORAGE_SUFFIX}" [ -e "$THP_ENABLE" ] || THP_ENABLE="/sys/kernel/mm/redhat_transparent_hugepage/enabled" enable_transparent_hugepages() { if [ -e $THP_ENABLE ]; then cut -f2 -d'[' $THP_ENABLE | cut -f1 -d']' > $THP_SAVE (echo always > $THP_ENABLE) &> /dev/null fi } restore_transparent_hugepages() { if [ -e $THP_SAVE ]; then (echo $(cat $THP_SAVE) > $THP_ENABLE) &> /dev/null rm -f $THP_SAVE fi } # # WIFI tuning # # usage: _wifi_set_power_level level _wifi_set_power_level() { # 0 auto, PM enabled # 1-5 least savings and lowest latency - most savings and highest latency # 6 disable power savings level=$1 # do not report errors on systems with no wireless [ -e /proc/net/wireless ] || return 0 # apply the settings using iwpriv ifaces=$(cat /proc/net/wireless | grep -v '|' | sed 's@^ *\([^:]*\):.*@\1@') for iface in $ifaces; do iwpriv $iface set_power $level done # some adapters may rely on sysfs for i in /sys/bus/pci/devices/*/power_level; do (echo $level > $i) &> /dev/null done } enable_wifi_powersave() { _wifi_set_power_level 5 } disable_wifi_powersave() { _wifi_set_power_level 0 } # # BLUETOOTH tuning # disable_bluetooth() { hciconfig hci0 down >/dev/null 2>&1 lsmod | grep -q btusb && rmmod btusb } enable_bluetooth() { modprobe btusb hciconfig hci0 up >/dev/null 2>&1 } # # USB tuning # _usb_autosuspend() { value=$1 for i in /sys/bus/usb/devices/*/power/autosuspend; do echo $value > $i; done &> /dev/null } enable_usb_autosuspend() { _usb_autosuspend 1 } disable_usb_autosuspend() { _usb_autosuspend 0 } # # SOUND CARDS tuning # enable_snd_ac97_powersave() { save_set_sys ac97 /sys/module/snd_ac97_codec/parameters/power_save Y } disable_snd_ac97_powersave() { save_set_sys ac97 /sys/module/snd_ac97_codec/parameters/power_save N } restore_snd_ac97_powersave() { restore_sys ac97 /sys/module/snd_ac97_codec/parameters/power_save $1 } set_hda_intel_powersave() { save_set_sys hda_intel /sys/module/snd_hda_intel/parameters/power_save $1 } restore_hda_intel_powersave() { restore_sys hda_intel /sys/module/snd_hda_intel/parameters/power_save $1 } # # VIDEO CARDS tuning # # Power savings settings for Radeon # usage: set_radeon_powersave dynpm | default | low | mid | high set_radeon_powersave () { [ "$1" ] || return [ -e /sys/class/drm/card0/device/power_method ] || return if [ "$1" = default -o "$1" = auto -o "$1" = low -o "$1" = med -o "$1" = high ]; then [ -w /sys/class/drm/card0/device/power_profile ] || return save_sys radeon_profile /sys/class/drm/card0/device/power_profile save_set_sys radeon_method /sys/class/drm/card0/device/power_method profile set_sys /sys/class/drm/card0/device/power_profile "$1" elif [ "$1" = dynpm ]; then save_sys radeon_profile /sys/class/drm/card0/device/power_profile save_set_sys radeon_method /sys/class/drm/card0/device/power_method dynpm fi } restore_radeon_powersave () { restore_sys radeon_method /sys/class/drm/card0/device/power_method profile _rrp_method="`get_stored_sys radeon_method`" [ -z "$_rrp_method" -o _rrp_method="profile" ] && restore_sys radeon_profile /sys/class/drm/card0/device/power_profile default } # # SOFTWARE tuning # RSYSLOG_CFG="/etc/rsyslog.conf" RSYSLOG_SAVE="${STORAGE}/cpuspeed${STORAGE_SUFFIX}" disable_logs_syncing() { cp -p $RSYSLOG_CFG $RSYSLOG_SAVE sed -i 's/ \/var\/log/-\/var\/log/' $RSYSLOG_CFG } restore_logs_syncing() { mv -Z $RSYSLOG_SAVE $RSYSLOG_CFG || mv $RSYSLOG_SAVE $RSYSLOG_CFG } irqbalance_banned_cpus_clear() { sed -i '/^IRQBALANCE_BANNED_CPUS=/d' /etc/sysconfig/irqbalance || return if [ ${1:-restart} = restart ]; then systemctl try-restart irqbalance fi } irqbalance_banned_cpus_setup() { irqbalance_banned_cpus_clear norestart if [ -n "$1" ]; then echo "IRQBALANCE_BANNED_CPUS=$1" >> /etc/sysconfig/irqbalance fi systemctl try-restart irqbalance } # # HARDWARE SPECIFIC tuning # # Asus EEE with Intel Atom _eee_fsb_control() { value=$1 if [ -e /sys/devices/platform/eeepc/she ]; then echo $value > /sys/devices/platform/eeepc/she elif [ -e /sys/devices/platform/eeepc/cpufv ]; then echo $value > /sys/devices/platform/eeepc/cpufv elif [ -e /sys/devices/platform/eeepc-wmi/cpufv ]; then echo $value > /sys/devices/platform/eeepc-wmi/cpufv fi } eee_set_reduced_fsb() { _eee_fsb_control 2 } eee_set_normal_fsb() { _eee_fsb_control 1 } # # modprobe configuration handling # kvm_modprobe_file=/etc/modprobe.d/kvm.rt.tuned.conf teardown_kvm_mod_low_latency() { rm -f $kvm_modprobe_file } setup_kvm_mod_low_latency() { local HAS_KPS="" local HAS_NX_HP="" local HAS_PLE_GAP="" local WANTS_KPS="" local WANTS_NX_HP="" local WANTS_PLE_GAP="" modinfo -p kvm | grep -q kvmclock_periodic_sync && HAS_KPS=1 modinfo -p kvm | grep -q nx_huge_pages && HAS_NX_HP=1 modinfo -p kvm_intel | grep -q ple_gap && HAS_PLE_GAP=1 grep -qs kvmclock_periodic_sync "$kvm_modprobe_file" && WANTS_KPS=1 grep -qs nx_huge_pages "$kvm_modprobe_file" && WANTS_NX_HP=1 grep -qs ple_gap "$kvm_modprobe_file" && WANTS_PLE_GAP=1 if [ "$HAS_KPS" != "$WANTS_KPS" -o "$HAS_PLE_GAP" != "$WANTS_PLE_GAP" -o \ "$HAS_NX_HP" != "$WANTS_NX_HP" ]; then teardown_kvm_mod_low_latency [ "$HAS_KPS" ] && echo "options kvm kvmclock_periodic_sync=0" > $kvm_modprobe_file [ "$HAS_NX_HP" ] && echo "options kvm nx_huge_pages=0" >> $kvm_modprobe_file [ "$HAS_PLE_GAP" ] && echo "options kvm_intel ple_gap=0" >> $kvm_modprobe_file fi return 0 } # # KSM # KSM_SERVICES="ksm ksmtuned" KSM_RUN_PATH=/sys/kernel/mm/ksm/run KSM_MASK_FILE="${STORAGE_PERSISTENT}/ksm-masked" disable_ksm() { if [ ! -f $KSM_MASK_FILE ]; then # Always create $KSM_MASK_FILE, since we don't want to # run any systemctl commands during boot if ! touch $KSM_MASK_FILE; then die "failed to create $KSM_MASK_FILE" fi # Do not run any systemctl commands if $KSM_SERVICES units do not exist systemctl cat -- $KSM_SERVICES &> /dev/null || return 0 systemctl --now --quiet mask $KSM_SERVICES # Unmerge all shared pages test -f $KSM_RUN_PATH && echo 2 > $KSM_RUN_PATH fi } # Should only be called when full_rollback == true enable_ksm() { if [ -f $KSM_MASK_FILE ]; then # Do not run any systemctl commands if $KSM_SERVICES units do not exist systemctl cat -- $KSM_SERVICES &> /dev/null || return 0 if systemctl --quiet unmask $KSM_SERVICES; then rm -f $KSM_MASK_FILE fi fi } die() { echo "$@" >&2 exit 1 } # # ACTION PROCESSING # error_not_implemented() { echo "tuned: script function '$1' is not implemented." >&2 } # implicit actions, will be used if not provided by profile script: # # * start must be implemented # * stop must be implemented start() { error_not_implemented start return 16 } stop() { error_not_implemented stop return 16 } # # main processing # process() { ARG="$1" shift case "$ARG" in start) start "$@" RETVAL=$? ;; stop) stop "$@" RETVAL=$? ;; verify) if declare -f verify &> /dev/null; then verify "$@" else : fi RETVAL=$? ;; *) echo $"Usage: $0 {start|stop|verify}" RETVAL=2 ;; esac exit $RETVAL } PKJ0]Wuuintel-sst/tuned.confnu[[main] summary=Configure for Intel Speed Select Base Frequency [bootloader] cmdline_intel_sst=-intel_pstate=disable PKJ0]ߦ desktop/tuned.confnu[# # tuned configuration # [main] summary=Optimize for the desktop use-case include=balanced [sysctl] kernel.sched_autogroup_enabled=1 PKJ0]qq"accelerator-performance/tuned.confnu[# # tuned configuration # [main] summary=Throughput performance based tuning with disabled higher latency STOP states [cpu] governor=performance energy_perf_bias=performance min_perf_pct=100 force_latency=99 [acpi] platform_profile=performance [disk] readahead=>4096 [sysctl] # If a workload mostly uses anonymous memory and it hits this limit, the entire # working set is buffered for I/O, and any more write buffering would require # swapping, so it's time to throttle writes until I/O can catch up. Workloads # that mostly use file mappings may be able to use even higher values. # # The generator of dirty data starts writeback at this percentage (system default # is 20%) vm.dirty_ratio = 40 # Start background writeback (via writeback threads) at this percentage (system # default is 10%) vm.dirty_background_ratio = 10 # PID allocation wrap value. When the kernel's next PID value # reaches this value, it wraps back to a minimum PID value. # PIDs of value pid_max or larger are not allocated. # # A suggested value for pid_max is 1024 * <# of cpu cores/threads in system> # e.g., a box with 32 cpus, the default of 32768 is reasonable, for 64 cpus, # 65536, for 4096 cpus, 4194304 (which is the upper limit possible). #kernel.pid_max = 65536 # The swappiness parameter controls the tendency of the kernel to move # processes out of physical memory and onto the swap disk. # 0 tells the kernel to avoid swapping processes out of physical memory # for as long as possible # 100 tells the kernel to aggressively swap processes out of physical memory # and move them to swap cache vm.swappiness=10 [scheduler] # ktune sysctl settings for rhel6 servers, maximizing i/o throughput # # Minimal preemption granularity for CPU-bound tasks: # (default: 1 msec# (1 + ilog(ncpus)), units: nanoseconds) sched_min_granularity_ns = 10000000 # SCHED_OTHER wake-up granularity. # (default: 1 msec# (1 + ilog(ncpus)), units: nanoseconds) # # This option delays the preemption effects of decoupled workloads # and reduces their over-scheduling. Synchronous workloads will still # have immediate wakeup/sleep latencies. sched_wakeup_granularity_ns = 15000000 PKJ0]ÆFnetwork-throughput/tuned.confnu[# # tuned configuration # [main] summary=Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks include=throughput-performance [sysctl] # Increase kernel buffer size maximums. Currently this seems only necessary at 40Gb speeds. # # The buffer tuning values below do not account for any potential hugepage allocation. # Ensure that you do not oversubscribe system memory. net.ipv4.tcp_rmem="4096 131072 16777216" net.ipv4.tcp_wmem="4096 16384 16777216" PKJ0]B]xxlatency-performance/tuned.confnu[# # tuned configuration # [main] summary=Optimize for deterministic performance at the cost of increased power consumption [cpu] force_latency=cstate.id_no_zero:1|3 governor=performance energy_perf_bias=performance min_perf_pct=100 [acpi] platform_profile=performance [sysctl] # If a workload mostly uses anonymous memory and it hits this limit, the entire # working set is buffered for I/O, and any more write buffering would require # swapping, so it's time to throttle writes until I/O can catch up. Workloads # that mostly use file mappings may be able to use even higher values. # # The generator of dirty data starts writeback at this percentage (system default # is 20%) vm.dirty_ratio=10 # Start background writeback (via writeback threads) at this percentage (system # default is 10%) vm.dirty_background_ratio=3 # The swappiness parameter controls the tendency of the kernel to move # processes out of physical memory and onto the swap disk. # 0 tells the kernel to avoid swapping processes out of physical memory # for as long as possible # 100 tells the kernel to aggressively swap processes out of physical memory # and move them to swap cache vm.swappiness=10 [scheduler] runtime=0 # ktune sysctl settings for rhel6 servers, maximizing i/o throughput # # Minimal preemption granularity for CPU-bound tasks: # (default: 1 msec# (1 + ilog(ncpus)), units: nanoseconds) sched_min_granularity_ns = 3000000 sched_wakeup_granularity_ns = 4000000 # The total time the scheduler will consider a migrated process # "cache hot" and thus less likely to be re-migrated # (system default is 500000, i.e. 0.5 ms) sched_migration_cost_ns = 5000000 PKJ0]qpphpc-compute/tuned.confnu[# # tuned configuration # [main] summary=Optimize for HPC compute workloads description=Configures virtual memory, CPU governors, and network settings for HPC compute workloads. include=latency-performance [vm] # Most HPC application can take advantage of hugepages. Force them to on. transparent_hugepages=always [disk] # Increase the readahead value to support large, contiguous, files. readahead=>4096 [sysctl] # Keep a reasonable amount of memory free to support large mem requests vm.min_free_kbytes=135168 # Most HPC applications are NUMA aware. Enabling zone reclaim ensures # memory is reclaimed and reallocated from local pages. Disabling # automatic NUMA balancing prevents unwanted memory unmapping. vm.zone_reclaim_mode=1 kernel.numa_balancing=0 # Busy polling helps reduce latency in the network receive path # by allowing socket layer code to poll the receive queue of a # network device, and disabling network interrupts. # busy_read value greater than 0 enables busy polling. Recommended # net.core.busy_read value is 50. # busy_poll value greater than 0 enables polling globally. # Recommended net.core.busy_poll value is 50 net.core.busy_read=50 net.core.busy_poll=50 # TCP fast open reduces network latency by enabling data exchange # during the sender's initial TCP SYN. The value 3 enables fast open # on client and server connections. net.ipv4.tcp_fastopen=3 PKJ0]yvirtual-guest/tuned.confnu[# # tuned configuration # [main] summary=Optimize for running inside a virtual guest include=throughput-performance [sysctl] # If a workload mostly uses anonymous memory and it hits this limit, the entire # working set is buffered for I/O, and any more write buffering would require # swapping, so it's time to throttle writes until I/O can catch up. Workloads # that mostly use file mappings may be able to use even higher values. # # The generator of dirty data starts writeback at this percentage (system default # is 20%) vm.dirty_ratio = 30 # Filesystem I/O is usually much more efficient than swapping, so try to keep # swapping low. It's usually safe to go even lower than this on systems with # server-grade storage. vm.swappiness = 30 PKJ0]jvDzzpowersave/tuned.confnu[# # tuned configuration # [main] summary=Optimize for low power consumption [cpu] governor=ondemand|powersave energy_perf_bias=powersave|power energy_performance_preference=power [acpi] platform_profile=low-power|quiet [eeepc_she] [vm] [audio] timeout=10 [video] radeon_powersave=dpm-battery, auto [disk] # Comma separated list of devices, all devices if commented out. # devices=sda [net] # Comma separated list of devices, all devices if commented out. # devices=eth0 [scsi_host] alpm=min_power [sysctl] vm.laptop_mode=5 vm.dirty_writeback_centisecs=1500 kernel.nmi_watchdog=0 [script] script=${i:PROFILE_DIR}/script.sh PKJ0] }powersave/script.shnuȯ#!/bin/bash . /usr/lib/tuned/functions start() { [ "$USB_AUTOSUSPEND" = 1 ] && enable_usb_autosuspend enable_wifi_powersave return 0 } stop() { [ "$USB_AUTOSUSPEND" = 1 ] && disable_usb_autosuspend disable_wifi_powersave return 0 } process $@ PKJ0]aws/tuned.confnu[# # tuned configuration # [main] summary=Optimize for aws ec2 instances include=throughput-performance # Marvell ThunderX [bootloader.thunderx] # rhbz:1836058 type=bootloader uname_regex=aarch64 cmdline=+iommu.strict=0 [bootloader] # https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-ebs-volumes.html#timeout-nvme-ebs-volumes # set nvme_core.io_timeout to 4294967295 # https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking-ena.html # set net.ifnames to 0 cmdline=+net.ifnames=0 nvme_core.io_timeout=4294967295 PKJ0]蝀epyc-eda/tuned.confnu[# # tuned configuration # [main] summary=Optimize for EDA compute workloads on AMD EPYC CPUs description=Configures virtual memory, CPU governors, and network settings for EDA compute workloads. include=throughput-performance # AMD [scheduler.amd] type=scheduler #Allow processes to rapidly move between cores to avoid idle time and maximize CPU usage sched_migration_cost_ns=10000 PKJ0]K)}b b !throughput-performance/tuned.confnu[# # tuned configuration # [main] summary=Broadly applicable tuning that provides excellent performance across a variety of common server workloads [variables] thunderx_cpuinfo_regex=CPU part\s+:\s+(0x0?516)|(0x0?af)|(0x0?a[0-3])|(0x0?b8)\b amd_cpuinfo_regex=model name\s+:.*\bAMD\b [cpu] governor=performance energy_perf_bias=performance min_perf_pct=100 energy_performance_preference=performance [acpi] platform_profile=performance # Marvell ThunderX [vm.thunderx] type=vm uname_regex=aarch64 cpuinfo_regex=${thunderx_cpuinfo_regex} transparent_hugepages=never [disk] # The default unit for readahead is KiB. This can be adjusted to sectors # by specifying the relevant suffix, eg. (readahead => 8192 s). There must # be at least one space between the number and suffix (if suffix is specified). readahead=>4096 [sysctl] # If a workload mostly uses anonymous memory and it hits this limit, the entire # working set is buffered for I/O, and any more write buffering would require # swapping, so it's time to throttle writes until I/O can catch up. Workloads # that mostly use file mappings may be able to use even higher values. # # The generator of dirty data starts writeback at this percentage (system default # is 20%) vm.dirty_ratio = 40 # Start background writeback (via writeback threads) at this percentage (system # default is 10%) vm.dirty_background_ratio = 10 # PID allocation wrap value. When the kernel's next PID value # reaches this value, it wraps back to a minimum PID value. # PIDs of value pid_max or larger are not allocated. # # A suggested value for pid_max is 1024 * <# of cpu cores/threads in system> # e.g., a box with 32 cpus, the default of 32768 is reasonable, for 64 cpus, # 65536, for 4096 cpus, 4194304 (which is the upper limit possible). #kernel.pid_max = 65536 # The swappiness parameter controls the tendency of the kernel to move # processes out of physical memory and onto the swap disk. # 0 tells the kernel to avoid swapping processes out of physical memory # for as long as possible # 100 tells the kernel to aggressively swap processes out of physical memory # and move them to swap cache vm.swappiness=10 # The default kernel value 128 was over twenty years old default, # kernel-5.4 increased it to 4096, thus do not have it lower than 2048 # on older kernels net.core.somaxconn=>2048 [scheduler] runtime=0 # ktune sysctl settings for rhel6 servers, maximizing i/o throughput # # Minimal preemption granularity for CPU-bound tasks: # (default: 1 msec# (1 + ilog(ncpus)), units: nanoseconds) sched_min_granularity_ns = 10000000 # SCHED_OTHER wake-up granularity. # (default: 1 msec# (1 + ilog(ncpus)), units: nanoseconds) # # This option delays the preemption effects of decoupled workloads # and reduces their over-scheduling. Synchronous workloads will still # have immediate wakeup/sleep latencies. sched_wakeup_granularity_ns = 15000000 # Marvell ThunderX [sysctl.thunderx] type=sysctl uname_regex=aarch64 cpuinfo_regex=${thunderx_cpuinfo_regex} kernel.numa_balancing=0 # AMD [scheduler.amd] type=scheduler uname_regex=x86_64 cpuinfo_regex=${amd_cpuinfo_regex} runtime=0 sched_migration_cost_ns=5000000 PKF0]5Y tuned.lognu[2024-03-28 19:15:49,069 INFO tuned.daemon.application: TuneD: 2.21.0, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-03-28 19:15:49,070 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-03-28 19:15:49,088 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-03-28 19:15:49,092 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-03-28 19:15:49,727 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-03-28 19:15:49,760 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-03-28 19:15:49,771 INFO tuned.daemon.controller: starting controller 2024-03-28 19:15:49,772 INFO tuned.daemon.daemon: starting tuning 2024-03-28 19:15:49,818 INFO tuned.plugins.base: instance cpu: assigning devices cpu0, cpu2, cpu1, cpu5, cpu4, cpu7, cpu3, cpu6 2024-03-28 19:15:49,841 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-03-28 19:15:49,849 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-03-28 19:15:49,862 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-03-28 19:15:49,868 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-03-28 19:15:49,870 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2024-03-28 19:15:49,889 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-03-28 19:15:49,951 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-03-28 19:15:49,952 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 925, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 581, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 570, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 637, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 148, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-03-28 19:15:49,952 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-03-28 19:16:15,681 INFO tuned.daemon.controller: terminating controller 2024-03-28 19:16:15,683 INFO tuned.daemon.daemon: stopping tuning 2024-03-28 19:16:15,796 INFO tuned.daemon.daemon: terminating TuneD due to system shutdown / reboot 2024-03-28 19:16:15,845 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'Instance' object has no attribute '_thread' 2024-03-28 19:16:15,846 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1010, in _instance_unapply_static instance._thread.join() AttributeError: 'Instance' object has no attribute '_thread' 2024-03-28 19:17:14,950 INFO tuned.daemon.application: TuneD: 2.21.0, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-03-28 19:17:14,951 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-03-28 19:17:14,959 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-03-28 19:17:14,962 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-03-28 19:17:15,581 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-03-28 19:17:15,585 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-03-28 19:17:15,591 INFO tuned.daemon.controller: starting controller 2024-03-28 19:17:15,591 INFO tuned.daemon.daemon: starting tuning 2024-03-28 19:17:15,617 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu4, cpu7, cpu1, cpu5, cpu0, cpu6, cpu3 2024-03-28 19:17:15,634 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-03-28 19:17:15,642 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-03-28 19:17:15,654 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-03-28 19:17:15,659 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-03-28 19:17:15,660 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2024-03-28 19:17:15,676 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-03-28 19:17:15,793 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-03-28 19:17:15,794 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 925, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 581, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 570, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 637, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 148, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-03-28 19:17:15,794 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-04-03 23:11:31,644 INFO tuned.daemon.controller: terminating controller 2024-04-03 23:11:31,645 INFO tuned.daemon.daemon: stopping tuning 2024-04-03 23:11:31,698 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-04-03 23:11:31,701 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'Instance' object has no attribute '_thread' 2024-04-03 23:11:31,702 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1010, in _instance_unapply_static instance._thread.join() AttributeError: 'Instance' object has no attribute '_thread' 2024-04-03 23:11:32,002 INFO tuned.daemon.application: TuneD: 2.21.0, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-04-03 23:11:32,002 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-04-03 23:11:32,011 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-04-03 23:11:32,012 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-04-03 23:11:32,230 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-04-03 23:11:32,232 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-04-03 23:11:32,239 INFO tuned.daemon.controller: starting controller 2024-04-03 23:11:32,239 INFO tuned.daemon.daemon: starting tuning 2024-04-03 23:11:32,254 INFO tuned.plugins.base: instance cpu: assigning devices cpu4, cpu2, cpu1, cpu6, cpu5, cpu3, cpu7, cpu0 2024-04-03 23:11:32,264 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-04-03 23:11:32,271 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-04-03 23:11:32,290 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-04-03 23:11:32,295 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-04-03 23:11:32,297 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2024-04-03 23:11:32,309 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-04-03 23:11:32,349 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-04-03 23:11:32,350 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 925, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 581, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 570, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 637, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 148, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-04-03 23:11:32,350 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-04-11 23:10:55,200 INFO tuned.daemon.controller: terminating controller 2024-04-11 23:10:55,201 INFO tuned.daemon.daemon: stopping tuning 2024-04-11 23:10:55,259 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-04-11 23:10:55,262 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'Instance' object has no attribute '_thread' 2024-04-11 23:10:55,262 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1010, in _instance_unapply_static instance._thread.join() AttributeError: 'Instance' object has no attribute '_thread' 2024-04-11 23:10:55,534 INFO tuned.daemon.application: TuneD: 2.21.0, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-04-11 23:10:55,534 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-04-11 23:10:55,541 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-04-11 23:10:55,542 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-04-11 23:10:55,727 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-04-11 23:10:55,729 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-04-11 23:10:55,737 INFO tuned.daemon.controller: starting controller 2024-04-11 23:10:55,737 INFO tuned.daemon.daemon: starting tuning 2024-04-11 23:10:55,752 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu1, cpu7, cpu6, cpu4, cpu5, cpu0, cpu3 2024-04-11 23:10:55,760 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-04-11 23:10:55,764 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-04-11 23:10:55,771 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-04-11 23:10:55,775 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-04-11 23:10:55,776 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2024-04-11 23:10:55,789 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-04-11 23:10:55,826 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-04-11 23:10:55,826 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 925, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 581, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 570, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 637, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 148, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-04-11 23:10:55,827 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-04-13 23:10:35,374 INFO tuned.daemon.controller: terminating controller 2024-04-13 23:10:35,376 INFO tuned.daemon.daemon: stopping tuning 2024-04-13 23:10:35,420 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-04-13 23:10:35,427 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'Instance' object has no attribute '_thread' 2024-04-13 23:10:35,427 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1010, in _instance_unapply_static instance._thread.join() AttributeError: 'Instance' object has no attribute '_thread' 2024-04-13 23:10:35,811 INFO tuned.daemon.application: TuneD: 2.21.0, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-04-13 23:10:35,811 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-04-13 23:10:35,819 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-04-13 23:10:35,820 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-04-13 23:10:36,099 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-04-13 23:10:36,102 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-04-13 23:10:36,109 INFO tuned.daemon.controller: starting controller 2024-04-13 23:10:36,109 INFO tuned.daemon.daemon: starting tuning 2024-04-13 23:10:36,122 INFO tuned.plugins.base: instance cpu: assigning devices cpu3, cpu7, cpu0, cpu2, cpu5, cpu6, cpu1, cpu4 2024-04-13 23:10:36,131 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-04-13 23:10:36,137 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-04-13 23:10:36,149 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-04-13 23:10:36,156 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-04-13 23:10:36,157 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2024-04-13 23:10:36,171 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-04-13 23:10:36,208 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-04-13 23:10:36,209 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 925, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 581, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 570, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 637, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 148, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-04-13 23:10:36,209 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-05-07 23:11:14,281 INFO tuned.daemon.controller: terminating controller 2024-05-07 23:11:14,284 INFO tuned.daemon.daemon: stopping tuning 2024-05-07 23:11:14,359 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-05-07 23:11:14,368 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'Instance' object has no attribute '_thread' 2024-05-07 23:11:14,369 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1010, in _instance_unapply_static instance._thread.join() AttributeError: 'Instance' object has no attribute '_thread' 2024-05-07 23:11:14,840 INFO tuned.daemon.application: TuneD: 2.21.0, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-05-07 23:11:14,840 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-05-07 23:11:14,849 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-05-07 23:11:14,850 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-05-07 23:11:15,119 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-05-07 23:11:15,126 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-05-07 23:11:15,137 INFO tuned.daemon.controller: starting controller 2024-05-07 23:11:15,137 INFO tuned.daemon.daemon: starting tuning 2024-05-07 23:11:15,164 INFO tuned.plugins.base: instance cpu: assigning devices cpu4, cpu1, cpu0, cpu3, cpu6, cpu7, cpu2, cpu5 2024-05-07 23:11:15,176 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-05-07 23:11:15,182 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-05-07 23:11:15,192 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-05-07 23:11:15,198 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-05-07 23:11:15,199 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2024-05-07 23:11:15,216 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-05-07 23:11:15,270 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-05-07 23:11:15,270 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 925, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 581, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 570, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 637, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 148, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-05-07 23:11:15,271 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-05-28 23:14:06,253 INFO tuned.daemon.controller: terminating controller 2024-05-28 23:14:06,256 INFO tuned.daemon.daemon: stopping tuning 2024-05-28 23:14:06,325 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-05-28 23:14:06,331 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'Instance' object has no attribute '_thread' 2024-05-28 23:14:06,331 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1010, in _instance_unapply_static self._cgroup_cleanup_tasks_one(self._cgroup) AttributeError: 'Instance' object has no attribute '_thread' 2024-05-28 23:14:06,650 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-05-28 23:14:06,650 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-05-28 23:14:06,659 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-05-28 23:14:06,660 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-05-28 23:14:06,866 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-05-28 23:14:06,868 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-05-28 23:14:06,877 INFO tuned.daemon.controller: starting controller 2024-05-28 23:14:06,878 INFO tuned.daemon.daemon: starting tuning 2024-05-28 23:14:06,899 INFO tuned.plugins.base: instance cpu: assigning devices cpu0, cpu2, cpu1, cpu6, cpu5, cpu7, cpu4, cpu3 2024-05-28 23:14:06,909 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-05-28 23:14:06,915 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-05-28 23:14:06,924 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-05-28 23:14:06,932 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-05-28 23:14:06,933 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2024-05-28 23:14:06,946 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-05-28 23:14:06,989 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-05-28 23:14:06,989 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-05-28 23:14:06,989 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-05-31 23:10:21,937 INFO tuned.daemon.controller: terminating controller 2024-05-31 23:10:21,940 INFO tuned.daemon.daemon: stopping tuning 2024-05-31 23:10:22,008 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-05-31 23:10:22,053 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2024-05-31 23:10:22,053 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-05-31 23:10:22,322 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-05-31 23:10:22,322 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-05-31 23:10:22,330 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-05-31 23:10:22,331 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-05-31 23:10:22,662 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-05-31 23:10:22,664 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-05-31 23:10:22,678 INFO tuned.daemon.controller: starting controller 2024-05-31 23:10:22,678 INFO tuned.daemon.daemon: starting tuning 2024-05-31 23:10:22,693 INFO tuned.plugins.base: instance cpu: assigning devices cpu5, cpu1, cpu2, cpu0, cpu7, cpu3, cpu6, cpu4 2024-05-31 23:10:22,704 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-05-31 23:10:22,711 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-05-31 23:10:22,728 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-05-31 23:10:22,736 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-05-31 23:10:22,738 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2024-05-31 23:10:22,759 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-05-31 23:10:22,799 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-05-31 23:10:22,799 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-05-31 23:10:22,800 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-06-06 23:10:57,070 INFO tuned.daemon.controller: terminating controller 2024-06-06 23:10:57,076 INFO tuned.daemon.daemon: stopping tuning 2024-06-06 23:10:57,126 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-06-06 23:10:57,176 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2024-06-06 23:10:57,176 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-06-06 23:10:57,732 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-06-06 23:10:57,732 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-06-06 23:10:57,742 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-06-06 23:10:57,743 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-06-06 23:10:58,076 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-06-06 23:10:58,078 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-06-06 23:10:58,086 INFO tuned.daemon.controller: starting controller 2024-06-06 23:10:58,086 INFO tuned.daemon.daemon: starting tuning 2024-06-06 23:10:58,107 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu3, cpu0, cpu6, cpu7, cpu1, cpu4, cpu5 2024-06-06 23:10:58,119 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-06-06 23:10:58,125 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-06-06 23:10:58,135 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-06-06 23:10:58,142 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-06-06 23:10:58,143 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2024-06-06 23:10:58,160 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-06-06 23:10:58,201 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-06-06 23:10:58,201 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-06-06 23:10:58,202 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-07-02 23:11:15,922 INFO tuned.daemon.controller: terminating controller 2024-07-02 23:11:15,924 INFO tuned.daemon.daemon: stopping tuning 2024-07-02 23:11:16,002 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-07-02 23:11:16,048 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2024-07-02 23:11:16,048 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-07-02 23:11:16,581 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-07-02 23:11:16,581 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-07-02 23:11:16,590 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-07-02 23:11:16,592 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-07-02 23:11:16,940 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-07-02 23:11:16,945 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-07-02 23:11:16,959 INFO tuned.daemon.controller: starting controller 2024-07-02 23:11:16,959 INFO tuned.daemon.daemon: starting tuning 2024-07-02 23:11:16,978 INFO tuned.plugins.base: instance cpu: assigning devices cpu4, cpu0, cpu2, cpu3, cpu6, cpu7, cpu1, cpu5 2024-07-02 23:11:16,990 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-07-02 23:11:17,000 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-07-02 23:11:17,011 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-07-02 23:11:17,018 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-07-02 23:11:17,019 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2024-07-02 23:11:17,039 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-07-02 23:11:17,089 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-07-02 23:11:17,089 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-07-02 23:11:17,090 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-07-03 23:10:58,025 INFO tuned.daemon.controller: terminating controller 2024-07-03 23:10:58,026 INFO tuned.daemon.daemon: stopping tuning 2024-07-03 23:10:58,070 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-07-03 23:10:58,109 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2024-07-03 23:10:58,109 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-07-03 23:10:58,422 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-07-03 23:10:58,422 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-07-03 23:10:58,430 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-07-03 23:10:58,431 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-07-03 23:10:58,669 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-07-03 23:10:58,671 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-07-03 23:10:58,678 INFO tuned.daemon.controller: starting controller 2024-07-03 23:10:58,678 INFO tuned.daemon.daemon: starting tuning 2024-07-03 23:10:58,700 INFO tuned.plugins.base: instance cpu: assigning devices cpu1, cpu5, cpu0, cpu6, cpu3, cpu7, cpu4, cpu2 2024-07-03 23:10:58,713 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-07-03 23:10:58,722 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-07-03 23:10:58,731 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-07-03 23:10:58,739 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-07-03 23:10:58,740 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2024-07-03 23:10:58,754 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-07-03 23:10:58,789 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-07-03 23:10:58,790 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-07-03 23:10:58,790 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-08-08 23:10:50,558 INFO tuned.daemon.controller: terminating controller 2024-08-08 23:10:50,560 INFO tuned.daemon.daemon: stopping tuning 2024-08-08 23:10:50,639 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-08-08 23:10:50,686 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2024-08-08 23:10:50,686 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-08-08 23:10:51,080 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-08-08 23:10:51,080 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-08-08 23:10:51,090 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-08-08 23:10:51,096 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-08-08 23:10:51,333 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-08-08 23:10:51,335 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-08-08 23:10:51,344 INFO tuned.daemon.controller: starting controller 2024-08-08 23:10:51,344 INFO tuned.daemon.daemon: starting tuning 2024-08-08 23:10:51,368 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu5, cpu3, cpu4, cpu1, cpu0, cpu7, cpu2 2024-08-08 23:10:51,378 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-08-08 23:10:51,389 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-08-08 23:10:51,400 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-08-08 23:10:51,409 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-08-08 23:10:51,410 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2024-08-08 23:10:51,426 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-08-08 23:10:51,471 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-08-08 23:10:51,472 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-08-08 23:10:51,473 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-08-27 23:12:34,562 INFO tuned.daemon.controller: terminating controller 2024-08-27 23:12:34,564 INFO tuned.daemon.daemon: stopping tuning 2024-08-27 23:12:34,638 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-08-27 23:12:34,680 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2024-08-27 23:12:34,680 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-08-27 23:12:35,080 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-08-27 23:12:35,080 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-08-27 23:12:35,089 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-08-27 23:12:35,091 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-08-27 23:12:35,324 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-08-27 23:12:35,326 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-08-27 23:12:35,336 INFO tuned.daemon.controller: starting controller 2024-08-27 23:12:35,336 INFO tuned.daemon.daemon: starting tuning 2024-08-27 23:12:35,354 INFO tuned.plugins.base: instance cpu: assigning devices cpu3, cpu0, cpu2, cpu1, cpu7, cpu4, cpu6, cpu5 2024-08-27 23:12:35,365 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-08-27 23:12:35,370 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-08-27 23:12:35,378 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-08-27 23:12:35,383 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-08-27 23:12:35,384 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2024-08-27 23:12:35,398 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-08-27 23:12:35,435 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-08-27 23:12:35,436 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-08-27 23:12:35,436 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-09-25 23:14:36,957 INFO tuned.daemon.controller: terminating controller 2024-09-25 23:14:36,960 INFO tuned.daemon.daemon: stopping tuning 2024-09-25 23:14:36,994 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-09-25 23:14:37,037 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2024-09-25 23:14:37,038 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-09-25 23:14:37,435 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-09-25 23:14:37,435 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-09-25 23:14:37,442 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-09-25 23:14:37,444 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-09-25 23:14:37,676 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-09-25 23:14:37,688 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-09-25 23:14:37,698 INFO tuned.daemon.controller: starting controller 2024-09-25 23:14:37,699 INFO tuned.daemon.daemon: starting tuning 2024-09-25 23:14:37,719 INFO tuned.plugins.base: instance cpu: assigning devices cpu4, cpu6, cpu1, cpu5, cpu7, cpu2, cpu0, cpu3 2024-09-25 23:14:37,730 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-09-25 23:14:37,736 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-09-25 23:14:37,744 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-09-25 23:14:37,749 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-09-25 23:14:37,750 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2024-09-25 23:14:37,770 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-09-25 23:14:37,821 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-09-25 23:14:37,821 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-09-25 23:14:37,822 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-10-10 23:10:47,223 INFO tuned.daemon.controller: terminating controller 2024-10-10 23:10:47,226 INFO tuned.daemon.daemon: stopping tuning 2024-10-10 23:10:47,271 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-10-10 23:10:47,324 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2024-10-10 23:10:47,324 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-10-10 23:10:47,675 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-10-10 23:10:47,675 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-10-10 23:10:47,680 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-10-10 23:10:47,682 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-10-10 23:10:47,881 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-10-10 23:10:47,883 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-10-10 23:10:47,891 INFO tuned.daemon.controller: starting controller 2024-10-10 23:10:47,891 INFO tuned.daemon.daemon: starting tuning 2024-10-10 23:10:47,909 INFO tuned.plugins.base: instance cpu: assigning devices cpu0, cpu5, cpu6, cpu2, cpu7, cpu1, cpu3, cpu4 2024-10-10 23:10:47,920 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-10-10 23:10:47,925 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-10-10 23:10:47,932 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-10-10 23:10:47,937 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-10-10 23:10:47,938 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2024-10-10 23:10:47,950 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-10-10 23:10:47,986 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-10-10 23:10:47,986 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-10-10 23:10:47,987 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-11-06 23:14:47,784 INFO tuned.daemon.controller: terminating controller 2024-11-06 23:14:47,792 INFO tuned.daemon.daemon: stopping tuning 2024-11-06 23:14:47,841 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-11-06 23:14:47,898 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2024-11-06 23:14:47,899 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-11-06 23:14:48,267 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-11-06 23:14:48,267 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-11-06 23:14:48,273 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-11-06 23:14:48,275 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-11-06 23:14:48,480 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-11-06 23:14:48,482 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-11-06 23:14:48,491 INFO tuned.daemon.controller: starting controller 2024-11-06 23:14:48,491 INFO tuned.daemon.daemon: starting tuning 2024-11-06 23:14:48,539 INFO tuned.plugins.base: instance cpu: assigning devices cpu3, cpu7, cpu4, cpu1, cpu2, cpu5, cpu0, cpu6 2024-11-06 23:14:48,548 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-11-06 23:14:48,553 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-11-06 23:14:48,562 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-11-06 23:14:48,567 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-11-06 23:14:48,568 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2024-11-06 23:14:48,583 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-11-06 23:14:48,624 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-11-06 23:14:48,624 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-11-06 23:14:48,625 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-11-13 23:10:34,960 INFO tuned.daemon.controller: terminating controller 2024-11-13 23:10:34,961 INFO tuned.daemon.daemon: stopping tuning 2024-11-13 23:10:35,004 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-11-13 23:10:35,047 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2024-11-13 23:10:35,048 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-11-13 23:10:35,336 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-11-13 23:10:35,336 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-11-13 23:10:35,342 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-11-13 23:10:35,343 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-11-13 23:10:35,597 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-11-13 23:10:35,599 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-11-13 23:10:35,606 INFO tuned.daemon.controller: starting controller 2024-11-13 23:10:35,606 INFO tuned.daemon.daemon: starting tuning 2024-11-13 23:10:35,629 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu4, cpu3, cpu5, cpu6, cpu1, cpu7, cpu0 2024-11-13 23:10:35,643 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-11-13 23:10:35,651 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-11-13 23:10:35,660 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-11-13 23:10:35,666 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-11-13 23:10:35,666 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2024-11-13 23:10:35,679 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-11-13 23:10:35,709 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-11-13 23:10:35,709 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-11-13 23:10:35,710 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-11-15 23:10:36,082 INFO tuned.daemon.controller: terminating controller 2024-11-15 23:10:36,083 INFO tuned.daemon.daemon: stopping tuning 2024-11-15 23:10:36,115 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-11-15 23:10:36,151 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2024-11-15 23:10:36,151 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-11-15 23:10:36,478 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-11-15 23:10:36,478 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-11-15 23:10:36,488 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-11-15 23:10:36,489 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-11-15 23:10:36,722 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-11-15 23:10:36,724 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-11-15 23:10:36,735 INFO tuned.daemon.controller: starting controller 2024-11-15 23:10:36,735 INFO tuned.daemon.daemon: starting tuning 2024-11-15 23:10:36,754 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu3, cpu7, cpu4, cpu6, cpu0, cpu5, cpu1 2024-11-15 23:10:36,768 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-11-15 23:10:36,775 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-11-15 23:10:36,789 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-11-15 23:10:36,795 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-11-15 23:10:36,796 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2024-11-15 23:10:36,809 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-11-15 23:10:36,844 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-11-15 23:10:36,844 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-11-15 23:10:36,844 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-12-01 23:10:45,161 INFO tuned.daemon.controller: terminating controller 2024-12-01 23:10:45,162 INFO tuned.daemon.daemon: stopping tuning 2024-12-01 23:10:45,237 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-12-01 23:10:45,287 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2024-12-01 23:10:45,288 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-12-01 23:10:45,611 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-12-01 23:10:45,611 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-12-01 23:10:45,619 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-12-01 23:10:45,622 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-12-01 23:10:45,823 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-12-01 23:10:45,826 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-12-01 23:10:45,834 INFO tuned.daemon.controller: starting controller 2024-12-01 23:10:45,834 INFO tuned.daemon.daemon: starting tuning 2024-12-01 23:10:45,852 INFO tuned.plugins.base: instance cpu: assigning devices cpu5, cpu2, cpu7, cpu4, cpu1, cpu0, cpu6, cpu3 2024-12-01 23:10:45,860 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-12-01 23:10:45,864 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-12-01 23:10:45,872 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-12-01 23:10:45,876 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-12-01 23:10:45,877 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2024-12-01 23:10:45,893 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-12-01 23:10:45,927 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-12-01 23:10:45,928 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-12-01 23:10:45,928 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-12-05 23:11:11,750 INFO tuned.daemon.controller: terminating controller 2024-12-05 23:11:11,752 INFO tuned.daemon.daemon: stopping tuning 2024-12-05 23:11:11,860 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-12-05 23:11:11,933 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2024-12-05 23:11:11,933 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-12-05 23:11:12,454 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-12-05 23:11:12,454 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-12-05 23:11:12,461 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-12-05 23:11:12,462 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-12-05 23:11:12,787 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-12-05 23:11:12,789 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-12-05 23:11:12,799 INFO tuned.daemon.controller: starting controller 2024-12-05 23:11:12,799 INFO tuned.daemon.daemon: starting tuning 2024-12-05 23:11:12,838 INFO tuned.plugins.base: instance cpu: assigning devices cpu0, cpu5, cpu6, cpu3, cpu2, cpu4, cpu1, cpu7 2024-12-05 23:11:12,857 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-12-05 23:11:12,863 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-12-05 23:11:12,874 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-12-05 23:11:12,882 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-12-05 23:11:12,883 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2024-12-05 23:11:12,905 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-12-05 23:11:12,947 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-12-05 23:11:12,947 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-12-05 23:11:12,948 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-12-18 23:11:48,911 INFO tuned.daemon.controller: terminating controller 2024-12-18 23:11:48,913 INFO tuned.daemon.daemon: stopping tuning 2024-12-18 23:11:48,948 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-12-18 23:11:49,000 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2024-12-18 23:11:49,001 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-12-18 23:11:49,304 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-12-18 23:11:49,304 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-12-18 23:11:49,312 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-12-18 23:11:49,313 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-12-18 23:11:49,524 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-12-18 23:11:49,526 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-12-18 23:11:49,533 INFO tuned.daemon.controller: starting controller 2024-12-18 23:11:49,533 INFO tuned.daemon.daemon: starting tuning 2024-12-18 23:11:49,547 INFO tuned.plugins.base: instance cpu: assigning devices cpu3, cpu2, cpu4, cpu5, cpu7, cpu1, cpu0, cpu6 2024-12-18 23:11:49,556 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-12-18 23:11:49,561 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-12-18 23:11:49,576 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-12-18 23:11:49,583 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-12-18 23:11:49,584 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2024-12-18 23:11:49,595 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-12-18 23:11:49,631 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-12-18 23:11:49,631 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-12-18 23:11:49,631 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2024-12-20 23:10:52,407 INFO tuned.daemon.controller: terminating controller 2024-12-20 23:10:52,410 INFO tuned.daemon.daemon: stopping tuning 2024-12-20 23:10:52,504 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2024-12-20 23:10:52,591 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2024-12-20 23:10:52,610 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-12-20 23:10:53,023 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2024-12-20 23:10:53,023 INFO tuned.daemon.application: dynamic tuning is globally disabled 2024-12-20 23:10:53,032 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2024-12-20 23:10:53,034 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2024-12-20 23:10:53,770 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2024-12-20 23:10:53,790 INFO tuned.profiles.loader: loading profile: virtual-guest 2024-12-20 23:10:53,808 INFO tuned.daemon.controller: starting controller 2024-12-20 23:10:53,809 INFO tuned.daemon.daemon: starting tuning 2024-12-20 23:10:53,868 INFO tuned.plugins.base: instance cpu: assigning devices cpu4, cpu0, cpu3, cpu1, cpu2, cpu6, cpu5, cpu7 2024-12-20 23:10:53,878 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2024-12-20 23:10:53,884 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2024-12-20 23:10:53,892 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2024-12-20 23:10:53,899 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2024-12-20 23:10:53,900 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2024-12-20 23:10:53,912 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2024-12-20 23:10:53,958 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2024-12-20 23:10:53,959 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2024-12-20 23:10:53,959 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-01-09 23:13:15,490 INFO tuned.daemon.controller: terminating controller 2025-01-09 23:13:15,505 INFO tuned.daemon.daemon: stopping tuning 2025-01-09 23:13:15,609 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-01-09 23:13:15,705 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-01-09 23:13:15,705 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-01-09 23:13:16,172 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2025-01-09 23:13:16,173 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-01-09 23:13:16,179 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-01-09 23:13:16,180 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-01-09 23:13:16,481 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-01-09 23:13:16,484 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-01-09 23:13:16,499 INFO tuned.daemon.controller: starting controller 2025-01-09 23:13:16,499 INFO tuned.daemon.daemon: starting tuning 2025-01-09 23:13:16,518 INFO tuned.plugins.base: instance cpu: assigning devices cpu0, cpu4, cpu3, cpu1, cpu2, cpu6, cpu7, cpu5 2025-01-09 23:13:16,531 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-01-09 23:13:16,539 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-01-09 23:13:16,562 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2025-01-09 23:13:16,568 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2025-01-09 23:13:16,569 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-01-09 23:13:16,584 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-01-09 23:13:16,631 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-01-09 23:13:16,631 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-01-09 23:13:16,632 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-01-23 23:10:45,506 INFO tuned.daemon.controller: terminating controller 2025-01-23 23:10:45,509 INFO tuned.daemon.daemon: stopping tuning 2025-01-23 23:10:45,587 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-01-23 23:10:45,636 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-01-23 23:10:45,636 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-01-23 23:10:45,962 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2025-01-23 23:10:45,963 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-01-23 23:10:45,972 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-01-23 23:10:45,974 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-01-23 23:10:46,222 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-01-23 23:10:46,225 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-01-23 23:10:46,232 INFO tuned.daemon.controller: starting controller 2025-01-23 23:10:46,232 INFO tuned.daemon.daemon: starting tuning 2025-01-23 23:10:46,254 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu7, cpu5, cpu2, cpu3, cpu0, cpu4, cpu1 2025-01-23 23:10:46,266 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-01-23 23:10:46,272 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-01-23 23:10:46,280 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2025-01-23 23:10:46,288 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2025-01-23 23:10:46,289 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-01-23 23:10:46,301 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-01-23 23:10:46,350 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-01-23 23:10:46,350 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-01-23 23:10:46,351 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-01-29 23:14:53,397 INFO tuned.daemon.controller: terminating controller 2025-01-29 23:14:53,406 INFO tuned.daemon.daemon: stopping tuning 2025-01-29 23:14:53,531 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-01-29 23:14:53,626 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-01-29 23:14:53,626 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-01-29 23:14:54,015 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2025-01-29 23:14:54,015 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-01-29 23:14:54,023 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-01-29 23:14:54,024 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-01-29 23:14:54,249 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-01-29 23:14:54,252 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-01-29 23:14:54,261 INFO tuned.daemon.controller: starting controller 2025-01-29 23:14:54,261 INFO tuned.daemon.daemon: starting tuning 2025-01-29 23:14:54,279 INFO tuned.plugins.base: instance cpu: assigning devices cpu1, cpu7, cpu0, cpu4, cpu5, cpu3, cpu2, cpu6 2025-01-29 23:14:54,288 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-01-29 23:14:54,293 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-01-29 23:14:54,301 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2025-01-29 23:14:54,305 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2025-01-29 23:14:54,306 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-01-29 23:14:54,319 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-01-29 23:14:54,356 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-01-29 23:14:54,356 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-01-29 23:14:54,357 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-02-10 23:10:44,173 INFO tuned.daemon.controller: terminating controller 2025-02-10 23:10:44,175 INFO tuned.daemon.daemon: stopping tuning 2025-02-10 23:10:44,236 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-02-10 23:10:44,307 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-02-10 23:10:44,307 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-02-10 23:10:44,651 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2025-02-10 23:10:44,652 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-02-10 23:10:44,663 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-02-10 23:10:44,665 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-02-10 23:10:44,980 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-02-10 23:10:44,982 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-02-10 23:10:44,992 INFO tuned.daemon.controller: starting controller 2025-02-10 23:10:44,992 INFO tuned.daemon.daemon: starting tuning 2025-02-10 23:10:45,013 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu0, cpu3, cpu2, cpu1, cpu4, cpu7, cpu5 2025-02-10 23:10:45,032 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-02-10 23:10:45,042 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-02-10 23:10:45,062 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2025-02-10 23:10:45,069 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2025-02-10 23:10:45,070 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-02-10 23:10:45,083 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-02-10 23:10:45,120 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-02-10 23:10:45,120 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-02-10 23:10:45,121 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-02-12 23:10:54,131 INFO tuned.daemon.controller: terminating controller 2025-02-12 23:10:54,133 INFO tuned.daemon.daemon: stopping tuning 2025-02-12 23:10:54,187 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-02-12 23:10:54,223 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-02-12 23:10:54,223 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-02-12 23:10:54,498 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2025-02-12 23:10:54,499 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-02-12 23:10:54,509 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-02-12 23:10:54,510 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-02-12 23:10:54,720 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-02-12 23:10:54,723 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-02-12 23:10:54,729 INFO tuned.daemon.controller: starting controller 2025-02-12 23:10:54,729 INFO tuned.daemon.daemon: starting tuning 2025-02-12 23:10:54,744 INFO tuned.plugins.base: instance cpu: assigning devices cpu0, cpu2, cpu6, cpu7, cpu3, cpu5, cpu1, cpu4 2025-02-12 23:10:54,753 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-02-12 23:10:54,759 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-02-12 23:10:54,766 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2025-02-12 23:10:54,771 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2025-02-12 23:10:54,772 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-02-12 23:10:54,783 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-02-12 23:10:54,817 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-02-12 23:10:54,817 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-02-12 23:10:54,817 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-02-18 23:12:04,584 INFO tuned.daemon.controller: terminating controller 2025-02-18 23:12:04,588 INFO tuned.daemon.daemon: stopping tuning 2025-02-18 23:12:04,671 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-02-18 23:12:04,736 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-02-18 23:12:04,737 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-02-18 23:12:05,137 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2025-02-18 23:12:05,137 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-02-18 23:12:05,146 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-02-18 23:12:05,149 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-02-18 23:12:05,435 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-02-18 23:12:05,437 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-02-18 23:12:05,453 INFO tuned.daemon.controller: starting controller 2025-02-18 23:12:05,454 INFO tuned.daemon.daemon: starting tuning 2025-02-18 23:12:05,476 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu5, cpu1, cpu7, cpu3, cpu4, cpu6, cpu0 2025-02-18 23:12:05,486 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-02-18 23:12:05,491 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-02-18 23:12:05,501 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2025-02-18 23:12:05,507 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2025-02-18 23:12:05,508 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-02-18 23:12:05,521 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-02-18 23:12:05,572 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-02-18 23:12:05,573 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-02-18 23:12:05,574 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-03-06 23:10:47,876 INFO tuned.daemon.controller: terminating controller 2025-03-06 23:10:47,879 INFO tuned.daemon.daemon: stopping tuning 2025-03-06 23:10:47,960 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-03-06 23:10:48,001 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-03-06 23:10:48,001 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-03-06 23:10:48,318 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-513.18.1.el8_9.x86_64 2025-03-06 23:10:48,319 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-03-06 23:10:48,328 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-03-06 23:10:48,330 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-03-06 23:10:48,527 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-03-06 23:10:48,530 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-03-06 23:10:48,537 INFO tuned.daemon.controller: starting controller 2025-03-06 23:10:48,537 INFO tuned.daemon.daemon: starting tuning 2025-03-06 23:10:48,553 INFO tuned.plugins.base: instance cpu: assigning devices cpu3, cpu0, cpu7, cpu1, cpu4, cpu2, cpu5, cpu6 2025-03-06 23:10:48,562 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-03-06 23:10:48,566 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-03-06 23:10:48,573 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2025-03-06 23:10:48,578 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2025-03-06 23:10:48,579 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-03-06 23:10:48,590 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-03-06 23:10:48,619 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-03-06 23:10:48,619 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-03-06 23:10:48,620 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-03-07 11:00:15,356 INFO tuned.daemon.controller: terminating controller 2025-03-07 11:00:15,359 INFO tuned.daemon.daemon: stopping tuning 2025-03-07 11:00:15,734 INFO tuned.daemon.daemon: terminating TuneD due to system shutdown / reboot 2025-03-07 11:00:15,897 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-03-07 11:00:15,898 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-03-07 11:00:41,763 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-03-07 11:00:41,826 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-03-07 11:00:41,863 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-03-07 11:00:41,883 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-03-07 11:00:42,683 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-03-07 11:00:42,695 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-03-07 11:00:42,708 INFO tuned.daemon.controller: starting controller 2025-03-07 11:00:42,709 INFO tuned.daemon.daemon: starting tuning 2025-03-07 11:00:42,770 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu4, cpu5, cpu0, cpu3, cpu7, cpu6, cpu1 2025-03-07 11:00:42,783 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-03-07 11:00:42,791 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-03-07 11:00:42,806 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2025-03-07 11:00:42,815 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2025-03-07 11:00:42,816 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-03-07 11:00:42,840 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-03-07 11:00:42,904 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-03-07 11:00:42,905 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-03-07 11:00:42,905 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-03-07 11:00:55,629 INFO tuned.daemon.controller: terminating controller 2025-03-07 11:00:55,631 INFO tuned.daemon.daemon: stopping tuning 2025-03-07 11:00:55,738 INFO tuned.daemon.daemon: terminating TuneD due to system shutdown / reboot 2025-03-07 11:00:55,829 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-03-07 11:00:55,829 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-03-07 11:01:45,346 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-03-07 11:01:45,347 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-03-07 11:01:45,354 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-03-07 11:01:45,356 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-03-07 11:01:45,990 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-03-07 11:01:45,999 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-03-07 11:01:46,010 INFO tuned.daemon.controller: starting controller 2025-03-07 11:01:46,010 INFO tuned.daemon.daemon: starting tuning 2025-03-07 11:01:46,124 INFO tuned.plugins.base: instance cpu: assigning devices cpu1, cpu7, cpu0, cpu4, cpu5, cpu2, cpu3, cpu6 2025-03-07 11:01:46,137 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-03-07 11:01:46,146 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-03-07 11:01:46,162 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2025-03-07 11:01:46,170 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2025-03-07 11:01:46,171 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-03-07 11:01:46,188 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-03-07 11:01:46,333 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-03-07 11:01:46,333 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-03-07 11:01:46,334 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-03-10 23:11:37,488 INFO tuned.daemon.controller: terminating controller 2025-03-10 23:11:37,489 INFO tuned.daemon.daemon: stopping tuning 2025-03-10 23:11:37,564 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-03-10 23:11:37,601 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-03-10 23:11:37,601 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-03-10 23:11:37,836 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-03-10 23:11:37,837 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-03-10 23:11:37,844 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-03-10 23:11:37,845 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-03-10 23:11:38,032 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-03-10 23:11:38,034 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-03-10 23:11:38,040 INFO tuned.daemon.controller: starting controller 2025-03-10 23:11:38,040 INFO tuned.daemon.daemon: starting tuning 2025-03-10 23:11:38,053 INFO tuned.plugins.base: instance cpu: assigning devices cpu4, cpu3, cpu2, cpu5, cpu7, cpu0, cpu6, cpu1 2025-03-10 23:11:38,060 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-03-10 23:11:38,064 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-03-10 23:11:38,071 INFO tuned.plugins.plugin_disk: Device 'vda' not supported by hdparm 2025-03-10 23:11:38,076 INFO tuned.plugins.plugin_disk: Device 'loop0' not supported by hdparm 2025-03-10 23:11:38,077 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-03-10 23:11:38,088 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-03-10 23:11:38,122 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-03-10 23:11:38,123 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-03-10 23:11:38,123 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-03-12 23:13:19,901 INFO tuned.daemon.controller: terminating controller 2025-03-12 23:13:19,903 INFO tuned.daemon.daemon: stopping tuning 2025-03-12 23:13:19,952 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-03-12 23:13:19,992 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-03-12 23:13:19,992 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-03-12 23:13:20,219 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-03-12 23:13:20,219 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-03-12 23:13:20,225 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-03-12 23:13:20,226 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-03-12 23:13:20,426 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-03-12 23:13:20,427 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-03-12 23:13:20,434 INFO tuned.daemon.controller: starting controller 2025-03-12 23:13:20,434 INFO tuned.daemon.daemon: starting tuning 2025-03-12 23:13:20,453 INFO tuned.plugins.base: instance cpu: assigning devices cpu5, cpu7, cpu6, cpu0, cpu2, cpu1, cpu4, cpu3 2025-03-12 23:13:20,463 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-03-12 23:13:20,469 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-03-12 23:13:20,473 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-03-12 23:13:20,484 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-03-12 23:13:20,518 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-03-12 23:13:20,518 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-03-12 23:13:20,518 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-03-18 23:11:09,141 INFO tuned.daemon.controller: terminating controller 2025-03-18 23:11:09,143 INFO tuned.daemon.daemon: stopping tuning 2025-03-18 23:11:09,210 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-03-18 23:11:09,258 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-03-18 23:11:09,259 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-03-18 23:11:09,756 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-03-18 23:11:09,757 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-03-18 23:11:09,767 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-03-18 23:11:09,769 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-03-18 23:11:10,236 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-03-18 23:11:10,239 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-03-18 23:11:10,254 INFO tuned.daemon.controller: starting controller 2025-03-18 23:11:10,254 INFO tuned.daemon.daemon: starting tuning 2025-03-18 23:11:10,282 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu1, cpu0, cpu7, cpu2, cpu4, cpu3, cpu5 2025-03-18 23:11:10,296 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-03-18 23:11:10,305 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-03-18 23:11:10,313 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-03-18 23:11:10,332 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-03-18 23:11:10,393 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-03-18 23:11:10,394 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-03-18 23:11:10,394 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-03-21 23:10:38,612 INFO tuned.daemon.controller: terminating controller 2025-03-21 23:10:38,614 INFO tuned.daemon.daemon: stopping tuning 2025-03-21 23:10:38,680 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-03-21 23:10:38,719 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-03-21 23:10:38,719 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-03-21 23:10:38,960 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-03-21 23:10:38,961 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-03-21 23:10:38,968 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-03-21 23:10:38,969 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-03-21 23:10:39,159 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-03-21 23:10:39,162 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-03-21 23:10:39,173 INFO tuned.daemon.controller: starting controller 2025-03-21 23:10:39,173 INFO tuned.daemon.daemon: starting tuning 2025-03-21 23:10:39,188 INFO tuned.plugins.base: instance cpu: assigning devices cpu3, cpu6, cpu7, cpu2, cpu1, cpu4, cpu0, cpu5 2025-03-21 23:10:39,197 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-03-21 23:10:39,201 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-03-21 23:10:39,205 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-03-21 23:10:39,216 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-03-21 23:10:39,248 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-03-21 23:10:39,249 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-03-21 23:10:39,249 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-04-01 23:11:26,506 INFO tuned.daemon.controller: terminating controller 2025-04-01 23:11:26,511 INFO tuned.daemon.daemon: stopping tuning 2025-04-01 23:11:26,646 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-04-01 23:11:26,719 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-04-01 23:11:26,719 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-04-01 23:11:27,302 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-04-01 23:11:27,303 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-04-01 23:11:27,313 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-04-01 23:11:27,315 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-04-01 23:11:27,693 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-04-01 23:11:27,696 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-04-01 23:11:27,709 INFO tuned.daemon.controller: starting controller 2025-04-01 23:11:27,709 INFO tuned.daemon.daemon: starting tuning 2025-04-01 23:11:27,743 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu3, cpu7, cpu5, cpu2, cpu4, cpu1, cpu0 2025-04-01 23:11:27,756 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-04-01 23:11:27,763 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-04-01 23:11:27,779 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-04-01 23:11:27,793 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-04-01 23:11:27,839 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-04-01 23:11:27,839 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-04-01 23:11:27,840 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-04-03 23:12:05,371 INFO tuned.daemon.controller: terminating controller 2025-04-03 23:12:05,373 INFO tuned.daemon.daemon: stopping tuning 2025-04-03 23:12:05,478 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-04-03 23:12:05,525 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-04-03 23:12:05,526 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-04-03 23:12:06,226 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-04-03 23:12:06,226 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-04-03 23:12:06,236 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-04-03 23:12:06,238 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-04-03 23:12:06,792 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-04-03 23:12:06,794 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-04-03 23:12:06,814 INFO tuned.daemon.controller: starting controller 2025-04-03 23:12:06,814 INFO tuned.daemon.daemon: starting tuning 2025-04-03 23:12:06,856 INFO tuned.plugins.base: instance cpu: assigning devices cpu1, cpu2, cpu6, cpu5, cpu3, cpu7, cpu4, cpu0 2025-04-03 23:12:06,882 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-04-03 23:12:06,889 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-04-03 23:12:06,895 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-04-03 23:12:06,907 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-04-03 23:12:06,950 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-04-03 23:12:06,950 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-04-03 23:12:06,950 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-04-14 23:11:09,756 INFO tuned.daemon.controller: terminating controller 2025-04-14 23:11:09,760 INFO tuned.daemon.daemon: stopping tuning 2025-04-14 23:11:09,893 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-04-14 23:11:09,962 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-04-14 23:11:09,962 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-04-14 23:11:10,907 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-04-14 23:11:10,908 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-04-14 23:11:10,925 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-04-14 23:11:10,930 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-04-14 23:11:11,546 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-04-14 23:11:11,552 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-04-14 23:11:11,574 INFO tuned.daemon.controller: starting controller 2025-04-14 23:11:11,574 INFO tuned.daemon.daemon: starting tuning 2025-04-14 23:11:11,627 INFO tuned.plugins.base: instance cpu: assigning devices cpu1, cpu3, cpu2, cpu6, cpu4, cpu7, cpu0, cpu5 2025-04-14 23:11:11,669 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-04-14 23:11:11,678 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-04-14 23:11:11,717 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-04-14 23:11:11,739 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-04-14 23:11:11,800 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-04-14 23:11:11,801 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-04-14 23:11:11,801 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-04-16 23:12:45,925 INFO tuned.daemon.controller: terminating controller 2025-04-16 23:12:45,928 INFO tuned.daemon.daemon: stopping tuning 2025-04-16 23:12:45,998 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-04-16 23:12:46,037 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-04-16 23:12:46,037 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-04-16 23:12:46,452 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-04-16 23:12:46,453 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-04-16 23:12:46,461 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-04-16 23:12:46,464 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-04-16 23:12:46,720 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-04-16 23:12:46,722 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-04-16 23:12:46,731 INFO tuned.daemon.controller: starting controller 2025-04-16 23:12:46,731 INFO tuned.daemon.daemon: starting tuning 2025-04-16 23:12:46,753 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu1, cpu0, cpu3, cpu4, cpu7, cpu5, cpu2 2025-04-16 23:12:46,766 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-04-16 23:12:46,773 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-04-16 23:12:46,782 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-04-16 23:12:46,796 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-04-16 23:12:46,837 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-04-16 23:12:46,837 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-04-16 23:12:46,837 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-04-23 23:12:26,354 INFO tuned.daemon.controller: terminating controller 2025-04-23 23:12:26,355 INFO tuned.daemon.daemon: stopping tuning 2025-04-23 23:12:26,397 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-04-23 23:12:26,441 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-04-23 23:12:26,441 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-04-23 23:12:26,889 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-04-23 23:12:26,889 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-04-23 23:12:26,898 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-04-23 23:12:26,899 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-04-23 23:12:27,220 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-04-23 23:12:27,223 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-04-23 23:12:27,234 INFO tuned.daemon.controller: starting controller 2025-04-23 23:12:27,234 INFO tuned.daemon.daemon: starting tuning 2025-04-23 23:12:27,250 INFO tuned.plugins.base: instance cpu: assigning devices cpu0, cpu6, cpu4, cpu7, cpu1, cpu3, cpu2, cpu5 2025-04-23 23:12:27,262 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-04-23 23:12:27,269 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-04-23 23:12:27,275 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-04-23 23:12:27,288 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-04-23 23:12:27,338 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-04-23 23:12:27,339 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-04-23 23:12:27,340 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-05-01 23:10:39,042 INFO tuned.daemon.controller: terminating controller 2025-05-01 23:10:39,043 INFO tuned.daemon.daemon: stopping tuning 2025-05-01 23:10:39,105 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-05-01 23:10:39,152 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-05-01 23:10:39,152 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-05-01 23:10:39,464 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-05-01 23:10:39,465 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-05-01 23:10:39,472 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-05-01 23:10:39,473 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-05-01 23:10:39,697 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-05-01 23:10:39,700 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-05-01 23:10:39,708 INFO tuned.daemon.controller: starting controller 2025-05-01 23:10:39,708 INFO tuned.daemon.daemon: starting tuning 2025-05-01 23:10:39,730 INFO tuned.plugins.base: instance cpu: assigning devices cpu5, cpu7, cpu6, cpu0, cpu2, cpu1, cpu4, cpu3 2025-05-01 23:10:39,740 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-05-01 23:10:39,747 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-05-01 23:10:39,753 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-05-01 23:10:39,765 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-05-01 23:10:39,804 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-05-01 23:10:39,804 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-05-01 23:10:39,804 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-05-16 23:10:42,200 INFO tuned.daemon.controller: terminating controller 2025-05-16 23:10:42,202 INFO tuned.daemon.daemon: stopping tuning 2025-05-16 23:10:42,289 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-05-16 23:10:42,334 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-05-16 23:10:42,334 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-05-16 23:10:42,668 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-05-16 23:10:42,668 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-05-16 23:10:42,676 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-05-16 23:10:42,679 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-05-16 23:10:42,893 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-05-16 23:10:42,896 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-05-16 23:10:42,906 INFO tuned.daemon.controller: starting controller 2025-05-16 23:10:42,906 INFO tuned.daemon.daemon: starting tuning 2025-05-16 23:10:42,935 INFO tuned.plugins.base: instance cpu: assigning devices cpu7, cpu1, cpu5, cpu2, cpu6, cpu0, cpu3, cpu4 2025-05-16 23:10:42,946 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-05-16 23:10:42,951 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-05-16 23:10:42,955 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-05-16 23:10:42,975 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-05-16 23:10:43,010 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-05-16 23:10:43,010 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-05-16 23:10:43,010 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-05-21 23:12:00,754 INFO tuned.daemon.controller: terminating controller 2025-05-21 23:12:00,756 INFO tuned.daemon.daemon: stopping tuning 2025-05-21 23:12:00,800 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-05-21 23:12:00,843 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-05-21 23:12:00,843 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-05-21 23:12:01,205 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-05-21 23:12:01,205 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-05-21 23:12:01,222 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-05-21 23:12:01,224 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-05-21 23:12:01,591 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-05-21 23:12:01,594 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-05-21 23:12:01,601 INFO tuned.daemon.controller: starting controller 2025-05-21 23:12:01,601 INFO tuned.daemon.daemon: starting tuning 2025-05-21 23:12:01,622 INFO tuned.plugins.base: instance cpu: assigning devices cpu5, cpu4, cpu0, cpu1, cpu3, cpu7, cpu2, cpu6 2025-05-21 23:12:01,634 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-05-21 23:12:01,641 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-05-21 23:12:01,647 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-05-21 23:12:01,660 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-05-21 23:12:01,704 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-05-21 23:12:01,704 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-05-21 23:12:01,705 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-05-28 23:10:55,881 INFO tuned.daemon.controller: terminating controller 2025-05-28 23:10:55,883 INFO tuned.daemon.daemon: stopping tuning 2025-05-28 23:10:55,951 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-05-28 23:10:55,993 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-05-28 23:10:55,999 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-05-28 23:10:56,391 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-05-28 23:10:56,391 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-05-28 23:10:56,399 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-05-28 23:10:56,400 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-05-28 23:10:56,647 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-05-28 23:10:56,649 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-05-28 23:10:56,657 INFO tuned.daemon.controller: starting controller 2025-05-28 23:10:56,657 INFO tuned.daemon.daemon: starting tuning 2025-05-28 23:10:56,679 INFO tuned.plugins.base: instance cpu: assigning devices cpu4, cpu7, cpu5, cpu1, cpu6, cpu3, cpu0, cpu2 2025-05-28 23:10:56,689 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-05-28 23:10:56,694 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-05-28 23:10:56,699 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-05-28 23:10:56,711 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-05-28 23:10:56,745 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-05-28 23:10:56,745 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-05-28 23:10:56,746 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-06-11 23:14:39,319 INFO tuned.daemon.controller: terminating controller 2025-06-11 23:14:39,324 INFO tuned.daemon.daemon: stopping tuning 2025-06-11 23:14:39,375 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-06-11 23:14:39,423 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-06-11 23:14:39,423 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-06-11 23:14:39,777 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-06-11 23:14:39,777 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-06-11 23:14:39,785 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-06-11 23:14:39,787 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-06-11 23:14:40,057 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-06-11 23:14:40,060 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-06-11 23:14:40,072 INFO tuned.daemon.controller: starting controller 2025-06-11 23:14:40,073 INFO tuned.daemon.daemon: starting tuning 2025-06-11 23:14:40,097 INFO tuned.plugins.base: instance cpu: assigning devices cpu5, cpu3, cpu6, cpu2, cpu1, cpu0, cpu7, cpu4 2025-06-11 23:14:40,108 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-06-11 23:14:40,114 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-06-11 23:14:40,135 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-06-11 23:14:40,147 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-06-11 23:14:40,195 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-06-11 23:14:40,195 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-06-11 23:14:40,196 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-06-25 23:10:50,790 INFO tuned.daemon.controller: terminating controller 2025-06-25 23:10:50,798 INFO tuned.daemon.daemon: stopping tuning 2025-06-25 23:10:50,849 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-06-25 23:10:50,948 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-06-25 23:10:50,948 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-06-25 23:10:51,416 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-06-25 23:10:51,417 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-06-25 23:10:51,424 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-06-25 23:10:51,427 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-06-25 23:10:51,623 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-06-25 23:10:51,626 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-06-25 23:10:51,649 INFO tuned.daemon.controller: starting controller 2025-06-25 23:10:51,650 INFO tuned.daemon.daemon: starting tuning 2025-06-25 23:10:51,678 INFO tuned.plugins.base: instance cpu: assigning devices cpu3, cpu6, cpu1, cpu2, cpu5, cpu4, cpu0, cpu7 2025-06-25 23:10:51,690 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-06-25 23:10:51,698 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-06-25 23:10:51,707 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-06-25 23:10:51,738 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-06-25 23:10:51,774 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-06-25 23:10:51,774 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-06-25 23:10:51,775 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-07-02 23:12:55,040 INFO tuned.daemon.controller: terminating controller 2025-07-02 23:12:55,075 INFO tuned.daemon.daemon: stopping tuning 2025-07-02 23:12:55,181 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-07-02 23:12:55,392 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-07-02 23:12:55,393 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-07-02 23:12:56,101 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-07-02 23:12:56,101 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-07-02 23:12:56,113 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-07-02 23:12:56,115 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-07-02 23:12:56,460 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-07-02 23:12:56,462 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-07-02 23:12:56,473 INFO tuned.daemon.controller: starting controller 2025-07-02 23:12:56,473 INFO tuned.daemon.daemon: starting tuning 2025-07-02 23:12:56,500 INFO tuned.plugins.base: instance cpu: assigning devices cpu1, cpu6, cpu0, cpu2, cpu7, cpu4, cpu5, cpu3 2025-07-02 23:12:56,512 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-07-02 23:12:56,518 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-07-02 23:12:56,525 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-07-02 23:12:56,545 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-07-02 23:12:56,593 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-07-02 23:12:56,593 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-07-02 23:12:56,593 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-07-11 23:11:07,617 INFO tuned.daemon.controller: terminating controller 2025-07-11 23:11:07,660 INFO tuned.daemon.daemon: stopping tuning 2025-07-11 23:11:07,855 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-07-11 23:11:08,065 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-07-11 23:11:08,065 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-07-11 23:11:09,035 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-07-11 23:11:09,035 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-07-11 23:11:09,043 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-07-11 23:11:09,052 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-07-11 23:11:10,115 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-07-11 23:11:10,118 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-07-11 23:11:10,140 INFO tuned.daemon.controller: starting controller 2025-07-11 23:11:10,141 INFO tuned.daemon.daemon: starting tuning 2025-07-11 23:11:10,170 INFO tuned.plugins.base: instance cpu: assigning devices cpu0, cpu6, cpu4, cpu1, cpu2, cpu5, cpu3, cpu7 2025-07-11 23:11:10,184 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-07-11 23:11:10,197 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-07-11 23:11:10,205 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-07-11 23:11:10,225 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-07-11 23:11:10,273 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-07-11 23:11:10,273 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-07-11 23:11:10,274 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-07-16 23:16:20,501 INFO tuned.daemon.controller: terminating controller 2025-07-16 23:16:20,502 INFO tuned.daemon.daemon: stopping tuning 2025-07-16 23:16:20,580 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-07-16 23:16:20,617 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-07-16 23:16:20,617 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-07-16 23:16:20,937 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-07-16 23:16:20,937 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-07-16 23:16:20,944 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-07-16 23:16:20,946 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-07-16 23:16:21,184 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-07-16 23:16:21,186 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-07-16 23:16:21,193 INFO tuned.daemon.controller: starting controller 2025-07-16 23:16:21,193 INFO tuned.daemon.daemon: starting tuning 2025-07-16 23:16:21,208 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu4, cpu2, cpu5, cpu3, cpu7, cpu0, cpu1 2025-07-16 23:16:21,216 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-07-16 23:16:21,222 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-07-16 23:16:21,226 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-07-16 23:16:21,238 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-07-16 23:16:21,270 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-07-16 23:16:21,270 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-07-16 23:16:21,271 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-07-17 23:12:09,764 INFO tuned.daemon.controller: terminating controller 2025-07-17 23:12:09,765 INFO tuned.daemon.daemon: stopping tuning 2025-07-17 23:12:09,813 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-07-17 23:12:09,848 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-07-17 23:12:09,849 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-07-17 23:12:10,140 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-07-17 23:12:10,141 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-07-17 23:12:10,146 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-07-17 23:12:10,148 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-07-17 23:12:10,338 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-07-17 23:12:10,340 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-07-17 23:12:10,347 INFO tuned.daemon.controller: starting controller 2025-07-17 23:12:10,347 INFO tuned.daemon.daemon: starting tuning 2025-07-17 23:12:10,370 INFO tuned.plugins.base: instance cpu: assigning devices cpu3, cpu5, cpu7, cpu4, cpu2, cpu0, cpu1, cpu6 2025-07-17 23:12:10,379 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-07-17 23:12:10,383 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-07-17 23:12:10,388 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-07-17 23:12:10,400 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-07-17 23:12:10,435 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-07-17 23:12:10,435 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-07-17 23:12:10,436 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-07-23 23:10:39,690 INFO tuned.daemon.controller: terminating controller 2025-07-23 23:10:39,691 INFO tuned.daemon.daemon: stopping tuning 2025-07-23 23:10:39,768 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-07-23 23:10:39,822 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-07-23 23:10:39,822 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-07-23 23:10:40,137 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-07-23 23:10:40,137 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-07-23 23:10:40,144 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-07-23 23:10:40,145 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-07-23 23:10:40,361 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-07-23 23:10:40,363 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-07-23 23:10:40,370 INFO tuned.daemon.controller: starting controller 2025-07-23 23:10:40,370 INFO tuned.daemon.daemon: starting tuning 2025-07-23 23:10:40,390 INFO tuned.plugins.base: instance cpu: assigning devices cpu7, cpu1, cpu2, cpu0, cpu3, cpu6, cpu5, cpu4 2025-07-23 23:10:40,400 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-07-23 23:10:40,406 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-07-23 23:10:40,412 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-07-23 23:10:40,431 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-07-23 23:10:40,474 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-07-23 23:10:40,474 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-07-23 23:10:40,475 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-07-28 23:11:00,112 INFO tuned.daemon.controller: terminating controller 2025-07-28 23:11:00,114 INFO tuned.daemon.daemon: stopping tuning 2025-07-28 23:11:00,187 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-07-28 23:11:00,224 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-07-28 23:11:00,225 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-07-28 23:11:00,587 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-07-28 23:11:00,588 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-07-28 23:11:00,594 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-07-28 23:11:00,596 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-07-28 23:11:00,844 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-07-28 23:11:00,846 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-07-28 23:11:00,860 INFO tuned.daemon.controller: starting controller 2025-07-28 23:11:00,860 INFO tuned.daemon.daemon: starting tuning 2025-07-28 23:11:00,908 INFO tuned.plugins.base: instance cpu: assigning devices cpu7, cpu0, cpu2, cpu3, cpu6, cpu4, cpu5, cpu1 2025-07-28 23:11:00,920 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-07-28 23:11:00,926 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-07-28 23:11:00,941 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-07-28 23:11:00,965 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-07-28 23:11:01,024 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-07-28 23:11:01,025 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-07-28 23:11:01,025 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-08-07 23:15:29,299 INFO tuned.daemon.controller: terminating controller 2025-08-07 23:15:29,320 INFO tuned.daemon.daemon: stopping tuning 2025-08-07 23:15:29,434 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-08-07 23:15:29,543 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-08-07 23:15:29,545 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-08-07 23:15:30,048 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-08-07 23:15:30,048 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-08-07 23:15:30,060 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-08-07 23:15:30,062 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-08-07 23:15:30,307 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-08-07 23:15:30,311 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-08-07 23:15:30,319 INFO tuned.daemon.controller: starting controller 2025-08-07 23:15:30,319 INFO tuned.daemon.daemon: starting tuning 2025-08-07 23:15:30,339 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu3, cpu7, cpu5, cpu6, cpu4, cpu1, cpu0 2025-08-07 23:15:30,350 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-08-07 23:15:30,358 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-08-07 23:15:30,364 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-08-07 23:15:30,384 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-08-07 23:15:30,422 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-08-07 23:15:30,422 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-08-07 23:15:30,423 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-08-11 23:11:25,029 INFO tuned.daemon.controller: terminating controller 2025-08-11 23:11:25,030 INFO tuned.daemon.daemon: stopping tuning 2025-08-11 23:11:25,102 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-08-11 23:11:25,149 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-08-11 23:11:25,150 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-08-11 23:11:25,599 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-08-11 23:11:25,599 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-08-11 23:11:25,606 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-08-11 23:11:25,607 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-08-11 23:11:25,857 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-08-11 23:11:25,859 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-08-11 23:11:25,868 INFO tuned.daemon.controller: starting controller 2025-08-11 23:11:25,868 INFO tuned.daemon.daemon: starting tuning 2025-08-11 23:11:25,891 INFO tuned.plugins.base: instance cpu: assigning devices cpu7, cpu1, cpu6, cpu2, cpu3, cpu4, cpu5, cpu0 2025-08-11 23:11:25,904 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-08-11 23:11:25,909 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-08-11 23:11:25,914 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-08-11 23:11:25,926 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-08-11 23:11:25,964 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-08-11 23:11:25,964 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-08-11 23:11:25,965 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-08-18 23:10:48,955 INFO tuned.daemon.controller: terminating controller 2025-08-18 23:10:48,959 INFO tuned.daemon.daemon: stopping tuning 2025-08-18 23:10:48,999 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-08-18 23:10:49,035 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-08-18 23:10:49,035 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-08-18 23:10:49,768 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-08-18 23:10:49,769 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-08-18 23:10:49,800 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-08-18 23:10:49,803 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-08-18 23:10:50,287 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-08-18 23:10:50,288 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-08-18 23:10:50,296 INFO tuned.daemon.controller: starting controller 2025-08-18 23:10:50,296 INFO tuned.daemon.daemon: starting tuning 2025-08-18 23:10:50,319 INFO tuned.plugins.base: instance cpu: assigning devices cpu1, cpu7, cpu3, cpu2, cpu4, cpu5, cpu0, cpu6 2025-08-18 23:10:50,327 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-08-18 23:10:50,331 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-08-18 23:10:50,336 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-08-18 23:10:50,368 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-08-18 23:10:50,403 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-08-18 23:10:50,403 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-08-18 23:10:50,403 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-08-28 23:25:21,886 INFO tuned.daemon.controller: terminating controller 2025-08-28 23:25:21,889 INFO tuned.daemon.daemon: stopping tuning 2025-08-28 23:25:21,960 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-08-28 23:25:22,005 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-08-28 23:25:22,005 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-08-28 23:25:22,367 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-08-28 23:25:22,367 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-08-28 23:25:22,379 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-08-28 23:25:22,382 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-08-28 23:25:22,622 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-08-28 23:25:22,624 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-08-28 23:25:22,631 INFO tuned.daemon.controller: starting controller 2025-08-28 23:25:22,631 INFO tuned.daemon.daemon: starting tuning 2025-08-28 23:25:22,648 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu5, cpu3, cpu0, cpu4, cpu7, cpu6, cpu1 2025-08-28 23:25:22,657 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-08-28 23:25:22,664 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-08-28 23:25:22,670 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-08-28 23:25:22,682 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-08-28 23:25:22,718 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-08-28 23:25:22,718 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-08-28 23:25:22,719 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-09-02 23:10:53,159 INFO tuned.daemon.controller: terminating controller 2025-09-02 23:10:53,161 INFO tuned.daemon.daemon: stopping tuning 2025-09-02 23:10:53,239 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-09-02 23:10:53,278 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-09-02 23:10:53,278 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-09-02 23:10:53,619 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-09-02 23:10:53,619 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-09-02 23:10:53,628 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-09-02 23:10:53,630 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-09-02 23:10:53,918 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-09-02 23:10:53,921 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-09-02 23:10:53,938 INFO tuned.daemon.controller: starting controller 2025-09-02 23:10:53,938 INFO tuned.daemon.daemon: starting tuning 2025-09-02 23:10:53,963 INFO tuned.plugins.base: instance cpu: assigning devices cpu3, cpu6, cpu7, cpu1, cpu5, cpu0, cpu2, cpu4 2025-09-02 23:10:53,972 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-09-02 23:10:53,977 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-09-02 23:10:53,981 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-09-02 23:10:53,993 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-09-02 23:10:54,027 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-09-02 23:10:54,027 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-09-02 23:10:54,028 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-09-09 23:13:16,358 INFO tuned.daemon.controller: terminating controller 2025-09-09 23:13:16,361 INFO tuned.daemon.daemon: stopping tuning 2025-09-09 23:13:16,430 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-09-09 23:13:16,468 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-09-09 23:13:16,468 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-09-09 23:13:16,896 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-09-09 23:13:16,897 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-09-09 23:13:16,908 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-09-09 23:13:16,911 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-09-09 23:13:17,138 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-09-09 23:13:17,139 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-09-09 23:13:17,150 INFO tuned.daemon.controller: starting controller 2025-09-09 23:13:17,150 INFO tuned.daemon.daemon: starting tuning 2025-09-09 23:13:17,171 INFO tuned.plugins.base: instance cpu: assigning devices cpu0, cpu6, cpu7, cpu4, cpu2, cpu5, cpu1, cpu3 2025-09-09 23:13:17,182 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-09-09 23:13:17,199 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-09-09 23:13:17,206 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-09-09 23:13:17,228 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-09-09 23:13:17,274 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-09-09 23:13:17,274 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-09-09 23:13:17,274 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-09-16 23:10:41,187 INFO tuned.daemon.controller: terminating controller 2025-09-16 23:10:41,189 INFO tuned.daemon.daemon: stopping tuning 2025-09-16 23:10:41,270 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-09-16 23:10:41,328 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-09-16 23:10:41,328 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-09-16 23:10:41,697 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-09-16 23:10:41,697 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-09-16 23:10:41,705 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-09-16 23:10:41,707 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-09-16 23:10:41,918 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-09-16 23:10:41,920 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-09-16 23:10:41,928 INFO tuned.daemon.controller: starting controller 2025-09-16 23:10:41,928 INFO tuned.daemon.daemon: starting tuning 2025-09-16 23:10:41,950 INFO tuned.plugins.base: instance cpu: assigning devices cpu1, cpu3, cpu6, cpu2, cpu5, cpu0, cpu7, cpu4 2025-09-16 23:10:41,964 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-09-16 23:10:41,971 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-09-16 23:10:41,978 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-09-16 23:10:41,995 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-09-16 23:10:42,062 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-09-16 23:10:42,062 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-09-16 23:10:42,063 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-09-24 23:11:00,622 INFO tuned.daemon.controller: terminating controller 2025-09-24 23:11:00,624 INFO tuned.daemon.daemon: stopping tuning 2025-09-24 23:11:00,680 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-09-24 23:11:00,757 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-09-24 23:11:00,758 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-09-24 23:11:01,252 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-09-24 23:11:01,252 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-09-24 23:11:01,263 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-09-24 23:11:01,265 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-09-24 23:11:02,091 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-09-24 23:11:02,115 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-09-24 23:11:02,167 INFO tuned.daemon.controller: starting controller 2025-09-24 23:11:02,168 INFO tuned.daemon.daemon: starting tuning 2025-09-24 23:11:02,201 INFO tuned.plugins.base: instance cpu: assigning devices cpu3, cpu4, cpu5, cpu0, cpu2, cpu6, cpu7, cpu1 2025-09-24 23:11:02,225 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-09-24 23:11:02,247 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-09-24 23:11:02,279 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-09-24 23:11:02,305 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-09-24 23:11:02,454 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-09-24 23:11:02,454 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-09-24 23:11:02,455 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-10-01 23:11:30,108 INFO tuned.daemon.controller: terminating controller 2025-10-01 23:11:30,109 INFO tuned.daemon.daemon: stopping tuning 2025-10-01 23:11:30,194 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-10-01 23:11:30,283 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-10-01 23:11:30,284 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-10-01 23:11:30,719 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-10-01 23:11:30,719 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-10-01 23:11:30,729 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-10-01 23:11:30,732 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-10-01 23:11:31,144 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-10-01 23:11:31,148 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-10-01 23:11:31,160 INFO tuned.daemon.controller: starting controller 2025-10-01 23:11:31,160 INFO tuned.daemon.daemon: starting tuning 2025-10-01 23:11:31,196 INFO tuned.plugins.base: instance cpu: assigning devices cpu7, cpu1, cpu5, cpu6, cpu2, cpu3, cpu0, cpu4 2025-10-01 23:11:31,212 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-10-01 23:11:31,219 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-10-01 23:11:31,227 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-10-01 23:11:31,241 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-10-01 23:11:31,315 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-10-01 23:11:31,315 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-10-01 23:11:31,316 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-10-09 23:13:31,504 INFO tuned.daemon.controller: terminating controller 2025-10-09 23:13:31,527 INFO tuned.daemon.daemon: stopping tuning 2025-10-09 23:13:31,652 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-10-09 23:13:31,869 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-10-09 23:13:31,871 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-10-09 23:13:32,559 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-10-09 23:13:32,559 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-10-09 23:13:32,573 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-10-09 23:13:32,575 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-10-09 23:13:32,862 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-10-09 23:13:32,864 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-10-09 23:13:32,873 INFO tuned.daemon.controller: starting controller 2025-10-09 23:13:32,873 INFO tuned.daemon.daemon: starting tuning 2025-10-09 23:13:32,897 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu6, cpu3, cpu7, cpu1, cpu0, cpu4, cpu5 2025-10-09 23:13:32,909 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-10-09 23:13:32,915 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-10-09 23:13:32,919 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-10-09 23:13:32,932 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-10-09 23:13:33,005 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-10-09 23:13:33,005 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-10-09 23:13:33,006 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-10-14 23:10:58,992 INFO tuned.daemon.controller: terminating controller 2025-10-14 23:10:58,994 INFO tuned.daemon.daemon: stopping tuning 2025-10-14 23:10:59,026 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-10-14 23:10:59,091 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-10-14 23:10:59,092 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-10-14 23:10:59,575 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-10-14 23:10:59,575 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-10-14 23:10:59,583 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-10-14 23:10:59,585 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-10-14 23:10:59,818 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-10-14 23:10:59,820 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-10-14 23:10:59,832 INFO tuned.daemon.controller: starting controller 2025-10-14 23:10:59,832 INFO tuned.daemon.daemon: starting tuning 2025-10-14 23:10:59,865 INFO tuned.plugins.base: instance cpu: assigning devices cpu3, cpu1, cpu6, cpu4, cpu7, cpu0, cpu2, cpu5 2025-10-14 23:10:59,878 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-10-14 23:10:59,886 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-10-14 23:10:59,892 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-10-14 23:10:59,909 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-10-14 23:10:59,973 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-10-14 23:10:59,973 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-10-14 23:10:59,973 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-10-20 23:10:52,518 INFO tuned.daemon.controller: terminating controller 2025-10-20 23:10:52,521 INFO tuned.daemon.daemon: stopping tuning 2025-10-20 23:10:52,573 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-10-20 23:10:52,639 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-10-20 23:10:52,639 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-10-20 23:10:53,034 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-10-20 23:10:53,034 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-10-20 23:10:53,043 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-10-20 23:10:53,046 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-10-20 23:10:53,289 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-10-20 23:10:53,291 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-10-20 23:10:53,300 INFO tuned.daemon.controller: starting controller 2025-10-20 23:10:53,300 INFO tuned.daemon.daemon: starting tuning 2025-10-20 23:10:53,323 INFO tuned.plugins.base: instance cpu: assigning devices cpu7, cpu0, cpu6, cpu1, cpu4, cpu5, cpu2, cpu3 2025-10-20 23:10:53,333 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-10-20 23:10:53,338 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-10-20 23:10:53,343 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-10-20 23:10:53,357 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-10-20 23:10:53,416 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-10-20 23:10:53,416 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-10-20 23:10:53,417 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-10-28 23:10:45,154 INFO tuned.daemon.controller: terminating controller 2025-10-28 23:10:45,157 INFO tuned.daemon.daemon: stopping tuning 2025-10-28 23:10:45,191 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-10-28 23:10:45,283 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-10-28 23:10:45,283 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-10-28 23:10:45,657 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-10-28 23:10:45,658 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-10-28 23:10:45,666 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-10-28 23:10:45,667 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-10-28 23:10:45,896 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-10-28 23:10:45,898 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-10-28 23:10:45,906 INFO tuned.daemon.controller: starting controller 2025-10-28 23:10:45,906 INFO tuned.daemon.daemon: starting tuning 2025-10-28 23:10:45,921 INFO tuned.plugins.base: instance cpu: assigning devices cpu7, cpu2, cpu1, cpu4, cpu3, cpu6, cpu5, cpu0 2025-10-28 23:10:45,932 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-10-28 23:10:45,938 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-10-28 23:10:45,944 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-10-28 23:10:45,959 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-10-28 23:10:46,036 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-10-28 23:10:46,036 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-10-28 23:10:46,037 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-11-07 23:14:15,597 INFO tuned.daemon.controller: terminating controller 2025-11-07 23:14:15,604 INFO tuned.daemon.daemon: stopping tuning 2025-11-07 23:14:15,642 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-11-07 23:14:15,746 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-11-07 23:14:15,746 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-11-07 23:14:16,114 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-11-07 23:14:16,114 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-11-07 23:14:16,123 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-11-07 23:14:16,126 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-11-07 23:14:16,348 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-11-07 23:14:16,350 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-11-07 23:14:16,358 INFO tuned.daemon.controller: starting controller 2025-11-07 23:14:16,358 INFO tuned.daemon.daemon: starting tuning 2025-11-07 23:14:16,380 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu0, cpu7, cpu2, cpu5, cpu3, cpu1, cpu4 2025-11-07 23:14:16,389 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-11-07 23:14:16,397 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-11-07 23:14:16,406 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-11-07 23:14:16,420 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-11-07 23:14:16,499 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-11-07 23:14:16,499 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-11-07 23:14:16,500 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-11-10 23:10:42,966 INFO tuned.daemon.controller: terminating controller 2025-11-10 23:10:42,968 INFO tuned.daemon.daemon: stopping tuning 2025-11-10 23:10:43,015 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-11-10 23:10:43,086 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-11-10 23:10:43,086 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-11-10 23:10:43,422 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-11-10 23:10:43,423 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-11-10 23:10:43,433 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-11-10 23:10:43,435 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-11-10 23:10:43,661 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-11-10 23:10:43,662 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-11-10 23:10:43,671 INFO tuned.daemon.controller: starting controller 2025-11-10 23:10:43,671 INFO tuned.daemon.daemon: starting tuning 2025-11-10 23:10:43,687 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu7, cpu3, cpu1, cpu2, cpu0, cpu5, cpu4 2025-11-10 23:10:43,696 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-11-10 23:10:43,702 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-11-10 23:10:43,706 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-11-10 23:10:43,716 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-11-10 23:10:43,785 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-11-10 23:10:43,785 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-11-10 23:10:43,786 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-11-19 23:10:43,763 INFO tuned.daemon.controller: terminating controller 2025-11-19 23:10:43,767 INFO tuned.daemon.daemon: stopping tuning 2025-11-19 23:10:43,834 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-11-19 23:10:43,905 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-11-19 23:10:43,906 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-11-19 23:10:44,232 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-11-19 23:10:44,232 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-11-19 23:10:44,239 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-11-19 23:10:44,241 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-11-19 23:10:44,458 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-11-19 23:10:44,461 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-11-19 23:10:44,469 INFO tuned.daemon.controller: starting controller 2025-11-19 23:10:44,470 INFO tuned.daemon.daemon: starting tuning 2025-11-19 23:10:44,489 INFO tuned.plugins.base: instance cpu: assigning devices cpu7, cpu4, cpu6, cpu0, cpu1, cpu5, cpu3, cpu2 2025-11-19 23:10:44,498 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-11-19 23:10:44,505 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-11-19 23:10:44,509 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-11-19 23:10:44,521 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-11-19 23:10:44,595 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-11-19 23:10:44,596 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-11-19 23:10:44,596 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-11-26 23:10:28,681 INFO tuned.daemon.controller: terminating controller 2025-11-26 23:10:28,690 INFO tuned.daemon.daemon: stopping tuning 2025-11-26 23:10:28,774 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-11-26 23:10:28,862 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-11-26 23:10:28,862 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-11-26 23:10:29,332 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-11-26 23:10:29,332 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-11-26 23:10:29,339 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-11-26 23:10:29,341 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-11-26 23:10:29,582 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-11-26 23:10:29,584 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-11-26 23:10:29,593 INFO tuned.daemon.controller: starting controller 2025-11-26 23:10:29,594 INFO tuned.daemon.daemon: starting tuning 2025-11-26 23:10:29,620 INFO tuned.plugins.base: instance cpu: assigning devices cpu1, cpu4, cpu2, cpu6, cpu7, cpu5, cpu3, cpu0 2025-11-26 23:10:29,629 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-11-26 23:10:29,635 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-11-26 23:10:29,642 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-11-26 23:10:29,654 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-11-26 23:10:29,722 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-11-26 23:10:29,723 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-11-26 23:10:29,724 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-12-05 23:10:47,198 INFO tuned.daemon.controller: terminating controller 2025-12-05 23:10:47,221 INFO tuned.daemon.daemon: stopping tuning 2025-12-05 23:10:47,310 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-12-05 23:10:47,470 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-12-05 23:10:47,471 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-12-05 23:10:48,134 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-12-05 23:10:48,134 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-12-05 23:10:48,142 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-12-05 23:10:48,147 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-12-05 23:10:48,364 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-12-05 23:10:48,367 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-12-05 23:10:48,376 INFO tuned.daemon.controller: starting controller 2025-12-05 23:10:48,376 INFO tuned.daemon.daemon: starting tuning 2025-12-05 23:10:48,401 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu1, cpu5, cpu3, cpu0, cpu4, cpu6, cpu7 2025-12-05 23:10:48,413 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-12-05 23:10:48,418 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-12-05 23:10:48,423 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-12-05 23:10:48,443 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-12-05 23:10:48,556 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-12-05 23:10:48,556 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-12-05 23:10:48,557 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-12-09 23:11:51,168 INFO tuned.daemon.controller: terminating controller 2025-12-09 23:11:51,191 INFO tuned.daemon.daemon: stopping tuning 2025-12-09 23:11:51,252 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-12-09 23:11:51,359 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-12-09 23:11:51,359 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-12-09 23:11:51,908 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-12-09 23:11:51,908 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-12-09 23:11:51,915 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-12-09 23:11:51,916 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-12-09 23:11:52,159 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-12-09 23:11:52,162 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-12-09 23:11:52,169 INFO tuned.daemon.controller: starting controller 2025-12-09 23:11:52,170 INFO tuned.daemon.daemon: starting tuning 2025-12-09 23:11:52,190 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu7, cpu1, cpu5, cpu0, cpu6, cpu3, cpu4 2025-12-09 23:11:52,201 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-12-09 23:11:52,207 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-12-09 23:11:52,213 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2025-12-09 23:11:52,228 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-12-09 23:11:52,270 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-12-09 23:11:52,271 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-12-09 23:11:52,271 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2025-12-22 23:10:54,441 INFO tuned.daemon.controller: terminating controller 2025-12-22 23:10:54,444 INFO tuned.daemon.daemon: stopping tuning 2025-12-22 23:10:54,525 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2025-12-22 23:10:54,591 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2025-12-22 23:10:54,591 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-12-22 23:10:54,922 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2025-12-22 23:10:54,922 INFO tuned.daemon.application: dynamic tuning is globally disabled 2025-12-22 23:10:54,929 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2025-12-22 23:10:54,931 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2025-12-22 23:10:55,145 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2025-12-22 23:10:55,148 INFO tuned.profiles.loader: loading profile: virtual-guest 2025-12-22 23:10:55,159 INFO tuned.daemon.controller: starting controller 2025-12-22 23:10:55,159 INFO tuned.daemon.daemon: starting tuning 2025-12-22 23:10:55,181 INFO tuned.plugins.base: instance cpu: assigning devices cpu1, cpu2, cpu5, cpu4, cpu7, cpu6, cpu3, cpu0 2025-12-22 23:10:55,189 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2025-12-22 23:10:55,196 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2025-12-22 23:10:55,200 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2025-12-22 23:10:55,213 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2025-12-22 23:10:55,256 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2025-12-22 23:10:55,256 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2025-12-22 23:10:55,257 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-01-12 23:11:18,482 INFO tuned.daemon.controller: terminating controller 2026-01-12 23:11:18,487 INFO tuned.daemon.daemon: stopping tuning 2026-01-12 23:11:18,531 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-01-12 23:11:18,609 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-01-12 23:11:18,609 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-01-12 23:11:18,973 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-01-12 23:11:18,973 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-01-12 23:11:18,982 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-01-12 23:11:18,984 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-01-12 23:11:19,194 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-01-12 23:11:19,197 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-01-12 23:11:19,206 INFO tuned.daemon.controller: starting controller 2026-01-12 23:11:19,206 INFO tuned.daemon.daemon: starting tuning 2026-01-12 23:11:19,226 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu6, cpu1, cpu4, cpu7, cpu5, cpu0, cpu3 2026-01-12 23:11:19,234 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-01-12 23:11:19,239 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-01-12 23:11:19,244 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-01-12 23:11:19,255 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-01-12 23:11:19,322 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-01-12 23:11:19,322 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-01-12 23:11:19,323 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-01-14 23:10:37,506 INFO tuned.daemon.controller: terminating controller 2026-01-14 23:10:37,507 INFO tuned.daemon.daemon: stopping tuning 2026-01-14 23:10:37,581 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-01-14 23:10:37,663 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-01-14 23:10:37,663 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-01-14 23:10:37,972 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-01-14 23:10:37,972 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-01-14 23:10:37,980 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-01-14 23:10:37,981 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-01-14 23:10:38,226 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-01-14 23:10:38,228 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-01-14 23:10:38,237 INFO tuned.daemon.controller: starting controller 2026-01-14 23:10:38,237 INFO tuned.daemon.daemon: starting tuning 2026-01-14 23:10:38,258 INFO tuned.plugins.base: instance cpu: assigning devices cpu0, cpu1, cpu4, cpu2, cpu7, cpu3, cpu5, cpu6 2026-01-14 23:10:38,272 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-01-14 23:10:38,278 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-01-14 23:10:38,284 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-01-14 23:10:38,301 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-01-14 23:10:38,366 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-01-14 23:10:38,366 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-01-14 23:10:38,366 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-01-20 23:10:43,851 INFO tuned.daemon.controller: terminating controller 2026-01-20 23:10:43,857 INFO tuned.daemon.daemon: stopping tuning 2026-01-20 23:10:43,920 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-01-20 23:10:44,027 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-01-20 23:10:44,027 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-01-20 23:10:44,949 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-01-20 23:10:44,950 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-01-20 23:10:44,961 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-01-20 23:10:44,963 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-01-20 23:10:45,282 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-01-20 23:10:45,286 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-01-20 23:10:45,298 INFO tuned.daemon.controller: starting controller 2026-01-20 23:10:45,299 INFO tuned.daemon.daemon: starting tuning 2026-01-20 23:10:45,328 INFO tuned.plugins.base: instance cpu: assigning devices cpu4, cpu2, cpu5, cpu6, cpu0, cpu7, cpu3, cpu1 2026-01-20 23:10:45,338 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-01-20 23:10:45,343 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-01-20 23:10:45,349 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-01-20 23:10:45,362 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-01-20 23:10:45,430 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-01-20 23:10:45,430 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-01-20 23:10:45,431 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-01-24 23:10:32,631 INFO tuned.daemon.controller: terminating controller 2026-01-24 23:10:32,634 INFO tuned.daemon.daemon: stopping tuning 2026-01-24 23:10:32,706 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-01-24 23:10:32,777 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-01-24 23:10:32,777 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-01-24 23:10:33,181 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-01-24 23:10:33,182 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-01-24 23:10:33,189 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-01-24 23:10:33,190 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-01-24 23:10:33,436 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-01-24 23:10:33,439 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-01-24 23:10:33,445 INFO tuned.daemon.controller: starting controller 2026-01-24 23:10:33,446 INFO tuned.daemon.daemon: starting tuning 2026-01-24 23:10:33,467 INFO tuned.plugins.base: instance cpu: assigning devices cpu1, cpu7, cpu0, cpu2, cpu4, cpu3, cpu5, cpu6 2026-01-24 23:10:33,477 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-01-24 23:10:33,482 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-01-24 23:10:33,494 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-01-24 23:10:33,514 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-01-24 23:10:33,587 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-01-24 23:10:33,587 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-01-24 23:10:33,588 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-01-26 23:12:04,893 INFO tuned.daemon.controller: terminating controller 2026-01-26 23:12:04,918 INFO tuned.daemon.daemon: stopping tuning 2026-01-26 23:12:05,024 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-01-26 23:12:05,138 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-01-26 23:12:05,138 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-01-26 23:12:05,758 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-01-26 23:12:05,758 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-01-26 23:12:05,765 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-01-26 23:12:05,767 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-01-26 23:12:05,988 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-01-26 23:12:05,990 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-01-26 23:12:06,002 INFO tuned.daemon.controller: starting controller 2026-01-26 23:12:06,002 INFO tuned.daemon.daemon: starting tuning 2026-01-26 23:12:06,036 INFO tuned.plugins.base: instance cpu: assigning devices cpu1, cpu4, cpu5, cpu2, cpu0, cpu3, cpu6, cpu7 2026-01-26 23:12:06,049 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-01-26 23:12:06,054 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-01-26 23:12:06,064 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-01-26 23:12:06,105 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-01-26 23:12:06,282 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-01-26 23:12:06,282 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-01-26 23:12:06,283 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-02-02 23:10:42,876 INFO tuned.daemon.controller: terminating controller 2026-02-02 23:10:42,877 INFO tuned.daemon.daemon: stopping tuning 2026-02-02 23:10:42,938 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-02-02 23:10:43,007 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-02-02 23:10:43,007 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-02-02 23:10:43,372 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-02-02 23:10:43,372 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-02-02 23:10:43,380 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-02-02 23:10:43,381 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-02-02 23:10:43,590 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-02-02 23:10:43,593 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-02-02 23:10:43,602 INFO tuned.daemon.controller: starting controller 2026-02-02 23:10:43,602 INFO tuned.daemon.daemon: starting tuning 2026-02-02 23:10:43,616 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu4, cpu1, cpu7, cpu2, cpu0, cpu5, cpu3 2026-02-02 23:10:43,624 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-02-02 23:10:43,628 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-02-02 23:10:43,633 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-02-02 23:10:43,643 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-02-02 23:10:43,727 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-02-02 23:10:43,728 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-02-02 23:10:43,728 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-02-05 23:13:20,178 INFO tuned.daemon.controller: terminating controller 2026-02-05 23:13:20,180 INFO tuned.daemon.daemon: stopping tuning 2026-02-05 23:13:20,242 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-02-05 23:13:20,312 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-02-05 23:13:20,312 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-02-05 23:13:20,567 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-02-05 23:13:20,567 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-02-05 23:13:20,573 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-02-05 23:13:20,574 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-02-05 23:13:20,777 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-02-05 23:13:20,779 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-02-05 23:13:20,787 INFO tuned.daemon.controller: starting controller 2026-02-05 23:13:20,787 INFO tuned.daemon.daemon: starting tuning 2026-02-05 23:13:20,807 INFO tuned.plugins.base: instance cpu: assigning devices cpu4, cpu1, cpu7, cpu5, cpu2, cpu6, cpu0, cpu3 2026-02-05 23:13:20,815 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-02-05 23:13:20,820 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-02-05 23:13:20,827 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-02-05 23:13:20,839 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-02-05 23:13:20,906 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-02-05 23:13:20,906 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-02-05 23:13:20,907 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-02-06 23:10:31,680 INFO tuned.daemon.controller: terminating controller 2026-02-06 23:10:31,682 INFO tuned.daemon.daemon: stopping tuning 2026-02-06 23:10:31,723 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-02-06 23:10:31,799 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-02-06 23:10:31,799 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-02-06 23:10:32,183 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-02-06 23:10:32,183 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-02-06 23:10:32,189 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-02-06 23:10:32,190 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-02-06 23:10:32,444 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-02-06 23:10:32,447 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-02-06 23:10:32,453 INFO tuned.daemon.controller: starting controller 2026-02-06 23:10:32,454 INFO tuned.daemon.daemon: starting tuning 2026-02-06 23:10:32,472 INFO tuned.plugins.base: instance cpu: assigning devices cpu5, cpu6, cpu1, cpu0, cpu4, cpu7, cpu3, cpu2 2026-02-06 23:10:32,483 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-02-06 23:10:32,488 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-02-06 23:10:32,494 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-02-06 23:10:32,511 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-02-06 23:10:32,601 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-02-06 23:10:32,602 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-02-06 23:10:32,603 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-02-09 23:10:37,635 INFO tuned.daemon.controller: terminating controller 2026-02-09 23:10:37,636 INFO tuned.daemon.daemon: stopping tuning 2026-02-09 23:10:37,683 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-02-09 23:10:37,752 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-02-09 23:10:37,752 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-02-09 23:10:38,062 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-02-09 23:10:38,062 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-02-09 23:10:38,071 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-02-09 23:10:38,073 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-02-09 23:10:38,308 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-02-09 23:10:38,310 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-02-09 23:10:38,318 INFO tuned.daemon.controller: starting controller 2026-02-09 23:10:38,318 INFO tuned.daemon.daemon: starting tuning 2026-02-09 23:10:38,342 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu0, cpu5, cpu6, cpu7, cpu4, cpu1, cpu3 2026-02-09 23:10:38,355 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-02-09 23:10:38,361 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-02-09 23:10:38,368 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-02-09 23:10:38,385 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-02-09 23:10:38,455 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-02-09 23:10:38,456 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-02-09 23:10:38,456 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-02-11 23:12:42,055 INFO tuned.daemon.controller: terminating controller 2026-02-11 23:12:42,056 INFO tuned.daemon.daemon: stopping tuning 2026-02-11 23:12:42,148 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-02-11 23:12:42,238 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-02-11 23:12:42,238 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-02-11 23:12:42,602 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-02-11 23:12:42,602 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-02-11 23:12:42,609 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-02-11 23:12:42,611 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-02-11 23:12:42,869 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-02-11 23:12:42,872 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-02-11 23:12:42,879 INFO tuned.daemon.controller: starting controller 2026-02-11 23:12:42,879 INFO tuned.daemon.daemon: starting tuning 2026-02-11 23:12:42,894 INFO tuned.plugins.base: instance cpu: assigning devices cpu7, cpu3, cpu0, cpu1, cpu6, cpu4, cpu5, cpu2 2026-02-11 23:12:42,909 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-02-11 23:12:42,915 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-02-11 23:12:42,920 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-02-11 23:12:42,931 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-02-11 23:12:43,009 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-02-11 23:12:43,009 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-02-11 23:12:43,010 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-02-17 23:12:37,395 INFO tuned.daemon.controller: terminating controller 2026-02-17 23:12:37,397 INFO tuned.daemon.daemon: stopping tuning 2026-02-17 23:12:37,495 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-02-17 23:12:37,582 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-02-17 23:12:37,582 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-02-17 23:12:37,965 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-02-17 23:12:37,966 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-02-17 23:12:37,975 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-02-17 23:12:37,976 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-02-17 23:12:38,208 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-02-17 23:12:38,210 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-02-17 23:12:38,219 INFO tuned.daemon.controller: starting controller 2026-02-17 23:12:38,219 INFO tuned.daemon.daemon: starting tuning 2026-02-17 23:12:38,244 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu4, cpu1, cpu0, cpu2, cpu7, cpu5, cpu3 2026-02-17 23:12:38,255 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-02-17 23:12:38,266 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-02-17 23:12:38,271 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-02-17 23:12:38,283 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-02-17 23:12:38,345 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-02-17 23:12:38,345 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-02-17 23:12:38,346 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-02-23 23:11:14,415 INFO tuned.daemon.controller: terminating controller 2026-02-23 23:11:14,417 INFO tuned.daemon.daemon: stopping tuning 2026-02-23 23:11:14,458 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-02-23 23:11:14,577 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-02-23 23:11:14,577 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-02-23 23:11:15,039 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-02-23 23:11:15,039 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-02-23 23:11:15,052 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-02-23 23:11:15,054 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-02-23 23:11:15,427 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-02-23 23:11:15,431 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-02-23 23:11:15,442 INFO tuned.daemon.controller: starting controller 2026-02-23 23:11:15,443 INFO tuned.daemon.daemon: starting tuning 2026-02-23 23:11:15,466 INFO tuned.plugins.base: instance cpu: assigning devices cpu3, cpu5, cpu1, cpu4, cpu2, cpu6, cpu7, cpu0 2026-02-23 23:11:15,480 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-02-23 23:11:15,489 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-02-23 23:11:15,496 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-02-23 23:11:15,512 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-02-23 23:11:15,597 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-02-23 23:11:15,597 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-02-23 23:11:15,599 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-02-25 23:11:23,690 INFO tuned.daemon.controller: terminating controller 2026-02-25 23:11:23,692 INFO tuned.daemon.daemon: stopping tuning 2026-02-25 23:11:23,761 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-02-25 23:11:23,864 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-02-25 23:11:23,865 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-02-25 23:11:24,184 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-02-25 23:11:24,185 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-02-25 23:11:24,193 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-02-25 23:11:24,195 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-02-25 23:11:24,516 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-02-25 23:11:24,518 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-02-25 23:11:24,532 INFO tuned.daemon.controller: starting controller 2026-02-25 23:11:24,533 INFO tuned.daemon.daemon: starting tuning 2026-02-25 23:11:24,555 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu0, cpu5, cpu3, cpu7, cpu4, cpu2, cpu1 2026-02-25 23:11:24,578 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-02-25 23:11:24,584 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-02-25 23:11:24,588 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-02-25 23:11:24,600 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-02-25 23:11:24,670 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-02-25 23:11:24,670 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-02-25 23:11:24,671 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-03-03 23:12:02,135 INFO tuned.daemon.controller: terminating controller 2026-03-03 23:12:02,152 INFO tuned.daemon.daemon: stopping tuning 2026-03-03 23:12:02,207 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-03-03 23:12:02,268 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-03-03 23:12:02,268 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-03-03 23:12:02,641 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-03-03 23:12:02,642 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-03-03 23:12:02,648 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-03-03 23:12:02,649 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-03-03 23:12:02,923 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-03-03 23:12:02,927 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-03-03 23:12:02,939 INFO tuned.daemon.controller: starting controller 2026-03-03 23:12:02,939 INFO tuned.daemon.daemon: starting tuning 2026-03-03 23:12:02,961 INFO tuned.plugins.base: instance cpu: assigning devices cpu5, cpu1, cpu7, cpu0, cpu3, cpu2, cpu6, cpu4 2026-03-03 23:12:02,972 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-03-03 23:12:02,978 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-03-03 23:12:02,985 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-03-03 23:12:03,002 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-03-03 23:12:03,103 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-03-03 23:12:03,103 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-03-03 23:12:03,104 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-03-06 23:11:22,031 INFO tuned.daemon.controller: terminating controller 2026-03-06 23:11:22,033 INFO tuned.daemon.daemon: stopping tuning 2026-03-06 23:11:22,078 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-03-06 23:11:22,137 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-03-06 23:11:22,137 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-03-06 23:11:22,382 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-03-06 23:11:22,382 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-03-06 23:11:22,389 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-03-06 23:11:22,390 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-03-06 23:11:22,566 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-03-06 23:11:22,567 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-03-06 23:11:22,575 INFO tuned.daemon.controller: starting controller 2026-03-06 23:11:22,575 INFO tuned.daemon.daemon: starting tuning 2026-03-06 23:11:22,596 INFO tuned.plugins.base: instance cpu: assigning devices cpu5, cpu0, cpu2, cpu7, cpu1, cpu3, cpu4, cpu6 2026-03-06 23:11:22,604 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-03-06 23:11:22,608 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-03-06 23:11:22,613 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-03-06 23:11:22,627 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-03-06 23:11:22,694 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-03-06 23:11:22,694 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-03-06 23:11:22,695 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-03-11 23:11:15,751 INFO tuned.daemon.controller: terminating controller 2026-03-11 23:11:15,752 INFO tuned.daemon.daemon: stopping tuning 2026-03-11 23:11:15,830 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-03-11 23:11:15,916 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-03-11 23:11:15,916 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-03-11 23:11:16,265 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-03-11 23:11:16,265 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-03-11 23:11:16,272 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-03-11 23:11:16,274 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-03-11 23:11:16,477 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-03-11 23:11:16,478 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-03-11 23:11:16,488 INFO tuned.daemon.controller: starting controller 2026-03-11 23:11:16,488 INFO tuned.daemon.daemon: starting tuning 2026-03-11 23:11:16,502 INFO tuned.plugins.base: instance cpu: assigning devices cpu0, cpu2, cpu5, cpu1, cpu4, cpu6, cpu7, cpu3 2026-03-11 23:11:16,510 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-03-11 23:11:16,514 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-03-11 23:11:16,519 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-03-11 23:11:16,532 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-03-11 23:11:16,623 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-03-11 23:11:16,623 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-03-11 23:11:16,624 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-03-19 23:11:46,949 INFO tuned.daemon.controller: terminating controller 2026-03-19 23:11:46,950 INFO tuned.daemon.daemon: stopping tuning 2026-03-19 23:11:47,013 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-03-19 23:11:47,080 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-03-19 23:11:47,080 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-03-19 23:11:47,371 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-03-19 23:11:47,371 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-03-19 23:11:47,378 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-03-19 23:11:47,379 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-03-19 23:11:47,563 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-03-19 23:11:47,565 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-03-19 23:11:47,575 INFO tuned.daemon.controller: starting controller 2026-03-19 23:11:47,575 INFO tuned.daemon.daemon: starting tuning 2026-03-19 23:11:47,598 INFO tuned.plugins.base: instance cpu: assigning devices cpu3, cpu2, cpu0, cpu7, cpu1, cpu4, cpu6, cpu5 2026-03-19 23:11:47,608 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-03-19 23:11:47,614 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-03-19 23:11:47,618 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-03-19 23:11:47,630 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-03-19 23:11:47,698 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-03-19 23:11:47,698 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-03-19 23:11:47,698 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-03-27 23:10:34,874 INFO tuned.daemon.controller: terminating controller 2026-03-27 23:10:34,875 INFO tuned.daemon.daemon: stopping tuning 2026-03-27 23:10:34,944 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-03-27 23:10:34,999 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-03-27 23:10:34,999 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-03-27 23:10:35,322 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-03-27 23:10:35,322 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-03-27 23:10:35,328 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-03-27 23:10:35,331 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-03-27 23:10:35,510 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-03-27 23:10:35,512 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-03-27 23:10:35,520 INFO tuned.daemon.controller: starting controller 2026-03-27 23:10:35,520 INFO tuned.daemon.daemon: starting tuning 2026-03-27 23:10:35,542 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu1, cpu4, cpu0, cpu6, cpu3, cpu7, cpu5 2026-03-27 23:10:35,550 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-03-27 23:10:35,554 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-03-27 23:10:35,559 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-03-27 23:10:35,571 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-03-27 23:10:35,617 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-03-27 23:10:35,618 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-03-27 23:10:35,618 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-03-30 23:11:17,987 INFO tuned.daemon.controller: terminating controller 2026-03-30 23:11:17,988 INFO tuned.daemon.daemon: stopping tuning 2026-03-30 23:11:18,067 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-03-30 23:11:18,136 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-03-30 23:11:18,136 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-03-30 23:11:18,512 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-03-30 23:11:18,513 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-03-30 23:11:18,522 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-03-30 23:11:18,523 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-03-30 23:11:18,767 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-03-30 23:11:18,769 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-03-30 23:11:18,779 INFO tuned.daemon.controller: starting controller 2026-03-30 23:11:18,779 INFO tuned.daemon.daemon: starting tuning 2026-03-30 23:11:18,800 INFO tuned.plugins.base: instance cpu: assigning devices cpu3, cpu5, cpu4, cpu7, cpu0, cpu1, cpu6, cpu2 2026-03-30 23:11:18,811 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-03-30 23:11:18,817 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-03-30 23:11:18,825 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-03-30 23:11:18,842 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-03-30 23:11:18,898 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-03-30 23:11:18,898 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-03-30 23:11:18,899 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-04-03 23:10:34,405 INFO tuned.daemon.controller: terminating controller 2026-04-03 23:10:34,407 INFO tuned.daemon.daemon: stopping tuning 2026-04-03 23:10:34,488 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-04-03 23:10:34,571 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-04-03 23:10:34,571 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-04-03 23:10:34,928 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-04-03 23:10:34,928 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-04-03 23:10:34,935 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-04-03 23:10:34,936 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-04-03 23:10:35,150 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-04-03 23:10:35,152 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-04-03 23:10:35,162 INFO tuned.daemon.controller: starting controller 2026-04-03 23:10:35,162 INFO tuned.daemon.daemon: starting tuning 2026-04-03 23:10:35,181 INFO tuned.plugins.base: instance cpu: assigning devices cpu4, cpu6, cpu7, cpu3, cpu1, cpu5, cpu0, cpu2 2026-04-03 23:10:35,190 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-04-03 23:10:35,195 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-04-03 23:10:35,200 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-04-03 23:10:35,216 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-04-03 23:10:35,289 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-04-03 23:10:35,289 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-04-03 23:10:35,290 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-04-06 23:10:43,353 INFO tuned.daemon.controller: terminating controller 2026-04-06 23:10:43,354 INFO tuned.daemon.daemon: stopping tuning 2026-04-06 23:10:43,420 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-04-06 23:10:43,487 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-04-06 23:10:43,488 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-04-06 23:10:43,743 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-04-06 23:10:43,744 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-04-06 23:10:43,749 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-04-06 23:10:43,750 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-04-06 23:10:43,946 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-04-06 23:10:43,948 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-04-06 23:10:43,956 INFO tuned.daemon.controller: starting controller 2026-04-06 23:10:43,956 INFO tuned.daemon.daemon: starting tuning 2026-04-06 23:10:43,974 INFO tuned.plugins.base: instance cpu: assigning devices cpu5, cpu6, cpu0, cpu7, cpu2, cpu1, cpu4, cpu3 2026-04-06 23:10:43,983 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-04-06 23:10:43,988 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-04-06 23:10:43,993 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-04-06 23:10:44,005 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-04-06 23:10:44,066 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-04-06 23:10:44,066 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-04-06 23:10:44,066 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-04-22 23:10:40,485 INFO tuned.daemon.controller: terminating controller 2026-04-22 23:10:40,487 INFO tuned.daemon.daemon: stopping tuning 2026-04-22 23:10:40,533 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-04-22 23:10:40,575 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-04-22 23:10:40,576 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-04-22 23:10:40,909 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-04-22 23:10:40,910 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-04-22 23:10:40,918 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-04-22 23:10:40,921 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-04-22 23:10:41,113 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-04-22 23:10:41,116 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-04-22 23:10:41,127 INFO tuned.daemon.controller: starting controller 2026-04-22 23:10:41,127 INFO tuned.daemon.daemon: starting tuning 2026-04-22 23:10:41,149 INFO tuned.plugins.base: instance cpu: assigning devices cpu7, cpu4, cpu3, cpu1, cpu0, cpu2, cpu5, cpu6 2026-04-22 23:10:41,159 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-04-22 23:10:41,164 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-04-22 23:10:41,169 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-04-22 23:10:41,187 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-04-22 23:10:41,246 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-04-22 23:10:41,247 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-04-22 23:10:41,247 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-04-29 23:11:46,839 INFO tuned.daemon.controller: terminating controller 2026-04-29 23:11:46,841 INFO tuned.daemon.daemon: stopping tuning 2026-04-29 23:11:46,878 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-04-29 23:11:46,940 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-04-29 23:11:46,940 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-04-29 23:11:47,240 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-04-29 23:11:47,240 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-04-29 23:11:47,247 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-04-29 23:11:47,248 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-04-29 23:11:47,436 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-04-29 23:11:47,438 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-04-29 23:11:47,445 INFO tuned.daemon.controller: starting controller 2026-04-29 23:11:47,445 INFO tuned.daemon.daemon: starting tuning 2026-04-29 23:11:47,459 INFO tuned.plugins.base: instance cpu: assigning devices cpu5, cpu7, cpu4, cpu1, cpu3, cpu2, cpu6, cpu0 2026-04-29 23:11:47,467 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-04-29 23:11:47,472 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-04-29 23:11:47,476 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-04-29 23:11:47,487 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-04-29 23:11:47,551 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-04-29 23:11:47,551 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-04-29 23:11:47,552 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-05-01 23:11:30,027 INFO tuned.daemon.controller: terminating controller 2026-05-01 23:11:30,029 INFO tuned.daemon.daemon: stopping tuning 2026-05-01 23:11:30,101 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-05-01 23:11:30,179 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-05-01 23:11:30,179 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-01 23:11:30,515 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-05-01 23:11:30,515 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-05-01 23:11:30,524 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-05-01 23:11:30,526 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-05-01 23:11:30,733 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-05-01 23:11:30,736 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-05-01 23:11:30,744 INFO tuned.daemon.controller: starting controller 2026-05-01 23:11:30,744 INFO tuned.daemon.daemon: starting tuning 2026-05-01 23:11:30,763 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu7, cpu1, cpu5, cpu3, cpu0, cpu6, cpu4 2026-05-01 23:11:30,775 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-05-01 23:11:30,781 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-05-01 23:11:30,788 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-05-01 23:11:30,802 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-05-01 23:11:30,871 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-05-01 23:11:30,871 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-01 23:11:30,872 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-05-05 23:15:29,758 INFO tuned.daemon.controller: terminating controller 2026-05-05 23:15:29,760 INFO tuned.daemon.daemon: stopping tuning 2026-05-05 23:15:29,838 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-05-05 23:15:29,950 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-05-05 23:15:29,950 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-05 23:15:30,284 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-05-05 23:15:30,285 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-05-05 23:15:30,293 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-05-05 23:15:30,295 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-05-05 23:15:30,524 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-05-05 23:15:30,526 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-05-05 23:15:30,536 INFO tuned.daemon.controller: starting controller 2026-05-05 23:15:30,536 INFO tuned.daemon.daemon: starting tuning 2026-05-05 23:15:30,560 INFO tuned.plugins.base: instance cpu: assigning devices cpu7, cpu5, cpu0, cpu3, cpu2, cpu6, cpu4, cpu1 2026-05-05 23:15:30,571 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-05-05 23:15:30,577 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-05-05 23:15:30,583 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-05-05 23:15:30,601 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-05-05 23:15:30,689 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-05-05 23:15:30,690 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-05 23:15:30,690 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-05-06 23:13:45,824 INFO tuned.daemon.controller: terminating controller 2026-05-06 23:13:45,825 INFO tuned.daemon.daemon: stopping tuning 2026-05-06 23:13:45,881 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-05-06 23:13:45,946 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-05-06 23:13:45,946 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-06 23:13:46,217 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-05-06 23:13:46,217 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-05-06 23:13:46,223 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-05-06 23:13:46,224 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-05-06 23:13:46,412 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-05-06 23:13:46,414 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-05-06 23:13:46,420 INFO tuned.daemon.controller: starting controller 2026-05-06 23:13:46,421 INFO tuned.daemon.daemon: starting tuning 2026-05-06 23:13:46,437 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu3, cpu2, cpu5, cpu4, cpu0, cpu7, cpu1 2026-05-06 23:13:46,445 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-05-06 23:13:46,450 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-05-06 23:13:46,455 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-05-06 23:13:46,465 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-05-06 23:13:46,526 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-05-06 23:13:46,527 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-06 23:13:46,527 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-05-08 23:13:27,506 INFO tuned.daemon.controller: terminating controller 2026-05-08 23:13:27,508 INFO tuned.daemon.daemon: stopping tuning 2026-05-08 23:13:27,590 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-05-08 23:13:27,670 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-05-08 23:13:27,670 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-08 23:13:27,975 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-05-08 23:13:27,975 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-05-08 23:13:27,981 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-05-08 23:13:27,982 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-05-08 23:13:28,178 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-05-08 23:13:28,179 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-05-08 23:13:28,187 INFO tuned.daemon.controller: starting controller 2026-05-08 23:13:28,188 INFO tuned.daemon.daemon: starting tuning 2026-05-08 23:13:28,213 INFO tuned.plugins.base: instance cpu: assigning devices cpu1, cpu4, cpu3, cpu5, cpu2, cpu7, cpu6, cpu0 2026-05-08 23:13:28,222 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-05-08 23:13:28,228 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-05-08 23:13:28,233 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-05-08 23:13:28,250 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-05-08 23:13:28,361 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-05-08 23:13:28,362 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-08 23:13:28,363 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-05-11 23:10:26,542 INFO tuned.daemon.controller: terminating controller 2026-05-11 23:10:26,543 INFO tuned.daemon.daemon: stopping tuning 2026-05-11 23:10:26,620 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-05-11 23:10:26,699 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-05-11 23:10:26,699 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-11 23:10:26,980 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-05-11 23:10:26,981 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-05-11 23:10:26,987 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-05-11 23:10:26,988 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-05-11 23:10:27,175 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-05-11 23:10:27,177 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-05-11 23:10:27,184 INFO tuned.daemon.controller: starting controller 2026-05-11 23:10:27,185 INFO tuned.daemon.daemon: starting tuning 2026-05-11 23:10:27,200 INFO tuned.plugins.base: instance cpu: assigning devices cpu0, cpu7, cpu6, cpu1, cpu3, cpu4, cpu2, cpu5 2026-05-11 23:10:27,209 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-05-11 23:10:27,213 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-05-11 23:10:27,218 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-05-11 23:10:27,229 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-05-11 23:10:27,298 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-05-11 23:10:27,298 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-11 23:10:27,298 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-05-13 18:24:54,290 INFO tuned.daemon.controller: terminating controller 2026-05-13 18:24:54,291 INFO tuned.daemon.daemon: stopping tuning 2026-05-13 18:24:54,329 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-05-13 18:24:54,401 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-05-13 18:24:54,401 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-13 18:24:54,672 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.5.1.el8_10.x86_64 2026-05-13 18:24:54,672 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-05-13 18:24:54,678 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-05-13 18:24:54,679 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-05-13 18:24:54,851 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-05-13 18:24:54,853 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-05-13 18:24:54,860 INFO tuned.daemon.controller: starting controller 2026-05-13 18:24:54,860 INFO tuned.daemon.daemon: starting tuning 2026-05-13 18:24:54,881 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu7, cpu4, cpu1, cpu3, cpu5, cpu0, cpu2 2026-05-13 18:24:54,889 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-05-13 18:24:54,893 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-05-13 18:24:54,897 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-05-13 18:24:54,909 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-05-13 18:24:54,977 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-05-13 18:24:54,978 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-13 18:24:54,979 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-05-13 19:22:13,420 INFO tuned.daemon.controller: terminating controller 2026-05-13 19:22:13,421 INFO tuned.daemon.daemon: stopping tuning 2026-05-13 19:22:13,561 INFO tuned.daemon.daemon: terminating TuneD due to system shutdown / reboot 2026-05-13 19:22:36,585 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-05-13 19:22:36,589 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-05-13 19:22:36,599 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-05-13 19:22:36,600 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-05-13 19:22:37,444 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-05-13 19:22:37,451 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-05-13 19:22:37,469 INFO tuned.daemon.controller: starting controller 2026-05-13 19:22:37,470 INFO tuned.daemon.daemon: starting tuning 2026-05-13 19:22:37,520 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu7, cpu5, cpu1, cpu4, cpu3, cpu2, cpu0 2026-05-13 19:22:37,531 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-05-13 19:22:37,539 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-05-13 19:22:37,547 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-05-13 19:22:37,562 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-05-13 19:22:37,611 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-05-13 19:22:37,611 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-13 19:22:37,611 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-05-16 23:10:39,695 INFO tuned.daemon.controller: terminating controller 2026-05-16 23:10:39,696 INFO tuned.daemon.daemon: stopping tuning 2026-05-16 23:10:39,736 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-05-16 23:10:39,776 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-05-16 23:10:39,776 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-16 23:10:40,132 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-05-16 23:10:40,133 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-05-16 23:10:40,139 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-05-16 23:10:40,141 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-05-16 23:10:40,333 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-05-16 23:10:40,334 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-05-16 23:10:40,341 INFO tuned.daemon.controller: starting controller 2026-05-16 23:10:40,341 INFO tuned.daemon.daemon: starting tuning 2026-05-16 23:10:40,360 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu0, cpu1, cpu4, cpu7, cpu6, cpu3, cpu5 2026-05-16 23:10:40,370 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-05-16 23:10:40,375 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-05-16 23:10:40,381 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-05-16 23:10:40,392 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-05-16 23:10:40,430 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-05-16 23:10:40,431 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-16 23:10:40,431 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-05-21 23:11:51,884 INFO tuned.daemon.controller: terminating controller 2026-05-21 23:11:51,886 INFO tuned.daemon.daemon: stopping tuning 2026-05-21 23:11:51,960 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-05-21 23:11:51,999 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-05-21 23:11:51,999 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-21 23:11:52,318 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-05-21 23:11:52,318 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-05-21 23:11:52,326 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-05-21 23:11:52,328 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-05-21 23:11:52,527 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-05-21 23:11:52,529 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-05-21 23:11:52,536 INFO tuned.daemon.controller: starting controller 2026-05-21 23:11:52,537 INFO tuned.daemon.daemon: starting tuning 2026-05-21 23:11:52,556 INFO tuned.plugins.base: instance cpu: assigning devices cpu0, cpu2, cpu1, cpu4, cpu6, cpu3, cpu7, cpu5 2026-05-21 23:11:52,564 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-05-21 23:11:52,569 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-05-21 23:11:52,572 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-05-21 23:11:52,583 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-05-21 23:11:52,620 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-05-21 23:11:52,620 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-21 23:11:52,621 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-05-26 23:10:57,820 INFO tuned.daemon.controller: terminating controller 2026-05-26 23:10:57,821 INFO tuned.daemon.daemon: stopping tuning 2026-05-26 23:10:57,886 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-05-26 23:10:57,926 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-05-26 23:10:57,926 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-26 23:10:58,195 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-05-26 23:10:58,196 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-05-26 23:10:58,201 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-05-26 23:10:58,202 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-05-26 23:10:58,374 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-05-26 23:10:58,375 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-05-26 23:10:58,381 INFO tuned.daemon.controller: starting controller 2026-05-26 23:10:58,381 INFO tuned.daemon.daemon: starting tuning 2026-05-26 23:10:58,397 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu7, cpu0, cpu6, cpu3, cpu1, cpu4, cpu5 2026-05-26 23:10:58,405 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-05-26 23:10:58,409 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-05-26 23:10:58,413 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-05-26 23:10:58,427 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-05-26 23:10:58,460 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-05-26 23:10:58,460 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-26 23:10:58,461 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-05-29 23:12:33,215 INFO tuned.daemon.controller: terminating controller 2026-05-29 23:12:33,216 INFO tuned.daemon.daemon: stopping tuning 2026-05-29 23:12:33,289 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-05-29 23:12:33,322 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-05-29 23:12:33,322 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-29 23:12:33,566 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-05-29 23:12:33,566 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-05-29 23:12:33,571 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-05-29 23:12:33,572 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-05-29 23:12:33,749 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-05-29 23:12:33,750 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-05-29 23:12:33,757 INFO tuned.daemon.controller: starting controller 2026-05-29 23:12:33,757 INFO tuned.daemon.daemon: starting tuning 2026-05-29 23:12:33,775 INFO tuned.plugins.base: instance cpu: assigning devices cpu4, cpu6, cpu1, cpu3, cpu0, cpu5, cpu7, cpu2 2026-05-29 23:12:33,782 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-05-29 23:12:33,785 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-05-29 23:12:33,789 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-05-29 23:12:33,799 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-05-29 23:12:33,834 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-05-29 23:12:33,834 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-05-29 23:12:33,835 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-06-02 23:11:21,941 INFO tuned.daemon.controller: terminating controller 2026-06-02 23:11:21,942 INFO tuned.daemon.daemon: stopping tuning 2026-06-02 23:11:21,982 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-06-02 23:11:22,025 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-06-02 23:11:22,025 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-06-02 23:11:22,318 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-06-02 23:11:22,319 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-06-02 23:11:22,327 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-06-02 23:11:22,328 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-06-02 23:11:22,524 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-06-02 23:11:22,526 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-06-02 23:11:22,533 INFO tuned.daemon.controller: starting controller 2026-06-02 23:11:22,534 INFO tuned.daemon.daemon: starting tuning 2026-06-02 23:11:22,549 INFO tuned.plugins.base: instance cpu: assigning devices cpu7, cpu6, cpu2, cpu3, cpu5, cpu0, cpu1, cpu4 2026-06-02 23:11:22,558 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-06-02 23:11:22,563 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-06-02 23:11:22,568 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-06-02 23:11:22,579 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-06-02 23:11:22,611 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-06-02 23:11:22,612 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-06-02 23:11:22,612 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-06-03 23:10:37,255 INFO tuned.daemon.controller: terminating controller 2026-06-03 23:10:37,257 INFO tuned.daemon.daemon: stopping tuning 2026-06-03 23:10:37,355 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-06-03 23:10:37,511 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-06-03 23:10:37,512 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-06-03 23:10:37,912 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-06-03 23:10:37,941 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-06-03 23:10:37,950 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-06-03 23:10:37,951 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-06-03 23:10:38,208 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-06-03 23:10:38,209 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-06-03 23:10:38,217 INFO tuned.daemon.controller: starting controller 2026-06-03 23:10:38,218 INFO tuned.daemon.daemon: starting tuning 2026-06-03 23:10:38,240 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu4, cpu5, cpu6, cpu7, cpu3, cpu1, cpu0 2026-06-03 23:10:38,254 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-06-03 23:10:38,258 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-06-03 23:10:38,263 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-06-03 23:10:38,277 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-06-03 23:10:38,316 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-06-03 23:10:38,316 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-06-03 23:10:38,317 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-06-04 23:11:34,597 INFO tuned.daemon.controller: terminating controller 2026-06-04 23:11:34,600 INFO tuned.daemon.daemon: stopping tuning 2026-06-04 23:11:34,646 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-06-04 23:11:34,688 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-06-04 23:11:34,689 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-06-04 23:11:35,019 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-06-04 23:11:35,019 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-06-04 23:11:35,025 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-06-04 23:11:35,026 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-06-04 23:11:35,223 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-06-04 23:11:35,225 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-06-04 23:11:35,231 INFO tuned.daemon.controller: starting controller 2026-06-04 23:11:35,231 INFO tuned.daemon.daemon: starting tuning 2026-06-04 23:11:35,250 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu3, cpu7, cpu2, cpu1, cpu4, cpu0, cpu5 2026-06-04 23:11:35,260 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-06-04 23:11:35,265 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-06-04 23:11:35,270 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-06-04 23:11:35,280 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-06-04 23:11:35,310 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-06-04 23:11:35,310 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-06-04 23:11:35,310 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-06-11 23:11:16,745 INFO tuned.daemon.controller: terminating controller 2026-06-11 23:11:16,748 INFO tuned.daemon.daemon: stopping tuning 2026-06-11 23:11:16,795 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-06-11 23:11:16,836 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-06-11 23:11:16,836 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-06-11 23:11:17,180 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-06-11 23:11:17,181 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-06-11 23:11:17,189 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-06-11 23:11:17,192 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-06-11 23:11:17,403 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-06-11 23:11:17,406 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-06-11 23:11:17,416 INFO tuned.daemon.controller: starting controller 2026-06-11 23:11:17,417 INFO tuned.daemon.daemon: starting tuning 2026-06-11 23:11:17,433 INFO tuned.plugins.base: instance cpu: assigning devices cpu3, cpu2, cpu0, cpu4, cpu1, cpu5, cpu6, cpu7 2026-06-11 23:11:17,442 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-06-11 23:11:17,447 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-06-11 23:11:17,451 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-06-11 23:11:17,462 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-06-11 23:11:17,497 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-06-11 23:11:17,497 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-06-11 23:11:17,497 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-06-17 23:11:43,850 INFO tuned.daemon.controller: terminating controller 2026-06-17 23:11:43,851 INFO tuned.daemon.daemon: stopping tuning 2026-06-17 23:11:43,949 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-06-17 23:11:44,037 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-06-17 23:11:44,037 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-06-17 23:11:44,637 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-06-17 23:11:44,637 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-06-17 23:11:44,657 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-06-17 23:11:44,658 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-06-17 23:11:45,557 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-06-17 23:11:45,561 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-06-17 23:11:45,648 INFO tuned.daemon.controller: starting controller 2026-06-17 23:11:45,704 INFO tuned.daemon.daemon: starting tuning 2026-06-17 23:11:45,764 INFO tuned.plugins.base: instance cpu: assigning devices cpu1, cpu5, cpu4, cpu0, cpu3, cpu6, cpu7, cpu2 2026-06-17 23:11:45,786 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-06-17 23:11:45,845 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-06-17 23:11:45,850 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-06-17 23:11:45,866 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-06-17 23:11:45,981 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-06-17 23:11:45,982 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-06-17 23:11:45,984 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-06-22 23:11:19,857 INFO tuned.daemon.controller: terminating controller 2026-06-22 23:11:19,858 INFO tuned.daemon.daemon: stopping tuning 2026-06-22 23:11:20,000 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-06-22 23:11:20,093 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-06-22 23:11:20,098 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-06-22 23:11:20,890 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-06-22 23:11:20,890 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-06-22 23:11:20,908 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-06-22 23:11:20,910 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-06-22 23:11:21,635 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-06-22 23:11:21,699 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-06-22 23:11:21,733 INFO tuned.daemon.controller: starting controller 2026-06-22 23:11:21,742 INFO tuned.daemon.daemon: starting tuning 2026-06-22 23:11:21,807 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu4, cpu2, cpu3, cpu1, cpu0, cpu7, cpu5 2026-06-22 23:11:21,849 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-06-22 23:11:21,854 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-06-22 23:11:21,858 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-06-22 23:11:21,872 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-06-22 23:11:22,174 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-06-22 23:11:22,174 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-06-22 23:11:22,175 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-06-23 23:10:46,160 INFO tuned.daemon.controller: terminating controller 2026-06-23 23:10:46,161 INFO tuned.daemon.daemon: stopping tuning 2026-06-23 23:10:46,240 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-06-23 23:10:46,327 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-06-23 23:10:46,327 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-06-23 23:10:46,701 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-06-23 23:10:46,702 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-06-23 23:10:46,708 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-06-23 23:10:46,710 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-06-23 23:10:46,909 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-06-23 23:10:46,911 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-06-23 23:10:46,919 INFO tuned.daemon.controller: starting controller 2026-06-23 23:10:46,919 INFO tuned.daemon.daemon: starting tuning 2026-06-23 23:10:46,932 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu7, cpu0, cpu3, cpu4, cpu5, cpu1, cpu6 2026-06-23 23:10:46,940 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-06-23 23:10:46,944 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-06-23 23:10:46,949 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-06-23 23:10:46,960 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-06-23 23:10:47,023 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-06-23 23:10:47,023 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-06-23 23:10:47,024 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-06-30 23:11:09,499 INFO tuned.daemon.controller: terminating controller 2026-06-30 23:11:09,501 INFO tuned.daemon.daemon: stopping tuning 2026-06-30 23:11:09,545 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-06-30 23:11:09,597 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-06-30 23:11:09,597 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-06-30 23:11:10,041 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-06-30 23:11:10,041 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-06-30 23:11:10,050 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-06-30 23:11:10,053 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-06-30 23:11:10,295 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-06-30 23:11:10,298 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-06-30 23:11:10,308 INFO tuned.daemon.controller: starting controller 2026-06-30 23:11:10,308 INFO tuned.daemon.daemon: starting tuning 2026-06-30 23:11:10,336 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu1, cpu3, cpu5, cpu7, cpu2, cpu0, cpu4 2026-06-30 23:11:10,346 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-06-30 23:11:10,352 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-06-30 23:11:10,357 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-06-30 23:11:10,369 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-06-30 23:11:10,432 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-06-30 23:11:10,433 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-06-30 23:11:10,433 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-07-01 23:11:32,211 INFO tuned.daemon.controller: terminating controller 2026-07-01 23:11:32,213 INFO tuned.daemon.daemon: stopping tuning 2026-07-01 23:11:32,261 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-07-01 23:11:32,316 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-07-01 23:11:32,317 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-01 23:11:32,581 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-07-01 23:11:32,582 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-07-01 23:11:32,588 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-07-01 23:11:32,589 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-07-01 23:11:32,764 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-07-01 23:11:32,766 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-07-01 23:11:32,780 INFO tuned.daemon.controller: starting controller 2026-07-01 23:11:32,780 INFO tuned.daemon.daemon: starting tuning 2026-07-01 23:11:32,796 INFO tuned.plugins.base: instance cpu: assigning devices cpu4, cpu5, cpu2, cpu1, cpu0, cpu3, cpu6, cpu7 2026-07-01 23:11:32,804 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-07-01 23:11:32,809 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-07-01 23:11:32,814 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-07-01 23:11:32,826 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-07-01 23:11:32,858 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-07-01 23:11:32,858 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-01 23:11:32,858 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-07-08 21:28:04,829 INFO tuned.daemon.controller: terminating controller 2026-07-08 21:28:04,831 INFO tuned.daemon.daemon: stopping tuning 2026-07-08 21:28:04,906 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-07-08 21:28:04,982 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-07-08 21:28:04,982 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-08 21:28:05,276 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-07-08 21:28:05,277 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-07-08 21:28:05,283 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-07-08 21:28:05,285 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-07-08 21:28:05,471 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-07-08 21:28:05,473 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-07-08 21:28:05,481 INFO tuned.daemon.controller: starting controller 2026-07-08 21:28:05,481 INFO tuned.daemon.daemon: starting tuning 2026-07-08 21:28:05,498 INFO tuned.plugins.base: instance cpu: assigning devices cpu7, cpu0, cpu3, cpu6, cpu5, cpu4, cpu2, cpu1 2026-07-08 21:28:05,506 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-07-08 21:28:05,510 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-07-08 21:28:05,513 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-07-08 21:28:05,524 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-07-08 21:28:05,586 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-07-08 21:28:05,586 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-08 21:28:05,587 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-07-09 23:13:43,812 INFO tuned.daemon.controller: terminating controller 2026-07-09 23:13:43,813 INFO tuned.daemon.daemon: stopping tuning 2026-07-09 23:13:43,859 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-07-09 23:13:43,952 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-07-09 23:13:43,953 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-09 23:13:44,231 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-07-09 23:13:44,231 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-07-09 23:13:44,238 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-07-09 23:13:44,239 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-07-09 23:13:44,461 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-07-09 23:13:44,462 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-07-09 23:13:44,470 INFO tuned.daemon.controller: starting controller 2026-07-09 23:13:44,470 INFO tuned.daemon.daemon: starting tuning 2026-07-09 23:13:44,483 INFO tuned.plugins.base: instance cpu: assigning devices cpu5, cpu6, cpu7, cpu1, cpu0, cpu4, cpu2, cpu3 2026-07-09 23:13:44,492 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-07-09 23:13:44,497 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-07-09 23:13:44,501 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-07-09 23:13:44,513 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-07-09 23:13:44,572 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-07-09 23:13:44,572 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-09 23:13:44,573 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-07-10 23:10:42,142 INFO tuned.daemon.controller: terminating controller 2026-07-10 23:10:42,144 INFO tuned.daemon.daemon: stopping tuning 2026-07-10 23:10:42,218 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-07-10 23:10:42,281 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-07-10 23:10:42,281 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-10 23:10:42,609 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-07-10 23:10:42,609 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-07-10 23:10:42,616 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-07-10 23:10:42,617 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-07-10 23:10:42,815 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-07-10 23:10:42,817 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-07-10 23:10:42,825 INFO tuned.daemon.controller: starting controller 2026-07-10 23:10:42,826 INFO tuned.daemon.daemon: starting tuning 2026-07-10 23:10:42,845 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu7, cpu3, cpu1, cpu0, cpu2, cpu4, cpu5 2026-07-10 23:10:42,854 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-07-10 23:10:42,858 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-07-10 23:10:42,862 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-07-10 23:10:42,873 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-07-10 23:10:42,937 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-07-10 23:10:42,938 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-10 23:10:42,938 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-07-14 23:11:04,034 INFO tuned.daemon.controller: terminating controller 2026-07-14 23:11:04,036 INFO tuned.daemon.daemon: stopping tuning 2026-07-14 23:11:04,079 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-07-14 23:11:04,152 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-07-14 23:11:04,153 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-14 23:11:04,507 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-07-14 23:11:04,508 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-07-14 23:11:04,514 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-07-14 23:11:04,516 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-07-14 23:11:04,754 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-07-14 23:11:04,756 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-07-14 23:11:04,778 INFO tuned.daemon.controller: starting controller 2026-07-14 23:11:04,779 INFO tuned.daemon.daemon: starting tuning 2026-07-14 23:11:04,826 INFO tuned.plugins.base: instance cpu: assigning devices cpu1, cpu4, cpu5, cpu0, cpu6, cpu7, cpu2, cpu3 2026-07-14 23:11:04,845 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-07-14 23:11:04,851 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-07-14 23:11:04,857 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-07-14 23:11:04,881 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-07-14 23:11:04,978 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-07-14 23:11:04,979 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-14 23:11:04,979 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-07-15 23:11:07,020 INFO tuned.daemon.controller: terminating controller 2026-07-15 23:11:07,021 INFO tuned.daemon.daemon: stopping tuning 2026-07-15 23:11:07,081 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-07-15 23:11:07,133 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-07-15 23:11:07,134 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-15 23:11:07,455 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-07-15 23:11:07,456 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-07-15 23:11:07,462 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-07-15 23:11:07,463 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-07-15 23:11:07,663 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-07-15 23:11:07,665 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-07-15 23:11:07,674 INFO tuned.daemon.controller: starting controller 2026-07-15 23:11:07,675 INFO tuned.daemon.daemon: starting tuning 2026-07-15 23:11:07,689 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu7, cpu5, cpu3, cpu2, cpu4, cpu0, cpu1 2026-07-15 23:11:07,698 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-07-15 23:11:07,704 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-07-15 23:11:07,707 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-07-15 23:11:07,718 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-07-15 23:11:07,754 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-07-15 23:11:07,755 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-15 23:11:07,755 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-07-21 23:10:44,416 INFO tuned.daemon.controller: terminating controller 2026-07-21 23:10:44,417 INFO tuned.daemon.daemon: stopping tuning 2026-07-21 23:10:44,494 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-07-21 23:10:44,568 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-07-21 23:10:44,569 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-21 23:10:44,861 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-07-21 23:10:44,861 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-07-21 23:10:44,867 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-07-21 23:10:44,868 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-07-21 23:10:45,026 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-07-21 23:10:45,028 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-07-21 23:10:45,038 INFO tuned.daemon.controller: starting controller 2026-07-21 23:10:45,038 INFO tuned.daemon.daemon: starting tuning 2026-07-21 23:10:45,055 INFO tuned.plugins.base: instance cpu: assigning devices cpu0, cpu2, cpu7, cpu3, cpu6, cpu1, cpu4, cpu5 2026-07-21 23:10:45,063 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-07-21 23:10:45,066 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-07-21 23:10:45,070 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-07-21 23:10:45,081 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-07-21 23:10:45,140 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-07-21 23:10:45,141 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-21 23:10:45,142 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-07-22 23:11:07,080 INFO tuned.daemon.controller: terminating controller 2026-07-22 23:11:07,082 INFO tuned.daemon.daemon: stopping tuning 2026-07-22 23:11:07,165 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-07-22 23:11:07,223 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-07-22 23:11:07,223 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-22 23:11:07,467 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-07-22 23:11:07,468 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-07-22 23:11:07,474 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-07-22 23:11:07,475 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-07-22 23:11:07,653 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-07-22 23:11:07,654 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-07-22 23:11:07,661 INFO tuned.daemon.controller: starting controller 2026-07-22 23:11:07,661 INFO tuned.daemon.daemon: starting tuning 2026-07-22 23:11:07,684 INFO tuned.plugins.base: instance cpu: assigning devices cpu1, cpu7, cpu2, cpu6, cpu4, cpu5, cpu0, cpu3 2026-07-22 23:11:07,692 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-07-22 23:11:07,697 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-07-22 23:11:07,702 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-07-22 23:11:07,712 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-07-22 23:11:07,763 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-07-22 23:11:07,763 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-22 23:11:07,763 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-07-24 23:10:40,949 INFO tuned.daemon.controller: terminating controller 2026-07-24 23:10:40,951 INFO tuned.daemon.daemon: stopping tuning 2026-07-24 23:10:41,011 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-07-24 23:10:41,074 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-07-24 23:10:41,074 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-24 23:10:41,317 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-07-24 23:10:41,317 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-07-24 23:10:41,326 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-07-24 23:10:41,327 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-07-24 23:10:41,524 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-07-24 23:10:41,526 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-07-24 23:10:41,532 INFO tuned.daemon.controller: starting controller 2026-07-24 23:10:41,533 INFO tuned.daemon.daemon: starting tuning 2026-07-24 23:10:41,546 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu4, cpu2, cpu5, cpu0, cpu1, cpu3, cpu7 2026-07-24 23:10:41,556 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-07-24 23:10:41,562 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-07-24 23:10:41,566 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-07-24 23:10:41,577 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-07-24 23:10:41,646 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-07-24 23:10:41,646 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-24 23:10:41,647 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-07-29 17:33:17,415 INFO tuned.daemon.controller: terminating controller 2026-07-29 17:33:17,416 INFO tuned.daemon.daemon: stopping tuning 2026-07-29 17:33:17,476 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-07-29 17:33:17,527 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-07-29 17:33:17,527 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-29 17:33:18,027 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-07-29 17:33:18,028 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-07-29 17:33:18,035 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-07-29 17:33:18,037 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-07-29 17:33:18,222 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-07-29 17:33:18,224 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-07-29 17:33:18,233 INFO tuned.daemon.controller: starting controller 2026-07-29 17:33:18,233 INFO tuned.daemon.daemon: starting tuning 2026-07-29 17:33:18,254 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu7, cpu1, cpu4, cpu2, cpu0, cpu5, cpu3 2026-07-29 17:33:18,261 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-07-29 17:33:18,265 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-07-29 17:33:18,270 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-07-29 17:33:18,280 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-07-29 17:33:18,326 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-07-29 17:33:18,326 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-29 17:33:18,327 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-07-29 23:14:25,360 INFO tuned.daemon.controller: terminating controller 2026-07-29 23:14:25,361 INFO tuned.daemon.daemon: stopping tuning 2026-07-29 23:14:25,428 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-07-29 23:14:25,469 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-07-29 23:14:25,469 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-29 23:14:25,714 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-07-29 23:14:25,714 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-07-29 23:14:25,720 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-07-29 23:14:25,721 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-07-29 23:14:25,912 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-07-29 23:14:25,914 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-07-29 23:14:25,921 INFO tuned.daemon.controller: starting controller 2026-07-29 23:14:25,921 INFO tuned.daemon.daemon: starting tuning 2026-07-29 23:14:25,934 INFO tuned.plugins.base: instance cpu: assigning devices cpu7, cpu5, cpu6, cpu4, cpu2, cpu1, cpu3, cpu0 2026-07-29 23:14:25,942 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-07-29 23:14:25,946 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-07-29 23:14:25,950 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-07-29 23:14:25,961 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-07-29 23:14:26,002 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-07-29 23:14:26,002 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-07-29 23:14:26,003 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-08-02 23:10:41,089 INFO tuned.daemon.controller: terminating controller 2026-08-02 23:10:41,091 INFO tuned.daemon.daemon: stopping tuning 2026-08-02 23:10:41,172 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-08-02 23:10:41,228 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-08-02 23:10:41,228 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-08-02 23:10:41,542 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-08-02 23:10:41,542 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-08-02 23:10:41,549 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-08-02 23:10:41,550 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-08-02 23:10:41,760 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-08-02 23:10:41,762 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-08-02 23:10:41,770 INFO tuned.daemon.controller: starting controller 2026-08-02 23:10:41,770 INFO tuned.daemon.daemon: starting tuning 2026-08-02 23:10:41,788 INFO tuned.plugins.base: instance cpu: assigning devices cpu5, cpu7, cpu0, cpu1, cpu6, cpu2, cpu4, cpu3 2026-08-02 23:10:41,799 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-08-02 23:10:41,804 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-08-02 23:10:41,810 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-08-02 23:10:41,826 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-08-02 23:10:41,910 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-08-02 23:10:41,910 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-08-02 23:10:41,911 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-08-04 23:10:47,920 INFO tuned.daemon.controller: terminating controller 2026-08-04 23:10:47,920 INFO tuned.daemon.daemon: stopping tuning 2026-08-04 23:10:47,993 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-08-04 23:10:48,051 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-08-04 23:10:48,051 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-08-04 23:10:48,300 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-08-04 23:10:48,300 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-08-04 23:10:48,306 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-08-04 23:10:48,307 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-08-04 23:10:48,488 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-08-04 23:10:48,490 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-08-04 23:10:48,496 INFO tuned.daemon.controller: starting controller 2026-08-04 23:10:48,496 INFO tuned.daemon.daemon: starting tuning 2026-08-04 23:10:48,510 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu3, cpu7, cpu6, cpu1, cpu4, cpu5, cpu0 2026-08-04 23:10:48,519 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-08-04 23:10:48,523 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-08-04 23:10:48,528 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-08-04 23:10:48,541 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-08-04 23:10:48,603 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-08-04 23:10:48,603 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-08-04 23:10:48,604 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-08-06 23:13:48,888 INFO tuned.daemon.controller: terminating controller 2026-08-06 23:13:48,891 INFO tuned.daemon.daemon: stopping tuning 2026-08-06 23:13:48,973 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-08-06 23:13:49,060 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-08-06 23:13:49,060 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-08-06 23:13:49,377 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-08-06 23:13:49,378 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-08-06 23:13:49,385 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-08-06 23:13:49,388 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-08-06 23:13:49,722 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-08-06 23:13:49,724 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-08-06 23:13:49,735 INFO tuned.daemon.controller: starting controller 2026-08-06 23:13:49,736 INFO tuned.daemon.daemon: starting tuning 2026-08-06 23:13:49,760 INFO tuned.plugins.base: instance cpu: assigning devices cpu5, cpu3, cpu2, cpu1, cpu0, cpu4, cpu6, cpu7 2026-08-06 23:13:49,772 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-08-06 23:13:49,779 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-08-06 23:13:49,784 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-08-06 23:13:49,800 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-08-06 23:13:49,878 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-08-06 23:13:49,879 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-08-06 23:13:49,880 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-08-12 23:11:00,749 INFO tuned.daemon.controller: terminating controller 2026-08-12 23:11:00,752 INFO tuned.daemon.daemon: stopping tuning 2026-08-12 23:11:00,831 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-08-12 23:11:00,896 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-08-12 23:11:00,897 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-08-12 23:11:01,278 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-08-12 23:11:01,278 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-08-12 23:11:01,285 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-08-12 23:11:01,286 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-08-12 23:11:01,525 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-08-12 23:11:01,527 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-08-12 23:11:01,547 INFO tuned.daemon.controller: starting controller 2026-08-12 23:11:01,547 INFO tuned.daemon.daemon: starting tuning 2026-08-12 23:11:01,574 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu7, cpu6, cpu1, cpu5, cpu4, cpu3, cpu0 2026-08-12 23:11:01,585 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-08-12 23:11:01,590 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-08-12 23:11:01,596 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-08-12 23:11:01,611 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-08-12 23:11:01,718 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-08-12 23:11:01,718 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-08-12 23:11:01,719 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-08-13 18:44:23,070 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-08-13 18:44:23,095 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-08-13 18:44:23,149 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-08-13 18:44:23,197 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-08-13 18:44:24,731 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-08-13 18:44:25,011 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-08-13 18:44:25,122 INFO tuned.daemon.controller: starting controller 2026-08-13 18:44:25,123 INFO tuned.daemon.daemon: starting tuning 2026-08-13 18:44:25,536 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu5, cpu7, cpu6, cpu1, cpu4, cpu0, cpu3 2026-08-13 18:44:25,618 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-08-13 18:44:25,679 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-08-13 18:44:25,717 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-08-13 18:44:25,786 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-08-13 18:44:26,097 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-08-13 18:44:26,097 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-08-13 18:44:26,098 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-08-22 23:13:01,147 INFO tuned.daemon.controller: terminating controller 2026-08-22 23:13:01,149 INFO tuned.daemon.daemon: stopping tuning 2026-08-22 23:13:01,204 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-08-22 23:13:01,241 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-08-22 23:13:01,241 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-08-22 23:13:01,599 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-08-22 23:13:01,599 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-08-22 23:13:01,606 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-08-22 23:13:01,609 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-08-22 23:13:01,800 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-08-22 23:13:01,803 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-08-22 23:13:01,815 INFO tuned.daemon.controller: starting controller 2026-08-22 23:13:01,816 INFO tuned.daemon.daemon: starting tuning 2026-08-22 23:13:01,837 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu4, cpu5, cpu3, cpu6, cpu1, cpu0, cpu7 2026-08-22 23:13:01,848 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-08-22 23:13:01,853 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-08-22 23:13:01,857 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-08-22 23:13:01,867 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-08-22 23:13:01,909 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-08-22 23:13:01,910 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-08-22 23:13:01,910 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-08-26 23:10:35,250 INFO tuned.daemon.controller: terminating controller 2026-08-26 23:10:35,252 INFO tuned.daemon.daemon: stopping tuning 2026-08-26 23:10:35,327 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-08-26 23:10:35,363 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-08-26 23:10:35,364 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-08-26 23:10:35,597 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-08-26 23:10:35,597 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-08-26 23:10:35,605 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-08-26 23:10:35,605 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-08-26 23:10:35,789 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-08-26 23:10:35,790 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-08-26 23:10:35,797 INFO tuned.daemon.controller: starting controller 2026-08-26 23:10:35,797 INFO tuned.daemon.daemon: starting tuning 2026-08-26 23:10:35,811 INFO tuned.plugins.base: instance cpu: assigning devices cpu5, cpu2, cpu7, cpu1, cpu0, cpu3, cpu4, cpu6 2026-08-26 23:10:35,821 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-08-26 23:10:35,826 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-08-26 23:10:35,830 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-08-26 23:10:35,845 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-08-26 23:10:35,890 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-08-26 23:10:35,891 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-08-26 23:10:35,891 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-09-01 23:10:29,175 INFO tuned.daemon.controller: terminating controller 2026-09-01 23:10:29,177 INFO tuned.daemon.daemon: stopping tuning 2026-09-01 23:10:29,205 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-09-01 23:10:29,252 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-09-01 23:10:29,253 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-09-01 23:10:29,529 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-09-01 23:10:29,529 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-09-01 23:10:29,534 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-09-01 23:10:29,536 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-09-01 23:10:29,704 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-09-01 23:10:29,706 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-09-01 23:10:29,715 INFO tuned.daemon.controller: starting controller 2026-09-01 23:10:29,716 INFO tuned.daemon.daemon: starting tuning 2026-09-01 23:10:29,734 INFO tuned.plugins.base: instance cpu: assigning devices cpu1, cpu2, cpu7, cpu0, cpu5, cpu3, cpu4, cpu6 2026-09-01 23:10:29,741 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-09-01 23:10:29,744 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-09-01 23:10:29,748 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-09-01 23:10:29,759 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-09-01 23:10:29,802 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-09-01 23:10:29,802 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-09-01 23:10:29,802 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-09-03 23:10:38,157 INFO tuned.daemon.controller: terminating controller 2026-09-03 23:10:38,160 INFO tuned.daemon.daemon: stopping tuning 2026-09-03 23:10:38,226 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-09-03 23:10:38,277 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-09-03 23:10:38,277 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-09-03 23:10:38,561 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-09-03 23:10:38,561 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-09-03 23:10:38,566 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-09-03 23:10:38,568 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-09-03 23:10:38,744 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-09-03 23:10:38,746 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-09-03 23:10:38,755 INFO tuned.daemon.controller: starting controller 2026-09-03 23:10:38,755 INFO tuned.daemon.daemon: starting tuning 2026-09-03 23:10:38,777 INFO tuned.plugins.base: instance cpu: assigning devices cpu2, cpu5, cpu7, cpu0, cpu4, cpu3, cpu1, cpu6 2026-09-03 23:10:38,785 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-09-03 23:10:38,789 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-09-03 23:10:38,793 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-09-03 23:10:38,803 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-09-03 23:10:38,848 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-09-03 23:10:38,848 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-09-03 23:10:38,849 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-09-04 23:10:36,576 INFO tuned.daemon.controller: terminating controller 2026-09-04 23:10:36,577 INFO tuned.daemon.daemon: stopping tuning 2026-09-04 23:10:36,612 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-09-04 23:10:36,649 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-09-04 23:10:36,650 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-09-04 23:10:36,888 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-09-04 23:10:36,889 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-09-04 23:10:36,902 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-09-04 23:10:36,904 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-09-04 23:10:37,077 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-09-04 23:10:37,079 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-09-04 23:10:37,087 INFO tuned.daemon.controller: starting controller 2026-09-04 23:10:37,087 INFO tuned.daemon.daemon: starting tuning 2026-09-04 23:10:37,100 INFO tuned.plugins.base: instance cpu: assigning devices cpu3, cpu2, cpu4, cpu7, cpu6, cpu5, cpu1, cpu0 2026-09-04 23:10:37,107 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-09-04 23:10:37,111 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-09-04 23:10:37,115 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-09-04 23:10:37,126 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-09-04 23:10:37,169 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-09-04 23:10:37,169 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-09-04 23:10:37,169 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-09-08 15:24:58,758 INFO tuned.daemon.controller: terminating controller 2026-09-08 15:24:58,759 INFO tuned.daemon.daemon: stopping tuning 2026-09-08 15:24:58,785 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-09-08 15:24:58,824 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-09-08 15:24:58,825 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-09-08 15:24:59,146 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-09-08 15:24:59,147 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-09-08 15:24:59,152 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-09-08 15:24:59,154 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-09-08 15:24:59,335 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-09-08 15:24:59,337 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-09-08 15:24:59,345 INFO tuned.daemon.controller: starting controller 2026-09-08 15:24:59,345 INFO tuned.daemon.daemon: starting tuning 2026-09-08 15:24:59,370 INFO tuned.plugins.base: instance cpu: assigning devices cpu1, cpu5, cpu3, cpu7, cpu4, cpu2, cpu6, cpu0 2026-09-08 15:24:59,379 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-09-08 15:24:59,384 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-09-08 15:24:59,389 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-09-08 15:24:59,402 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-09-08 15:24:59,446 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-09-08 15:24:59,446 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-09-08 15:24:59,447 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-09-10 23:11:06,203 INFO tuned.daemon.controller: terminating controller 2026-09-10 23:11:06,204 INFO tuned.daemon.daemon: stopping tuning 2026-09-10 23:11:06,270 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-09-10 23:11:06,312 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-09-10 23:11:06,313 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-09-10 23:11:06,569 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-09-10 23:11:06,569 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-09-10 23:11:06,575 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-09-10 23:11:06,576 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-09-10 23:11:06,745 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-09-10 23:11:06,747 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-09-10 23:11:06,753 INFO tuned.daemon.controller: starting controller 2026-09-10 23:11:06,754 INFO tuned.daemon.daemon: starting tuning 2026-09-10 23:11:06,767 INFO tuned.plugins.base: instance cpu: assigning devices cpu6, cpu7, cpu5, cpu1, cpu3, cpu2, cpu4, cpu0 2026-09-10 23:11:06,776 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-09-10 23:11:06,780 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-09-10 23:11:06,784 INFO tuned.plugins.base: instance disk: assigning devices vda, loop0 2026-09-10 23:11:06,795 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-09-10 23:11:06,833 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-09-10 23:11:06,833 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-09-10 23:11:06,834 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-09-11 23:11:16,739 INFO tuned.daemon.controller: terminating controller 2026-09-11 23:11:16,740 INFO tuned.daemon.daemon: stopping tuning 2026-09-11 23:11:16,781 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-09-11 23:11:16,829 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-09-11 23:11:16,829 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-09-11 23:11:17,093 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-09-11 23:11:17,094 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-09-11 23:11:17,101 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-09-11 23:11:17,102 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-09-11 23:11:17,288 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-09-11 23:11:17,290 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-09-11 23:11:17,298 INFO tuned.daemon.controller: starting controller 2026-09-11 23:11:17,298 INFO tuned.daemon.daemon: starting tuning 2026-09-11 23:11:17,317 INFO tuned.plugins.base: instance cpu: assigning devices cpu7, cpu0, cpu4, cpu5, cpu3, cpu1, cpu6, cpu2 2026-09-11 23:11:17,325 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-09-11 23:11:17,330 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-09-11 23:11:17,334 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-09-11 23:11:17,344 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-09-11 23:11:17,385 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-09-11 23:11:17,386 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-09-11 23:11:17,386 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied 2026-09-15 23:10:52,072 INFO tuned.daemon.controller: terminating controller 2026-09-15 23:10:52,073 INFO tuned.daemon.daemon: stopping tuning 2026-09-15 23:10:52,149 INFO tuned.daemon.daemon: terminating TuneD, rolling back all changes 2026-09-15 23:10:52,187 ERROR tuned.units.manager: BUG: Unhandled exception in stop_tuning: 'flags' 2026-09-15 23:10:52,188 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 89, in unapply_tuning self._plugin.instance_unapply_tuning(self, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 315, in instance_unapply_tuning self._instance_unapply_static(instance, rollback) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 1019, in _instance_unapply_static self._restore_ps_affinity() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 975, in _restore_ps_affinity ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-09-15 23:10:52,481 INFO tuned.daemon.application: TuneD: 2.22.1, kernel: 4.18.0-553.124.1.el8_10.x86_64 2026-09-15 23:10:52,481 INFO tuned.daemon.application: dynamic tuning is globally disabled 2026-09-15 23:10:52,488 INFO tuned.daemon.daemon: using sleep interval of 1 second(s) 2026-09-15 23:10:52,490 INFO tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration. 2026-09-15 23:10:52,696 INFO tuned.daemon.daemon: Using 'virtual-guest' profile 2026-09-15 23:10:52,698 INFO tuned.profiles.loader: loading profile: virtual-guest 2026-09-15 23:10:52,706 INFO tuned.daemon.controller: starting controller 2026-09-15 23:10:52,706 INFO tuned.daemon.daemon: starting tuning 2026-09-15 23:10:52,733 INFO tuned.plugins.base: instance cpu: assigning devices cpu0, cpu4, cpu3, cpu7, cpu5, cpu1, cpu6, cpu2 2026-09-15 23:10:52,743 INFO tuned.plugins.plugin_cpu: We are running on an x86 GenuineIntel platform 2026-09-15 23:10:52,753 WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias 2026-09-15 23:10:52,759 INFO tuned.plugins.base: instance disk: assigning devices loop0, vda 2026-09-15 23:10:52,776 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl 2026-09-15 23:10:52,832 ERROR tuned.units.manager: BUG: Unhandled exception in start_tuning: 'flags' 2026-09-15 23:10:52,832 ERROR tuned.units.manager: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/tuned/units/manager.py", line 119, in _try_call return f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/tuned/plugins/instance/instance.py", line 80, in apply_tuning self._plugin.instance_apply_tuning(self) File "/usr/lib/python3.6/site-packages/tuned/plugins/base.py", line 261, in instance_apply_tuning self._instance_apply_static(instance) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 933, in _instance_apply_static ps = self.get_processes() File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 589, in get_processes cmd = self._get_cmdline(proc) File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 578, in _get_cmdline if self._is_kthread(process): File "/usr/lib/python3.6/site-packages/tuned/plugins/plugin_scheduler.py", line 645, in _is_kthread return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 136, in __getitem__ return self.fields[fieldname] KeyError: 'flags' 2026-09-15 23:10:52,832 INFO tuned.daemon.daemon: static tuning from profile 'virtual-guest' applied PK1]rTIPS.txtnu[=== Simple user tips for improving power usage === * Use a properly dimensioned system for the job (no need for overpowered systems for simple Desktop use e.g.). * For servers consolidate services on fewer systems to maximize efficiency of each system. * For a server farm consolidating all physical machines on one bigger server and then using Virtualization. * Enforce turning off machines that are not used (e.g. company policy). * Try to establish a company culture that is Green "aware", including but not limited to the above point. * Unplug and/or turn off peripherals that aren't used (e.g. external USB devices, monitors, printers, scanners). * Turn off unused hardware already in BIOS. * Disable power hungry features. * Enable CPU scaling if supported for ondemand CPU governor. DO NOT use powersave governor, typically uses more power than ondemand (race to idle). * Put network card to 100 mbit/10 mbit: ** 10 mbit: ethtool -s eth0 advertise 0x002 ** 100 mbit: ethtool -s eth0 advertise 0x008 ** Doesn't work for every card * Put harddisk to spindown fast and full power saving: ** hdparm -S240 /dev/sda (20m idle to spindown) ** hdparm -B1 /dev/sda (Max powersave mode) * Make sure writes to hd don't wake it up too quickly: ** Set flushing to once per 5 minutes ** echo "3000" > /proc/sys/vm/dirty_writeback_centisecs ** Enable laptop mode ** echo "5" > /proc/sys/vm/laptop_mode * Use relatime for your / partition ** mount -o remount,relatime / * Enable USB autosuspend by adding the following to the kernel boot commandline: ** usbcore.autosuspend=5 * Screensaver needs to dpms off the screen, not just make colors black. To turn off monitor after 120s when X is running: ** xset dpms 0 0 120 === Simple programmer tips for improving power usage === * Avoid unnecessary work/computation * Use efficient algorithms * Wake up only when necessary/real work is pending * Do not actively poll in programs or use short regular timeouts, rather react to events * If you wake up, do everything at once (race to idle) and as fast as possible * Use large buffers to avoid frequent disk access. Write one large block at a time * Don't use [f]sync() if not necessary * Group timers across applications if possible (even systems) PK1]|AUTHORSnu[Maintainers: - Jaroslav Škarvada Based on old tuned/ktune code by: - Philip Knirsch - Thomas Woerner Significant contributors: - Jan Včelák - Jan Kaluža Other contributors: - Petr Lautrbach - Marcela Mašláňová - Jarod Wilson - Jan Hutař - Arnaldo Carvalho de Melo - perf code for plugin_scheduler Icon: - Mariia Leonova PK1]FNFFCOPYINGnu[ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. PK1]A'' README.mdnu[# TuneD: Daemon for monitoring and adaptive tuning of system devices. (This is TuneD 2.0 with a new code base. If you are looking for the older version, please check out branch '1.0' in our Git repository.) How to use it ------------- TuneD is incompatible with ``cpupower`` and ``power-profiles-daemon``. If you have these services, uninstall or disable them. On Fedora, Red Hat Enterprise Linux, and their derivatives: install the ``tuned`` package (optionally ``tuned-utils``, ``tuned-utils-systemtap``, and ``tuned-profiles-compat``): ```bash # dnf install tuned ``` After installation, start the ``tuned`` service: ```bash # systemctl start tuned ``` You likely should run ``tuned`` whenever your machine boots: ```bash # systemctl enable tuned ``` When the daemon is running you can easily control it using the ``tuned-adm`` utility. This tool communicates with the daemon over DBus. Any user can list the available profiles and see which one is active. The active profile can be switched only by root user or by any user with physical console allocated on the machine (X11, physical tty, but no SSH). To see the current active profile, run: ```bash # tuned-adm active ``` To list all available profiles, run: ```bash # tuned-adm list ``` To switch to a different profile, run: ```bash # tuned-adm profile ``` The enabled profile is persisted into ``/etc/tuned/active_profile``, which is read when the daemon starts or is restarted. To disable all tunings, run: ```bash # tuned-adm off ``` To show information/description of given profile or current profile if no profile is specified, run: ```bash # tuned-adm profile_info ``` To verify current profile against system settings, run: ```bash # tuned-adm verify ``` To enable automatic profile selection, run: ```bash # tuned-adm auto_profile ``` To show the current profile selection mode, run: ```bash # tuned-adm profile_mode ``` To recommend a profile for a given system, run: ```bash # tuned-adm recommend ``` Currently only static detection is implemented - it decides according to data in ``/etc/system-release-cpe`` and the output of ``virt-what``. The rules for autodetection are defined in the file ``/usr/lib/tuned/recommend.d/50-tuned.conf``. They can be overridden by the user by creating a file in ``/etc/tuned/recommend.d`` or a file named ``recommend.conf`` in ``/etc/tuned``. See the ``tuned-adm(8)`` man page for details). The default rules recommend profiles targeted to the best performance or the balanced profile if unsure. Available tunings ----------------- We are currently working on many new tuning features. Some are described in the manual pages, some are yet undocumented. Authors ------- The best way to contact the authors of the project is to use our mailing list: If you want to contact an individual author, you will find their e-mail address in every commit message in our Git repository: You can also join the ``#fedora-power`` IRC channel on Freenode. Web page: Contributing ------------ See the file ``CONTRIBUTING.md`` for guidelines for contributing. License ------- Copyright (C) 2008-2021 Red Hat, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Full text of the license is enclosed in COPYING file. The Developer Certificate of Origin, distributed in the file 'DCO' is licensed differently, see the file for the text of the license. The icon: The TuneD icon was created by Mariia Leonova and it is licensed under Creative Commons Attribution-ShareAlike 3.0 license (http://creativecommons.org/licenses/by-sa/3.0/legalcode). PK$2] version.pynu[TUNED_VERSION_MAJOR = 2 TUNED_VERSION_MINOR = 22 TUNED_VERSION_PATCH = 1 TUNED_VERSION_STR = "%d.%d.%d" % (TUNED_VERSION_MAJOR, TUNED_VERSION_MINOR, TUNED_VERSION_PATCH) PK$2]DYOOexports/dbus_exporter.pynu[from . import interfaces import dbus.service import dbus.mainloop.glib import dbus.exceptions import threading import signal import tuned.logs import tuned.consts as consts import traceback import logging from inspect import ismethod from tuned.utils.polkit import polkit from gi.repository import GLib from types import FunctionType from dbus.exceptions import DBusException from dbus.lowlevel import ErrorMessage try: # Python3 version # getfullargspec is not present in Python2, so when we drop P2 support # replace "getargspec(func)" in code with "getfullargspec(func).args" from inspect import getfullargspec def getargspec(func): return getfullargspec(func) except ImportError: # Python2 version, drop after support stops from inspect import getargspec log = tuned.logs.get() # This is mostly copy of the code from the dbus.service module without the # code that sends tracebacks through the D-Bus (i.e. no library tracebacks # are exposed on the D-Bus now). def _method_reply_error(connection, message, exception): name = getattr(exception, '_dbus_error_name', None) if name is not None: pass elif getattr(exception, '__module__', '') in ('', '__main__'): name = 'org.freedesktop.DBus.Python.%s' % exception.__class__.__name__ else: name = 'org.freedesktop.DBus.Python.%s.%s' % (exception.__module__, exception.__class__.__name__) if isinstance(exception, DBusException): contents = exception.get_dbus_message() else: contents = ''.join(traceback.format_exception_only(exception.__class__, exception)) reply = ErrorMessage(message, name, contents) if not message.get_no_reply(): connection.send_message(reply) class DBusExporter(interfaces.ExporterInterface): """ Export method calls through DBus Interface. We take a method to be exported and create a simple wrapper function to call it. This is required as we need the original function to be bound to the original object instance. While the wrapper will be bound to an object we dynamically construct. """ def __init__(self, bus_name, interface_name, object_name, namespace): # Monkey patching of the D-Bus library _method_reply_error() to reply # tracebacks via D-Bus only if in the debug mode. It doesn't seem there is a # more simple way how to cover all possible exceptions that could occur in # the D-Bus library. Just setting the exception.include_traceback to False doesn't # seem to help because there is only a subset of exceptions that support this flag. if log.getEffectiveLevel() != logging.DEBUG: dbus.service._method_reply_error = _method_reply_error dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) self._dbus_object_cls = None self._dbus_object = None self._dbus_methods = {} self._signals = set() self._bus_name = bus_name self._interface_name = interface_name self._object_name = object_name self._namespace = namespace self._thread = None self._bus_object = None self._polkit = polkit() # dirty hack that fixes KeyboardInterrupt handling # the hack is needed because PyGObject / GTK+-3 developers are morons signal_handler = signal.getsignal(signal.SIGINT) self._main_loop = GLib.MainLoop() signal.signal(signal.SIGINT, signal_handler) @property def bus_name(self): return self._bus_name @property def interface_name(self): return self._interface_name @property def object_name(self): return self._object_name def running(self): return self._thread is not None def _prepare_for_dbus(self, method, wrapper): source = """def {name}({args}): return wrapper({args}) """.format(name=method.__name__, args=', '.join(getargspec(method.__func__).args)) code = compile(source, '' % len(self._dbus_methods), 'exec') # https://docs.python.org/3.9/library/inspect.html # co_consts - tuple of constants used in the bytecode # example: # compile("e=2\ndef f(x):\n return x*2\n", "X", 'exec').co_consts # (2, , None) # Because we have only one object in code (our function), we can use code.co_consts[0] func = FunctionType(code.co_consts[0], locals(), method.__name__) return func def export(self, method, in_signature, out_signature): if not ismethod(method): raise Exception("Only bound methods can be exported.") method_name = method.__name__ if method_name in self._dbus_methods: raise Exception("Method with this name is already exported.") def wrapper(owner, *args, **kwargs): action_id = self._namespace + "." + method.__name__ caller = args[-1] log.debug("checking authorization for action '%s' requested by caller '%s'" % (action_id, caller)) ret = self._polkit.check_authorization(caller, action_id) args_copy = args if ret == 1: log.debug("action '%s' requested by caller '%s' was successfully authorized by polkit" % (action_id, caller)) elif ret == 2: log.warn("polkit error, but action '%s' requested by caller '%s' was successfully authorized by fallback method" % (action_id, caller)) elif ret == 0: log.info("action '%s' requested by caller '%s' wasn't authorized, ignoring the request" % (action_id, caller)) args_copy = list(args[:-1]) + [""] elif ret == -1: log.warn("polkit error and action '%s' requested by caller '%s' wasn't authorized by fallback method, ignoring the request" % (action_id, caller)) args_copy = list(args[:-1]) + [""] else: log.error("polkit error and unable to use fallback method to authorize action '%s' requested by caller '%s', ignoring the request" % (action_id, caller)) args_copy = list(args[:-1]) + [""] return method(*args_copy, **kwargs) wrapper = self._prepare_for_dbus(method, wrapper) wrapper = dbus.service.method(self._interface_name, in_signature, out_signature, sender_keyword = "caller")(wrapper) self._dbus_methods[method_name] = wrapper def signal(self, method, out_signature): if not ismethod(method): raise Exception("Only bound methods can be exported.") method_name = method.__name__ if method_name in self._dbus_methods: raise Exception("Method with this name is already exported.") def wrapper(owner, *args, **kwargs): return method(*args, **kwargs) wrapper = self._prepare_for_dbus(method, wrapper) wrapper = dbus.service.signal(self._interface_name, out_signature)(wrapper) self._dbus_methods[method_name] = wrapper self._signals.add(method_name) def send_signal(self, signal, *args, **kwargs): err = False if not signal in self._signals or self._bus_object is None: err = True try: method = getattr(self._bus_object, signal) except AttributeError: err = True if err: raise Exception("Signal '%s' doesn't exist." % signal) else: method(*args, **kwargs) def _construct_dbus_object_class(self): if self._dbus_object_cls is not None: raise Exception("The exporter class was already build.") unique_name = "DBusExporter_%d" % id(self) cls = type(unique_name, (dbus.service.Object,), self._dbus_methods) self._dbus_object_cls = cls def start(self): if self.running(): return if self._dbus_object_cls is None: self._construct_dbus_object_class() self.stop() bus = dbus.SystemBus() bus_name = dbus.service.BusName(self._bus_name, bus) self._bus_object = self._dbus_object_cls(bus, self._object_name, bus_name) self._thread = threading.Thread(target=self._thread_code) self._thread.start() def stop(self): if self._thread is not None and self._thread.is_alive(): self._main_loop.quit() self._thread.join() self._thread = None def _thread_code(self): self._main_loop.run() del self._bus_object self._bus_object = None PK$2]N2 exports/controller.pynu[from . import interfaces import inspect import tuned.patterns class ExportsController(tuned.patterns.Singleton): """ Controls and manages object interface exporting. """ def __init__(self): super(ExportsController, self).__init__() self._exporters = [] self._objects = [] self._exports_initialized = False def register_exporter(self, instance): """Register objects exporter.""" self._exporters.append(instance) def register_object(self, instance): """Register object to be exported.""" self._objects.append(instance) def _is_exportable_method(self, method): """Check if method was marked with @exports.export wrapper.""" return inspect.ismethod(method) and hasattr(method, "export_params") def _is_exportable_signal(self, method): """Check if method was marked with @exports.signal wrapper.""" return inspect.ismethod(method) and hasattr(method, "signal_params") def _is_exportable_getter(self, method): """Check if method was marked with @exports.get_property wrapper.""" return inspect.ismethod(method) and hasattr(method, "property_get_params") def _is_exportable_setter(self, method): """Check if method was marked with @exports.set_property wrapper.""" return inspect.ismethod(method) and hasattr(method, "property_set_params") def _export_method(self, method): """Register method to all exporters.""" for exporter in self._exporters: args = method.export_params[0] kwargs = method.export_params[1] exporter.export(method, *args, **kwargs) def _export_signal(self, method): """Register signal to all exporters.""" for exporter in self._exporters: args = method.signal_params[0] kwargs = method.signal_params[1] exporter.signal(method, *args, **kwargs) def _export_getter(self, method): """Register property getter to all exporters.""" for exporter in self._exporters: args = method.property_get_params[0] kwargs = method.property_get_params[1] exporter.property_getter(method, *args, **kwargs) def _export_setter(self, method): """Register property setter to all exporters.""" for exporter in self._exporters: args = method.property_set_params[0] kwargs = method.property_set_params[1] exporter.property_setter(method, *args, **kwargs) def send_signal(self, signal, *args, **kwargs): """Register signal to all exporters.""" for exporter in self._exporters: exporter.send_signal(signal, *args, **kwargs) def property_changed(self, *args, **kwargs): for exporter in self._exporters: exporter.property_changed(*args, **kwargs) def period_check(self): """Allows to perform checks on exporters without special thread.""" for exporter in self._exporters: exporter.period_check() def _initialize_exports(self): if self._exports_initialized: return for instance in self._objects: for name, method in inspect.getmembers(instance, self._is_exportable_method): self._export_method(method) for name, method in inspect.getmembers(instance, self._is_exportable_signal): self._export_signal(method) for name, method in inspect.getmembers(instance, self._is_exportable_getter): self._export_getter(method) for name, method in inspect.getmembers(instance, self._is_exportable_setter): self._export_setter(method) self._exports_initialized = True def start(self): """Start the exports.""" self._initialize_exports() for exporter in self._exporters: exporter.start() def stop(self): """Stop the exports.""" for exporter in self._exporters: exporter.stop() PK$2] S{{6exports/__pycache__/dbus_exporter.cpython-36.opt-1.pycnu[3 execr) formatrrr__func__r9compilelenr$r co_constslocals)r2methodwrappersourcecoder r r r _prepare_for_dbusoszDBusExporter._prepare_for_dbuscsjtstdj}|jkr(tdfdd}j|}tjjj||dd|}|j|<dS)Nz#Only bound methods can be exported.z*Method with this name is already exported.cs jdj}|d }tjd||fjj||}|}|dkrXtjd||fn|dkrttjd||fn|dkrtjd||ft|dd d g}nZ|dkrtjd ||ft|ddd g}n(tj d ||ft|ddd g}||S)N.rz?checking authorization for action '%s' requested by caller '%s'zJaction '%s' requested by caller '%s' was successfully authorized by polkitzepolkit error, but action '%s' requested by caller '%s' was successfully authorized by fallback methodrzLaction '%s' requested by caller '%s' wasn't authorized, ignoring the requestrzppolkit error and action '%s' requested by caller '%s' wasn't authorized by fallback method, ignoring the requestzvpolkit error and unable to use fallback method to authorize action '%s' requested by caller '%s', ignoring the requestrHrHrHrH) r*rrdebugr-Zcheck_authorizationwarninfolisterror)ownerr9kwargsZ action_idcallerretZ args_copy)rAr2r r rBs$z$DBusExporter.export..wrapperrP)Zsender_keyword) r Exceptionrr$rEr!r"rAr()r2rAZ in_signature out_signature method_namerBr )rAr2r export}s  zDBusExporter.exportcsntstdj}||jkr(tdfdd}|j|}tjj|j||}||j|<|j j |dS)Nz#Only bound methods can be exported.z*Method with this name is already exported.cs ||S)Nr )rNr9rO)rAr r rBsz$DBusExporter.signal..wrapper) rrRrr$rEr!r"r.r(r&add)r2rArSrTrBr )rAr r.s    zDBusExporter.signalc Osfd}||jks|jdkrd}yt|j|}Wntk rDd}YnX|rXtd|n |||dS)NFTzSignal '%s' doesn't exist.)r&r,rAttributeErrorrR)r2r.r9rOerrrAr r r send_signals zDBusExporter.send_signalcCs<|jdk rtddt|}t|tjjf|j}||_dS)Nz%The exporter class was already build.zDBusExporter_%d)r#rRidtyper!r"ZObjectr$)r2Z unique_nameclsr r r _construct_dbus_object_classs   z)DBusExporter._construct_dbus_object_classcCsn|jr dS|jdkr|j|jtj}tjj|j|}|j||j ||_ t j |j d|_|jjdS)N)target)r8r#r]stopr!Z SystemBusr"ZBusNamer'r)r, threadingZThread _thread_coder+start)r2Zbusr3r r r rbs zDBusExporter.startcCs2|jdk r.|jjr.|jj|jjd|_dS)N)r+Zis_aliver1quitr)r2r r r r_s  zDBusExporter.stopcCs|jj|`d|_dS)N)r1Zrunr,)r2r r r ras zDBusExporter._thread_codeN)rr __qualname____doc__r7propertyr3r4r5r8rErUr.rYr]rbr_rar r r r r8s   "   r)"rrZ dbus.servicer!Zdbus.mainloop.glibZdbus.exceptionsr`r.Z tuned.logsZtunedZ tuned.constsZconstsrrinspectrZtuned.utils.polkitrZ gi.repositoryrtypesrrZ dbus.lowlevelr r r ImportErrorZlogsgetrrZExporterInterfacerr r r r s.           PK$2]y= 1exports/__pycache__/__init__.cpython-36.opt-1.pycnu[3 .wrapperr )rr r r )rr r exportsr csfdd}|S)z*Decorator, use to mark exportable signals.csg|_|S)N)Z signal_params)r)rr r r r s zsignal..wrapperr )rr r r )rr r signalsrcsfdd}|S)z8Decorator, use to mark setters of exportable properties.csg|_|S)N)Zproperty_set_params)r)rr r r r s z property_setter..wrapperr )rr r r )rr r property_settersrcsfdd}|S)z8Decorator, use to mark getters of exportable properties.csg|_|S)N)Zproperty_get_params)r)rr r r r s z property_getter..wrapperr )rr r r )rr r property_gettersrcOstjj}|j||S)N)rExportsController get_instanceproperty_changed)rr ctlr r r r#s rcCs&t|tjsttjj}|j|S)N) isinstancerZExporterInterface Exceptionrrrregister_exporter)instancerr r r r's  rcCs&t|tjsttjj}|j|S)N)rrZExportableInterfacerrrrregister_object)rrr r r r-s  rcOstjj}|j||S)N)rrr send_signal)rr rr r r r3s rcCstjj}|jS)N)rrrstart)rr r r r7s rcCstjj}|jS)N)rrrstop)rr r r r;s rcCstjj}|jS)N)rrr period_check)rr r r r?s rN)rrrZdbusrZdbus_with_propertiesrZ unix_socketr rrrrrrrrrrr r r r s     PK$2] S{{0exports/__pycache__/dbus_exporter.cpython-36.pycnu[3 execr) formatrrr__func__r9compilelenr$r co_constslocals)r2methodwrappersourcecoder r r r _prepare_for_dbusoszDBusExporter._prepare_for_dbuscsjtstdj}|jkr(tdfdd}j|}tjjj||dd|}|j|<dS)Nz#Only bound methods can be exported.z*Method with this name is already exported.cs jdj}|d }tjd||fjj||}|}|dkrXtjd||fn|dkrttjd||fn|dkrtjd||ft|dd d g}nZ|dkrtjd ||ft|ddd g}n(tj d ||ft|ddd g}||S)N.rz?checking authorization for action '%s' requested by caller '%s'zJaction '%s' requested by caller '%s' was successfully authorized by polkitzepolkit error, but action '%s' requested by caller '%s' was successfully authorized by fallback methodrzLaction '%s' requested by caller '%s' wasn't authorized, ignoring the requestrzppolkit error and action '%s' requested by caller '%s' wasn't authorized by fallback method, ignoring the requestzvpolkit error and unable to use fallback method to authorize action '%s' requested by caller '%s', ignoring the requestrHrHrHrH) r*rrdebugr-Zcheck_authorizationwarninfolisterror)ownerr9kwargsZ action_idcallerretZ args_copy)rAr2r r rBs$z$DBusExporter.export..wrapperrP)Zsender_keyword) r Exceptionrr$rEr!r"rAr()r2rAZ in_signature out_signature method_namerBr )rAr2r export}s  zDBusExporter.exportcsntstdj}||jkr(tdfdd}|j|}tjj|j||}||j|<|j j |dS)Nz#Only bound methods can be exported.z*Method with this name is already exported.cs ||S)Nr )rNr9rO)rAr r rBsz$DBusExporter.signal..wrapper) rrRrr$rEr!r"r.r(r&add)r2rArSrTrBr )rAr r.s    zDBusExporter.signalc Osfd}||jks|jdkrd}yt|j|}Wntk rDd}YnX|rXtd|n |||dS)NFTzSignal '%s' doesn't exist.)r&r,rAttributeErrorrR)r2r.r9rOerrrAr r r send_signals zDBusExporter.send_signalcCs<|jdk rtddt|}t|tjjf|j}||_dS)Nz%The exporter class was already build.zDBusExporter_%d)r#rRidtyper!r"ZObjectr$)r2Z unique_nameclsr r r _construct_dbus_object_classs   z)DBusExporter._construct_dbus_object_classcCsn|jr dS|jdkr|j|jtj}tjj|j|}|j||j ||_ t j |j d|_|jjdS)N)target)r8r#r]stopr!Z SystemBusr"ZBusNamer'r)r, threadingZThread _thread_coder+start)r2Zbusr3r r r rbs zDBusExporter.startcCs2|jdk r.|jjr.|jj|jjd|_dS)N)r+Zis_aliver1quitr)r2r r r r_s  zDBusExporter.stopcCs|jj|`d|_dS)N)r1Zrunr,)r2r r r ras zDBusExporter._thread_codeN)rr __qualname____doc__r7propertyr3r4r5r8rErUr.rYr]rbr_rar r r r r8s   "   r)"rrZ dbus.servicer!Zdbus.mainloop.glibZdbus.exceptionsr`r.Z tuned.logsZtunedZ tuned.constsZconstsrrinspectrZtuned.utils.polkitrZ gi.repositoryrtypesrrZ dbus.lowlevelr r r ImportErrorZlogsgetrrZExporterInterfacerr r r r s.           PK$2] @exports/__pycache__/dbus_exporter_with_properties.cpython-36.pycnu[3 .GetcsB|jkrtd||jkr,td|j|}||dS)NzUnknown interface: %szNo such property: %s)r r_property_setters)r r r valuesetter)rrrSets      z0DBusExporterWithProperties.__init__..Setcs*|jkrtd|ddjjDS)NzUnknown interface: %scSsi|]\}}||qSrr).0namerrrr !szGDBusExporterWithProperties.__init__..GetAll..)r rr items)r r )rrrGetAlls  z3DBusExporterWithProperties.__init__..GetAllcs|jkrtd|dS)NzUnknown interface: %s)r r)r r Zchanged_propertiesZinvalidated_properties)rrrPropertiesChanged#s z>DBusExporterWithProperties.__init__..PropertiesChangedZssv) in_signatureZ out_signaturerZssv)rrsza{sv}rzsa{sv}as)Z signaturer) superr__init__rr rrZ _dbus_methodsrZ_signalsadd) rZbus_namer Z object_name namespacerrrr) __class__)rrr! s    z#DBusExporterWithProperties.__init__cCs|jd|j||iidS)Nr)Z send_signalr )rr rrrrproperty_changed-sz+DBusExporterWithProperties.property_changedcCs0t|std||jkr"td||j|<dS)Nz#Only bound methods can be exported.z1A getter for this property is already registered.)r Exceptionr )rrr rrrproperty_getter0s  z*DBusExporterWithProperties.property_gettercCs0t|std||jkr"td||j|<dS)Nz#Only bound methods can be exported.z1A setter for this property is already registered.)rr&r)rrr rrrproperty_setter7s  z*DBusExporterWithProperties.property_setter)__name__ __module__ __qualname__r!r%r'r( __classcell__rr)r$rrs $rN) inspectrZ dbus.servicerrZdbusrZdbus.exceptionsrZtuned.exports.dbus_exporterrrrrrrs    PK$2] Fexports/__pycache__/dbus_exporter_with_properties.cpython-36.opt-1.pycnu[3 .GetcsB|jkrtd||jkr,td|j|}||dS)NzUnknown interface: %szNo such property: %s)r r_property_setters)r r r valuesetter)rrrSets      z0DBusExporterWithProperties.__init__..Setcs*|jkrtd|ddjjDS)NzUnknown interface: %scSsi|]\}}||qSrr).0namerrrr !szGDBusExporterWithProperties.__init__..GetAll..)r rr items)r r )rrrGetAlls  z3DBusExporterWithProperties.__init__..GetAllcs|jkrtd|dS)NzUnknown interface: %s)r r)r r Zchanged_propertiesZinvalidated_properties)rrrPropertiesChanged#s z>DBusExporterWithProperties.__init__..PropertiesChangedZssv) in_signatureZ out_signaturerZssv)rrsza{sv}rzsa{sv}as)Z signaturer) superr__init__rr rrZ _dbus_methodsrZ_signalsadd) rZbus_namer Z object_name namespacerrrr) __class__)rrr! s    z#DBusExporterWithProperties.__init__cCs|jd|j||iidS)Nr)Z send_signalr )rr rrrrproperty_changed-sz+DBusExporterWithProperties.property_changedcCs0t|std||jkr"td||j|<dS)Nz#Only bound methods can be exported.z1A getter for this property is already registered.)r Exceptionr )rrr rrrproperty_getter0s  z*DBusExporterWithProperties.property_gettercCs0t|std||jkr"td||j|<dS)Nz#Only bound methods can be exported.z1A setter for this property is already registered.)rr&r)rrr rrrproperty_setter7s  z*DBusExporterWithProperties.property_setter)__name__ __module__ __qualname__r!r%r'r( __classcell__rr)r$rrs $rN) inspectrZ dbus.servicerrZdbusrZdbus.exceptionsrZtuned.exports.dbus_exporterrrrrrrs    PK$2])\"\"=exports/__pycache__/unix_socket_exporter.cpython-36.opt-1.pycnu[3 .wrappercSs||_||_dS)N)Z _in_signature_out_signature)r in_signature out_signaturerrr r!Gsz3UnixSocketExporter.export..wrapper.__init__cs ||S)Nr)rargskwargs)methodrr __call__Ksz3UnixSocketExporter.export..wrapper.__call__N)__name__ __module__ __qualname__r!r)r)r(rr wrapperFsr-)r Exceptionr*robject)rr(r$r% method_namer-r)r(r export>s  zUnixSocketExporter.exportcs^tstdj}||jkr,td|Gfdddt}|||j|<|jj|dS)Nz#Only bound methods can be exported.z/Method with this name (%s) is already exported.cs eZdZddZfddZdS)z*UnixSocketExporter.signal..wrappercSs ||_dS)N)r#)rr%rrr r!Ysz3UnixSocketExporter.signal..wrapper.__init__cs ||S)Nr)rr&r')r(rr r)\sz3UnixSocketExporter.signal..wrapper.__call__N)r*r+r,r!r)r)r(rr r-Xsr-)rr.r*rr/radd)rr(r%r0r-r)r(r signalPs  zUnixSocketExporter.signalcOs||jkrtd|x|jD]}tjd|yDtjtjtj}|jd|j ||j |d||d|j Wqt k r}ztj d|||fWYdd}~XqXqWdS)NzSignal '%s' doesn't exist.zSending signal on socket %sFz2.0)jsonrpcr(paramsz2Error while sending signal '%s' to socket '%s': %s)rr.r rdebugsocketAF_UNIX SOCK_STREAMZ setblockingZconnect _send_datacloseOSErrorwarning)rr3r&r'pserrr send_signalbs      zUnixSocketExporter.send_signalcCs|jj|dS)N)r append)rpathrrr register_signal_pathpsz'UnixSocketExporter.register_signal_pathcCs|jrtjj|jr tj|jtjtjtj|_|jj |j|jj |j tj |j|j d|j d|jrtj|j|jdS)Nrr)rosrCexistsunlinkr7r8r9r ZbindZlistenrchownr rchmod)rrrr _construct_socket_objectss z+UnixSocketExporter._construct_socket_objectcCs |jr dS|j|jdS)N)r"stoprJ)rrrr start~szUnixSocketExporter.startcCs|jr|jjdS)N)r r;)rrrr rKszUnixSocketExporter.stopcCsbtjd|y|jtj|jdWn4tk r\}ztjd||fWYdd}~XnXdS)NzSending socket data: %s)zutf-8zFailed to send data '%s': %s)rr6sendjsondumpsencoder.r=)rr?datar@rrr r:s zUnixSocketExporter._send_dataFcCs$d|d}|r||d<n||d<|S)Nz2.0)r4idrresultr)rrQrRrresrrr _create_responses  z#UnixSocketExporter._create_responseNcCs|j|||dd|dS)N)codemessagerQT)rrR)rU)rrVrWrRrQrrr _create_error_responces z)UnixSocketExporter._create_error_responcecCs |j||S)N)rU)rrSrRrrr _create_result_responsesz*UnixSocketExporter._create_result_responsecCs|jdr|SdS)NrR)get)rrQrrr _check_ids zUnixSocketExporter._check_idcCsnt|tks&|jddks&|jd r2|jddS|jd}d}|d|jkrb|j|jdd|Sy|jd s|j|d}njt|d ttfkr|j|d|d }n>t|d tkr|j|df|d }n|j|jdd|SWnntk r$}z|j|jdd |t |Sd}~Xn8t k rZ}z|j|jd d |t |Sd}~XnX|j|j ||S)Nr4z2.0r(iXzInvalid RequestrRiYzMethod not foundr5iZzInvalid paramsrErroriiii) typedictrZrXrr[listtuple TypeErrorstrr.rY)rreqrRretr@rrr _process_requests&&   $&z#UnixSocketExporter._process_requestc #Cs|js dSxtj|jgffd\}}}|r|jj\}}y*d}x |jdj}|sZP||7}qFWWn2tk r}ztjd|wWYdd}~XnX|ryt j |}WnRtk r}z4tjd||f|j ||j d dt |wWYdd}~XnXt|tttfkr>tjd |j ||j d dt |qt|ttfkrt|dkrz|j ||j dd t |qg}x(|D] }|j|}|r|j|qW|r|j ||n|j|}|r|j ||qdSqWdS)a Periodically checks socket object for new calls. This allows to function without special thread. Interface is according JSON-RPC 2.0 Specification (see https://www.jsonrpc.org/specification) Example calls: printf '[{"jsonrpc": "2.0", "method": "active_profile", "id": 1}, {"jsonrpc": "2.0", "method": "profiles", "id": 2}]' | nc -U /run/tuned/tuned.sock printf '{"jsonrpc": "2.0", "method": "switch_profile", "params": {"profile_name": "balanced"}, "id": 1}' | nc -U /run/tuned/tuned.sock Nriz"Failed to load data of message: %sz!Failed to load json data '%s': %siz Parse errorzWrong format of calliXzInvalid RequestiDiDi)r"selectr ZacceptZrecvdecoder.rrrNloadsr:rXrbr]r`r_r^lenrerB) rr_ZconnrQZrec_datar@rTrcrrr period_checksT     zUnixSocketExporter.period_check)F)NN)r*r+r,__doc__constsZCFG_DEF_UNIX_SOCKET_PATHZ CFG_DEF_UNIX_SOCKET_SIGNAL_PATHSZCFG_DEF_UNIX_SOCKET_OWNERSHIPZCFG_DEF_UNIX_SOCKET_PERMISIONSZ'CFG_DEF_UNIX_SOCKET_CONNECTIONS_BACKLOGr!r"r1r3rArDrJrLrKr:rUrXrYr[rermrrrr rs*  r)rEr rrrfrZ tuned.logsZtunedZ tuned.constsroinspectrr7rNrgZlogsrZrZExporterInterfacerrrrr s    PK$2]Cj3exports/__pycache__/interfaces.cpython-36.opt-1.pycnu[3 sPK$2]Cj-exports/__pycache__/interfaces.cpython-36.pycnu[3 sPK$2]l?ݔ-exports/__pycache__/controller.cpython-36.pycnu[3 Check if method was marked with @exports.get_property wrapper.property_get_params)rrr)r rr r r _is_exportable_getter sz'ExportsController._is_exportable_gettercCstj|ot|dS)z>Check if method was marked with @exports.set_property wrapper.property_set_params)rrr)r rr r r _is_exportable_setter$sz'ExportsController._is_exportable_settercCs:x4|jD]*}|jd}|jd}|j|f||qWdS)z!Register method to all exporters.rrN)rrZexport)r rexporterargskwargsr r r _export_method(s   z ExportsController._export_methodcCs:x4|jD]*}|jd}|jd}|j|f||qWdS)z!Register signal to all exporters.rrN)rrsignal)r rrrr r r r _export_signal/s   z ExportsController._export_signalcCs:x4|jD]*}|jd}|jd}|j|f||qWdS)z*Register property getter to all exporters.rrN)rrZproperty_getter)r rrrr r r r _export_getter6s   z ExportsController._export_gettercCs:x4|jD]*}|jd}|jd}|j|f||qWdS)z*Register property setter to all exporters.rrN)rrZproperty_setter)r rrrr r r r _export_setter=s   z ExportsController._export_settercOs&x |jD]}|j|f||qWdS)z!Register signal to all exporters.N)r send_signal)r r"rr rr r r r&Ds zExportsController.send_signalcOs x|jD]}|j||qWdS)N)rproperty_changed)r rr rr r r r'Is z"ExportsController.property_changedcCsx|jD] }|jqWdS)z=Allows to perform checks on exporters without special thread.N)r period_check)r rr r r r(Ms zExportsController.period_checkcCs|jr dSx|jD]}x$tj||jD]\}}|j|q&Wx$tj||jD]\}}|j|qLWx$tj||jD]\}}|j |qrWx$tj||j D]\}}|j |qWqWd|_dS)NT) r rrZ getmembersrr!rr#rr$rr%)r rnamerr r r _initialize_exportsRs z%ExportsController._initialize_exportscCs$|jx|jD] }|jqWdS)zStart the exports.N)r*rstart)r rr r r r+bs zExportsController.startcCsx|jD] }|jqWdS)zStop the exports.N)rstop)r rr r r r,hs zExportsController.stop)__name__ __module__ __qualname____doc__rrrrrrrr!r#r$r%r&r'r(r*r+r, __classcell__r r )r r rs$ r)rrZtuned.patternsZtunedZpatternsZ Singletonrr r r r s PK$2])\"\"7exports/__pycache__/unix_socket_exporter.cpython-36.pycnu[3 .wrappercSs||_||_dS)N)Z _in_signature_out_signature)r in_signature out_signaturerrr r!Gsz3UnixSocketExporter.export..wrapper.__init__cs ||S)Nr)rargskwargs)methodrr __call__Ksz3UnixSocketExporter.export..wrapper.__call__N)__name__ __module__ __qualname__r!r)r)r(rr wrapperFsr-)r Exceptionr*robject)rr(r$r% method_namer-r)r(r export>s  zUnixSocketExporter.exportcs^tstdj}||jkr,td|Gfdddt}|||j|<|jj|dS)Nz#Only bound methods can be exported.z/Method with this name (%s) is already exported.cs eZdZddZfddZdS)z*UnixSocketExporter.signal..wrappercSs ||_dS)N)r#)rr%rrr r!Ysz3UnixSocketExporter.signal..wrapper.__init__cs ||S)Nr)rr&r')r(rr r)\sz3UnixSocketExporter.signal..wrapper.__call__N)r*r+r,r!r)r)r(rr r-Xsr-)rr.r*rr/radd)rr(r%r0r-r)r(r signalPs  zUnixSocketExporter.signalcOs||jkrtd|x|jD]}tjd|yDtjtjtj}|jd|j ||j |d||d|j Wqt k r}ztj d|||fWYdd}~XqXqWdS)NzSignal '%s' doesn't exist.zSending signal on socket %sFz2.0)jsonrpcr(paramsz2Error while sending signal '%s' to socket '%s': %s)rr.r rdebugsocketAF_UNIX SOCK_STREAMZ setblockingZconnect _send_datacloseOSErrorwarning)rr3r&r'pserrr send_signalbs      zUnixSocketExporter.send_signalcCs|jj|dS)N)r append)rpathrrr register_signal_pathpsz'UnixSocketExporter.register_signal_pathcCs|jrtjj|jr tj|jtjtjtj|_|jj |j|jj |j tj |j|j d|j d|jrtj|j|jdS)Nrr)rosrCexistsunlinkr7r8r9r ZbindZlistenrchownr rchmod)rrrr _construct_socket_objectss z+UnixSocketExporter._construct_socket_objectcCs |jr dS|j|jdS)N)r"stoprJ)rrrr start~szUnixSocketExporter.startcCs|jr|jjdS)N)r r;)rrrr rKszUnixSocketExporter.stopcCsbtjd|y|jtj|jdWn4tk r\}ztjd||fWYdd}~XnXdS)NzSending socket data: %s)zutf-8zFailed to send data '%s': %s)rr6sendjsondumpsencoder.r=)rr?datar@rrr r:s zUnixSocketExporter._send_dataFcCs$d|d}|r||d<n||d<|S)Nz2.0)r4idrresultr)rrQrRrresrrr _create_responses  z#UnixSocketExporter._create_responseNcCs|j|||dd|dS)N)codemessagerQT)rrR)rU)rrVrWrRrQrrr _create_error_responces z)UnixSocketExporter._create_error_responcecCs |j||S)N)rU)rrSrRrrr _create_result_responsesz*UnixSocketExporter._create_result_responsecCs|jdr|SdS)NrR)get)rrQrrr _check_ids zUnixSocketExporter._check_idcCsnt|tks&|jddks&|jd r2|jddS|jd}d}|d|jkrb|j|jdd|Sy|jd s|j|d}njt|d ttfkr|j|d|d }n>t|d tkr|j|df|d }n|j|jdd|SWnntk r$}z|j|jdd |t |Sd}~Xn8t k rZ}z|j|jd d |t |Sd}~XnX|j|j ||S)Nr4z2.0r(iXzInvalid RequestrRiYzMethod not foundr5iZzInvalid paramsrErroriiii) typedictrZrXrr[listtuple TypeErrorstrr.rY)rreqrRretr@rrr _process_requests&&   $&z#UnixSocketExporter._process_requestc #Cs|js dSxtj|jgffd\}}}|r|jj\}}y*d}x |jdj}|sZP||7}qFWWn2tk r}ztjd|wWYdd}~XnX|ryt j |}WnRtk r}z4tjd||f|j ||j d dt |wWYdd}~XnXt|tttfkr>tjd |j ||j d dt |qt|ttfkrt|dkrz|j ||j dd t |qg}x(|D] }|j|}|r|j|qW|r|j ||n|j|}|r|j ||qdSqWdS)a Periodically checks socket object for new calls. This allows to function without special thread. Interface is according JSON-RPC 2.0 Specification (see https://www.jsonrpc.org/specification) Example calls: printf '[{"jsonrpc": "2.0", "method": "active_profile", "id": 1}, {"jsonrpc": "2.0", "method": "profiles", "id": 2}]' | nc -U /run/tuned/tuned.sock printf '{"jsonrpc": "2.0", "method": "switch_profile", "params": {"profile_name": "balanced"}, "id": 1}' | nc -U /run/tuned/tuned.sock Nriz"Failed to load data of message: %sz!Failed to load json data '%s': %siz Parse errorzWrong format of calliXzInvalid RequestiDiDi)r"selectr ZacceptZrecvdecoder.rrrNloadsr:rXrbr]r`r_r^lenrerB) rr_ZconnrQZrec_datar@rTrcrrr period_checksT     zUnixSocketExporter.period_check)F)NN)r*r+r,__doc__constsZCFG_DEF_UNIX_SOCKET_PATHZ CFG_DEF_UNIX_SOCKET_SIGNAL_PATHSZCFG_DEF_UNIX_SOCKET_OWNERSHIPZCFG_DEF_UNIX_SOCKET_PERMISIONSZ'CFG_DEF_UNIX_SOCKET_CONNECTIONS_BACKLOGr!r"r1r3rArDrJrLrKr:rUrXrYr[rermrrrr rs*  r)rEr rrrfrZ tuned.logsZtunedZ tuned.constsroinspectrr7rNrgZlogsrZrZExporterInterfacerrrrr s    PK$2]l?ݔ3exports/__pycache__/controller.cpython-36.opt-1.pycnu[3 Check if method was marked with @exports.get_property wrapper.property_get_params)rrr)r rr r r _is_exportable_getter sz'ExportsController._is_exportable_gettercCstj|ot|dS)z>Check if method was marked with @exports.set_property wrapper.property_set_params)rrr)r rr r r _is_exportable_setter$sz'ExportsController._is_exportable_settercCs:x4|jD]*}|jd}|jd}|j|f||qWdS)z!Register method to all exporters.rrN)rrZexport)r rexporterargskwargsr r r _export_method(s   z ExportsController._export_methodcCs:x4|jD]*}|jd}|jd}|j|f||qWdS)z!Register signal to all exporters.rrN)rrsignal)r rrrr r r r _export_signal/s   z ExportsController._export_signalcCs:x4|jD]*}|jd}|jd}|j|f||qWdS)z*Register property getter to all exporters.rrN)rrZproperty_getter)r rrrr r r r _export_getter6s   z ExportsController._export_gettercCs:x4|jD]*}|jd}|jd}|j|f||qWdS)z*Register property setter to all exporters.rrN)rrZproperty_setter)r rrrr r r r _export_setter=s   z ExportsController._export_settercOs&x |jD]}|j|f||qWdS)z!Register signal to all exporters.N)r send_signal)r r"rr rr r r r&Ds zExportsController.send_signalcOs x|jD]}|j||qWdS)N)rproperty_changed)r rr rr r r r'Is z"ExportsController.property_changedcCsx|jD] }|jqWdS)z=Allows to perform checks on exporters without special thread.N)r period_check)r rr r r r(Ms zExportsController.period_checkcCs|jr dSx|jD]}x$tj||jD]\}}|j|q&Wx$tj||jD]\}}|j|qLWx$tj||jD]\}}|j |qrWx$tj||j D]\}}|j |qWqWd|_dS)NT) r rrZ getmembersrr!rr#rr$rr%)r rnamerr r r _initialize_exportsRs z%ExportsController._initialize_exportscCs$|jx|jD] }|jqWdS)zStart the exports.N)r*rstart)r rr r r r+bs zExportsController.startcCsx|jD] }|jqWdS)zStop the exports.N)rstop)r rr r r r,hs zExportsController.stop)__name__ __module__ __qualname____doc__rrrrrrrr!r#r$r%r&r'r(r*r+r, __classcell__r r )r r rs$ r)rrZtuned.patternsZtunedZpatternsZ Singletonrr r r r s PK$2]y= +exports/__pycache__/__init__.cpython-36.pycnu[3 .wrapperr )rr r r )rr r exportsr csfdd}|S)z*Decorator, use to mark exportable signals.csg|_|S)N)Z signal_params)r)rr r r r s zsignal..wrapperr )rr r r )rr r signalsrcsfdd}|S)z8Decorator, use to mark setters of exportable properties.csg|_|S)N)Zproperty_set_params)r)rr r r r s z property_setter..wrapperr )rr r r )rr r property_settersrcsfdd}|S)z8Decorator, use to mark getters of exportable properties.csg|_|S)N)Zproperty_get_params)r)rr r r r s z property_getter..wrapperr )rr r r )rr r property_gettersrcOstjj}|j||S)N)rExportsController get_instanceproperty_changed)rr ctlr r r r#s rcCs&t|tjsttjj}|j|S)N) isinstancerZExporterInterface Exceptionrrrregister_exporter)instancerr r r r's  rcCs&t|tjsttjj}|j|S)N)rrZExportableInterfacerrrrregister_object)rrr r r r-s  rcOstjj}|j||S)N)rrr send_signal)rr rr r r r3s rcCstjj}|jS)N)rrrstart)rr r r r7s rcCstjj}|jS)N)rrrstop)rr r r r;s rcCstjj}|jS)N)rrr period_check)rr r r r?s rN)rrrZdbusrZdbus_with_propertiesrZ unix_socketr rrrrrrrrrrr r r r s     PK$2]ujLLexports/interfaces.pynu[class ExportableInterface(object): pass class ExporterInterface(object): def export(self, method, in_signature, out_signature): # to be overridden by concrete implementation raise NotImplementedError() def signal(self, method, out_signature): # to be overridden by concrete implementation raise NotImplementedError() def send_signal(self, signal, *args, **kwargs): # to be overridden by concrete implementation raise NotImplementedError() def start(self): raise NotImplementedError() def stop(self): raise NotImplementedError() def period_check(self): pass PK$2] exports/unix_socket_exporter.pynu[import os import re import pwd, grp from . import interfaces import tuned.logs import tuned.consts as consts from inspect import ismethod import socket import json import select log = tuned.logs.get() class UnixSocketExporter(interfaces.ExporterInterface): """ Export method calls through Unix Domain Socket Interface. We take a method to be exported and create a simple wrapper function to call it. This is required as we need the original function to be bound to the original object instance. While the wrapper will be bound to an object we dynamically construct. """ def __init__(self, socket_path=consts.CFG_DEF_UNIX_SOCKET_PATH, signal_paths=consts.CFG_DEF_UNIX_SOCKET_SIGNAL_PATHS, ownership=consts.CFG_DEF_UNIX_SOCKET_OWNERSHIP, permissions=consts.CFG_DEF_UNIX_SOCKET_PERMISIONS, connections_backlog=consts.CFG_DEF_UNIX_SOCKET_CONNECTIONS_BACKLOG): self._socket_path = socket_path self._socket_object = None self._socket_signal_paths = re.split(r",;", signal_paths) if signal_paths else [] self._socket_signal_objects = [] self._ownership = [-1, -1] if ownership: ownership = ownership.split() for i, o in enumerate(ownership[:2]): try: self._ownership[i] = int(o) except ValueError: try: # user if i == 0: self._ownership[i] = pwd.getpwnam(o).pw_uid # group else: self._ownership[i] = grp.getgrnam(o).gr_gid except KeyError: log.error("%s '%s' does not exists, leaving default" % ("User" if i == 0 else "Group", o)) self._permissions = permissions self._connections_backlog = connections_backlog self._unix_socket_methods = {} self._signals = set() self._conn = None self._channel = None def running(self): return self._socket_object is not None def export(self, method, in_signature, out_signature): if not ismethod(method): raise Exception("Only bound methods can be exported.") method_name = method.__name__ if method_name in self._unix_socket_methods: raise Exception("Method with this name (%s) is already exported." % method_name) class wrapper(object): def __init__(self, in_signature, out_signature): self._in_signature = in_signature self._out_signature = out_signature def __call__(self, *args, **kwargs): return method(*args, **kwargs) self._unix_socket_methods[method_name] = wrapper(in_signature, out_signature) def signal(self, method, out_signature): if not ismethod(method): raise Exception("Only bound methods can be exported.") method_name = method.__name__ if method_name in self._unix_socket_methods: raise Exception("Method with this name (%s) is already exported." % method_name) class wrapper(object): def __init__(self, out_signature): self._out_signature = out_signature def __call__(self, *args, **kwargs): return method(*args, **kwargs) self._unix_socket_methods[method_name] = wrapper(out_signature) self._signals.add(method_name) def send_signal(self, signal, *args, **kwargs): if not signal in self._signals: raise Exception("Signal '%s' doesn't exist." % signal) for p in self._socket_signal_paths: log.debug("Sending signal on socket %s" % p) try: s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) s.setblocking(False) s.connect(p) self._send_data(s, {"jsonrpc": "2.0", "method": signal, "params": args}) s.close() except OSError as e: log.warning("Error while sending signal '%s' to socket '%s': %s" % (signal, p, e)) def register_signal_path(self, path): self._socket_signal_paths.append(path) def _construct_socket_object(self): if self._socket_path: if os.path.exists(self._socket_path): os.unlink(self._socket_path) self._socket_object = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) self._socket_object.bind(self._socket_path) self._socket_object.listen(self._connections_backlog) os.chown(self._socket_path, self._ownership[0], self._ownership[1]) if self._permissions: os.chmod(self._socket_path, self._permissions) def start(self): if self.running(): return self.stop() self._construct_socket_object() def stop(self): if self._socket_object: self._socket_object.close() def _send_data(self, s, data): log.debug("Sending socket data: %s)" % data) try: s.send(json.dumps(data).encode("utf-8")) except Exception as e: log.warning("Failed to send data '%s': %s" % (data, e)) def _create_response(self, data, id, error=False): res = { "jsonrpc": "2.0", "id": id } if error: res["error"] = data else: res["result"] = data return res def _create_error_responce(self, code, message, id=None, data=None): return self._create_response({ "code": code, "message": message, "data": data, }, error=True, id=id) def _create_result_response(self, result, id): return self._create_response(result, id) def _check_id(self, data): if data.get("id"): return data return None def _process_request(self, req): if type(req) != dict or req.get("jsonrpc") != "2.0" or not req.get("method"): return self._create_error_responce(-32600, "Invalid Request") id = req.get("id") ret = None if req["method"] not in self._unix_socket_methods: return self._check_id(self._create_error_responce(-32601, "Method not found", id)) try: if not req.get("params"): ret = self._unix_socket_methods[req["method"]]() elif type(req["params"]) in (list, tuple): ret = self._unix_socket_methods[req["method"]](*req["params"]) elif type(req["params"]) == dict: ret = self._unix_socket_methods[req["method"]](**req["params"]) else: return self._check_id(self._create_error_responce(-32600, "Invalid Request", id)) except TypeError as e: return self._check_id(self._create_error_responce(-32602, "Invalid params", id, str(e))) except Exception as e: return self._check_id(self._create_error_responce(1, "Error", id, str(e))) return self._check_id(self._create_result_response(ret, id)) def period_check(self): """ Periodically checks socket object for new calls. This allows to function without special thread. Interface is according JSON-RPC 2.0 Specification (see https://www.jsonrpc.org/specification) Example calls: printf '[{"jsonrpc": "2.0", "method": "active_profile", "id": 1}, {"jsonrpc": "2.0", "method": "profiles", "id": 2}]' | nc -U /run/tuned/tuned.sock printf '{"jsonrpc": "2.0", "method": "switch_profile", "params": {"profile_name": "balanced"}, "id": 1}' | nc -U /run/tuned/tuned.sock """ if not self.running(): return while True: r, _, _ = select.select([self._socket_object], (), (), 0) if r: conn, _ = self._socket_object.accept() try: data = "" while True: rec_data = conn.recv(4096).decode() if not rec_data: break data += rec_data except Exception as e: log.error("Failed to load data of message: %s" % e) continue if data: try: data = json.loads(data) except Exception as e: log.error("Failed to load json data '%s': %s" % (data, e)) self._send_data(conn, self._create_error_responce(-32700, "Parse error", str(e))) continue if type(data) not in (tuple, list, dict): log.error("Wrong format of call") self._send_data(conn, self._create_error_responce(-32700, "Parse error", str(e))) continue if type(data) in (tuple, list): if len(data) == 0: self._send_data(conn, self._create_error_responce(-32600, "Invalid Request", str(e))) continue res = [] for req in data: r = self._process_request(req) if r: res.append(r) if res: self._send_data(conn, res) else: res = self._process_request(data) if r: self._send_data(conn, res) else: return PK$2]룄qqexports/__init__.pynu[from . import interfaces from . import controller from . import dbus_exporter as dbus from . import dbus_exporter_with_properties as dbus_with_properties from . import unix_socket_exporter as unix_socket def export(*args, **kwargs): """Decorator, use to mark exportable methods.""" def wrapper(method): method.export_params = [ args, kwargs ] return method return wrapper def signal(*args, **kwargs): """Decorator, use to mark exportable signals.""" def wrapper(method): method.signal_params = [ args, kwargs ] return method return wrapper def property_setter(*args, **kwargs): """Decorator, use to mark setters of exportable properties.""" def wrapper(method): method.property_set_params = [ args, kwargs ] return method return wrapper def property_getter(*args, **kwargs): """Decorator, use to mark getters of exportable properties.""" def wrapper(method): method.property_get_params = [ args, kwargs ] return method return wrapper def property_changed(*args, **kwargs): ctl = controller.ExportsController.get_instance() return ctl.property_changed(*args, **kwargs) def register_exporter(instance): if not isinstance(instance, interfaces.ExporterInterface): raise Exception() ctl = controller.ExportsController.get_instance() return ctl.register_exporter(instance) def register_object(instance): if not isinstance(instance, interfaces.ExportableInterface): raise Exception() ctl = controller.ExportsController.get_instance() return ctl.register_object(instance) def send_signal(*args, **kwargs): ctl = controller.ExportsController.get_instance() return ctl.send_signal(*args, **kwargs) def start(): ctl = controller.ExportsController.get_instance() return ctl.start() def stop(): ctl = controller.ExportsController.get_instance() return ctl.stop() def period_check(): ctl = controller.ExportsController.get_instance() return ctl.period_check() PK$2]'M * * (exports/dbus_exporter_with_properties.pynu[from inspect import ismethod from dbus.service import method, signal from dbus import PROPERTIES_IFACE from dbus.exceptions import DBusException from tuned.exports.dbus_exporter import DBusExporter class DBusExporterWithProperties(DBusExporter): def __init__(self, bus_name, interface_name, object_name, namespace): super(DBusExporterWithProperties, self).__init__(bus_name, interface_name, object_name, namespace) self._property_setters = {} self._property_getters = {} def Get(_, interface_name, property_name): if interface_name != self._interface_name: raise DBusException("Unknown interface: %s" % interface_name) if property_name not in self._property_getters: raise DBusException("No such property: %s" % property_name) getter = self._property_getters[property_name] return getter() def Set(_, interface_name, property_name, value): if interface_name != self._interface_name: raise DBusException("Unknown interface: %s" % interface_name) if property_name not in self._property_setters: raise DBusException("No such property: %s" % property_name) setter = self._property_setters[property_name] setter(value) def GetAll(_, interface_name): if interface_name != self._interface_name: raise DBusException("Unknown interface: %s" % interface_name) return {name: getter() for name, getter in self._property_getters.items()} def PropertiesChanged(_, interface_name, changed_properties, invalidated_properties): if interface_name != self._interface_name: raise DBusException("Unknown interface: %s" % interface_name) self._dbus_methods["Get"] = method(PROPERTIES_IFACE, in_signature="ss", out_signature="v")(Get) self._dbus_methods["Set"] = method(PROPERTIES_IFACE, in_signature="ssv")(Set) self._dbus_methods["GetAll"] = method(PROPERTIES_IFACE, in_signature="s", out_signature="a{sv}")(GetAll) self._dbus_methods["PropertiesChanged"] = signal(PROPERTIES_IFACE, signature="sa{sv}as")(PropertiesChanged) self._signals.add("PropertiesChanged") def property_changed(self, property_name, value): self.send_signal("PropertiesChanged", self._interface_name, {property_name: value}, {}) def property_getter(self, method, property_name): if not ismethod(method): raise Exception("Only bound methods can be exported.") if property_name in self._property_getters: raise Exception("A getter for this property is already registered.") self._property_getters[property_name] = method def property_setter(self, method, property_name): if not ismethod(method): raise Exception("Only bound methods can be exported.") if property_name in self._property_setters: raise Exception("A setter for this property is already registered.") self._property_setters[property_name] = method PK$2]G2hardware/__pycache__/__init__.cpython-36.opt-1.pycnu[3 sPK$2]"H2hardware/__pycache__/device_matcher.cpython-36.pycnu[3 sz'DeviceMatcher.match..cs g|]}|kr|ddqS)Nr )rr)positive_rulesr r r sr*FT) isinstancestrresplitlenappendfnmatch)selfrulesZ device_nameZnegative_rulesZmatchesrr )r r matchs         zDeviceMatcher.matchcCs,g}x"|D]}|j||r |j|q W|S)z Match a device list against the specification in the profile. Returns the list, which is a subset of devices which match. )rr)rrZ device_listZmatching_devicesZdevicer r r match_list,s   zDeviceMatcher.match_listN)__name__ __module__ __qualname____doc__rrr r r r rs)rr__all__objectrr r r r sPK$2]HWtj||tjdk S)zc Match a device against the udev regex in tuning profiles. device is a pyudev.Device object = N) propertiesitemsAttributeErrorsortedlistresearch MULTILINE)selfZregexZdevicerr keyvalr)/usr/lib/python3.6/device_matcher_udev.pymatchszDeviceMatcherUdev.matchN)__name__ __module__ __qualname__rrrrrrs)rrr __all__Z DeviceMatcherrrrrrs PK$2]ff3hardware/__pycache__/inventory.cpython-36.opt-1.pycnu[3 s   bPK$2]ff-hardware/__pycache__/inventory.cpython-36.pycnu[3 s   bPK$2]"H8hardware/__pycache__/device_matcher.cpython-36.opt-1.pycnu[3 sz'DeviceMatcher.match..cs g|]}|kr|ddqS)Nr )rr)positive_rulesr r r sr*FT) isinstancestrresplitlenappendfnmatch)selfrulesZ device_nameZnegative_rulesZmatchesrr )r r matchs         zDeviceMatcher.matchcCs,g}x"|D]}|j||r |j|q W|S)z Match a device list against the specification in the profile. Returns the list, which is a subset of devices which match. )rr)rrZ device_listZmatching_devicesZdevicer r r match_list,s   zDeviceMatcher.match_listN)__name__ __module__ __qualname____doc__rrr r r r rs)rr__all__objectrr r r r sPK$2]HWtj||tjdk S)zc Match a device against the udev regex in tuning profiles. device is a pyudev.Device object = N) propertiesitemsAttributeErrorsortedlistresearch MULTILINE)selfZregexZdevicerr keyvalr)/usr/lib/python3.6/device_matcher_udev.pymatchszDeviceMatcherUdev.matchN)__name__ __module__ __qualname__rrrrrrs)rrr __all__Z DeviceMatcherrrrrrs PK$2]G,hardware/__pycache__/__init__.cpython-36.pycnu[3 sPK$2]ϫ((hardware/device_matcher.pynu[import fnmatch import re __all__ = ["DeviceMatcher"] class DeviceMatcher(object): """ Device name matching against the devices specification in tuning profiles. The devices specification consists of multiple rules separated by spaces. The rules have a syntax of shell-style wildcards and are either positive or negative. The negative rules are prefixed with an exclamation mark. """ def match(self, rules, device_name): """ Match a device against the specification in the profile. If there is no positive rule in the specification, implicit rule which matches all devices is added. The device matches if and only if it matches some positive rule, but no negative rule. """ if isinstance(rules, str): rules = re.split(r"\s|,\s*", rules) positive_rules = [rule for rule in rules if not rule.startswith("!") and not rule.strip() == ''] negative_rules = [rule[1:] for rule in rules if rule not in positive_rules] if len(positive_rules) == 0: positive_rules.append("*") matches = False for rule in positive_rules: if fnmatch.fnmatch(device_name, rule): matches = True break for rule in negative_rules: if fnmatch.fnmatch(device_name, rule): matches = False break return matches def match_list(self, rules, device_list): """ Match a device list against the specification in the profile. Returns the list, which is a subset of devices which match. """ matching_devices = [] for device in device_list: if self.match(rules, device): matching_devices.append(device) return matching_devices PK$2]qZZhardware/__init__.pynu[from .inventory import * from .device_matcher import * from .device_matcher_udev import * PK$2]33hardware/inventory.pynu[import pyudev import tuned.logs from tuned import consts __all__ = ["Inventory"] log = tuned.logs.get() class Inventory(object): """ Inventory object can handle information about available hardware devices. It also informs the plugins about related hardware events. """ def __init__(self, udev_context=None, udev_monitor_cls=None, monitor_observer_factory=None, buffer_size=None, set_receive_buffer_size=True): if udev_context is not None: self._udev_context = udev_context else: self._udev_context = pyudev.Context() if udev_monitor_cls is None: udev_monitor_cls = pyudev.Monitor self._udev_monitor = udev_monitor_cls.from_netlink(self._udev_context) if buffer_size is None: buffer_size = consts.CFG_DEF_UDEV_BUFFER_SIZE if (set_receive_buffer_size): try: self._udev_monitor.set_receive_buffer_size(buffer_size) except EnvironmentError: log.warn("cannot set udev monitor receive buffer size, we are probably running inside " + "container or with limited capabilites, TuneD functionality may be limited") if monitor_observer_factory is None: monitor_observer_factory = _MonitorObserverFactory() self._monitor_observer_factory = monitor_observer_factory self._monitor_observer = None self._subscriptions = {} def get_device(self, subsystem, sys_name): """Get a pyudev.Device object for the sys_name (e.g. 'sda').""" try: return pyudev.Devices.from_name(self._udev_context, subsystem, sys_name) # workaround for pyudev < 0.18 except AttributeError: return pyudev.Device.from_name(self._udev_context, subsystem, sys_name) def get_devices(self, subsystem): """Get list of devices on a given subsystem.""" return self._udev_context.list_devices(subsystem=subsystem) def _handle_udev_event(self, event, device): if not device.subsystem in self._subscriptions: return for (plugin, callback) in self._subscriptions[device.subsystem]: try: callback(event, device) except Exception as e: log.error("Exception occured in event handler of '%s'." % plugin) log.exception(e) def subscribe(self, plugin, subsystem, callback): """Register handler of device events on a given subsystem.""" log.debug("adding handler: %s (%s)" % (subsystem, plugin)) callback_data = (plugin, callback) if subsystem in self._subscriptions: self._subscriptions[subsystem].append(callback_data) else: self._subscriptions[subsystem] = [callback_data, ] self._udev_monitor.filter_by(subsystem) # After start(), HW events begin to get queued up self._udev_monitor.start() def start_processing_events(self): if self._monitor_observer is None: log.debug("starting monitor observer") self._monitor_observer = self._monitor_observer_factory.create(self._udev_monitor, self._handle_udev_event) self._monitor_observer.start() def stop_processing_events(self): if self._monitor_observer is not None: log.debug("stopping monitor observer") self._monitor_observer.stop() self._monitor_observer = None def _unsubscribe_subsystem(self, plugin, subsystem): for callback_data in self._subscriptions[subsystem]: (_plugin, callback) = callback_data if plugin == _plugin: log.debug("removing handler: %s (%s)" % (subsystem, plugin)) self._subscriptions[subsystem].remove(callback_data) def unsubscribe(self, plugin, subsystem=None): """Unregister handler registered with subscribe method.""" empty_subsystems = [] for _subsystem in self._subscriptions: if subsystem is None or _subsystem == subsystem: self._unsubscribe_subsystem(plugin, _subsystem) if len(self._subscriptions[_subsystem]) == 0: empty_subsystems.append(_subsystem) for _subsystem in empty_subsystems: del self._subscriptions[_subsystem] class _MonitorObserverFactory(object): def create(self, *args, **kwargs): return pyudev.MonitorObserver(*args, **kwargs) PK$2],'hardware/device_matcher_udev.pynu[from . import device_matcher import re __all__ = ["DeviceMatcherUdev"] class DeviceMatcherUdev(device_matcher.DeviceMatcher): def match(self, regex, device): """ Match a device against the udev regex in tuning profiles. device is a pyudev.Device object """ properties = '' try: items = device.properties.items() except AttributeError: items = device.items() for key, val in sorted(list(items)): properties += key + '=' + val + '\n' return re.search(regex, properties, re.MULTILINE) is not None PK$2]] profiles/unit.pynu[import collections import re class Unit(object): """ Unit description. """ __slots__ = [ "_name", "_type", "_enabled", "_replace", "_drop", "_devices", "_devices_udev_regex", \ "_cpuinfo_regex", "_uname_regex", "_script_pre", "_script_post", "_options" ] def __init__(self, name, config): self._name = name self._type = config.pop("type", self._name) self._enabled = config.pop("enabled", True) in [True, "True", "true", 1, "1"] self._replace = config.pop("replace", False) in [True, "True", "true", 1, "1"] self._drop = config.pop("drop", None) if self._drop is not None: self._drop = re.split(r"\b\s*[,;]\s*", str(self._drop)) self._devices = config.pop("devices", "*") self._devices_udev_regex = config.pop("devices_udev_regex", None) self._cpuinfo_regex = config.pop("cpuinfo_regex", None) self._uname_regex = config.pop("uname_regex", None) self._script_pre = config.pop("script_pre", None) self._script_post = config.pop("script_post", None) self._options = collections.OrderedDict(config) @property def name(self): return self._name @property def type(self): return self._type @type.setter def type(self, value): self._type = value @property def enabled(self): return self._enabled @enabled.setter def enabled(self, value): self._enabled = value @property def replace(self): return self._replace @property def drop(self): return self._drop @drop.setter def drop(self, value): self._drop = value @property def devices(self): return self._devices @devices.setter def devices(self, value): self._devices = value @property def devices_udev_regex(self): return self._devices_udev_regex @devices_udev_regex.setter def devices_udev_regex(self, value): self._devices_udev_regex = value @property def cpuinfo_regex(self): return self._cpuinfo_regex @cpuinfo_regex.setter def cpuinfo_regex(self, value): self._cpuinfo_regex = value @property def uname_regex(self): return self._uname_regex @uname_regex.setter def uname_regex(self, value): self._uname_regex = value @property def script_pre(self): return self._script_pre @script_pre.setter def script_pre(self, value): self._script_pre = value @property def script_post(self): return self._script_post @script_post.setter def script_post(self, value): self._script_post = value @property def options(self): return self._options @options.setter def options(self, value): self._options = value PK$2]0t&profiles/factory.pynu[import tuned.profiles.profile class Factory(object): def create(self, name, config): return tuned.profiles.profile.Profile(name, config) PK$2]Snnprofiles/profile.pynu[import tuned.profiles.unit import tuned.consts as consts import collections class Profile(object): """ Representation of a tuning profile. """ __slots__ = ["_name", "_options", "_units"] def __init__(self, name, config): self._name = name self._init_options(config) self._init_units(config) def _init_options(self, config): self._options = {} if consts.PLUGIN_MAIN_UNIT_NAME in config: self._options = dict(config[consts.PLUGIN_MAIN_UNIT_NAME]) def _init_units(self, config): self._units = collections.OrderedDict() for unit_name in config: if unit_name != consts.PLUGIN_MAIN_UNIT_NAME: new_unit = self._create_unit(unit_name, config[unit_name]) self._units[unit_name] = new_unit def _create_unit(self, name, config): return tuned.profiles.unit.Unit(name, config) @property def name(self): """ Profile name. """ return self._name @name.setter def name(self, value): self._name = value @property def units(self): """ Units included in the profile. """ return self._units @property def options(self): """ Profile global options. """ return self._options PK$2]Ao$ $ profiles/variables.pynu[import os import re import tuned.logs from .functions import functions as functions import tuned.consts as consts from tuned.utils.commands import commands from tuned.utils.config_parser import ConfigParser, Error log = tuned.logs.get() class Variables(): """ Storage and processing of variables used in profiles """ def __init__(self): self._cmd = commands() self._lookup_re = {} self._lookup_env = {} self._functions = functions.Functions() def _add_env_prefix(self, s, prefix): if s.find(prefix) == 0: return s return prefix + s def _check_var(self, variable): return re.match(r'\w+$',variable) def add_variable(self, variable, value): if value is None: return s = str(variable) if not self._check_var(variable): log.error("variable definition '%s' contains unallowed characters" % variable) return v = self.expand(value) # variables referenced by ${VAR}, $ can be escaped by two $, # i.e. the following will not expand: $${VAR} self._lookup_re[r'(?sPK$2]$0.profiles/__pycache__/unit.cpython-36.opt-1.pycnu[3 sPK$2]\2profiles/__pycache__/__init__.cpython-36.opt-1.pycnu[3 sPK$2]qZ/ -profiles/__pycache__/variables.cpython-36.pycnu[3 s    PK$2]pm5TT*profiles/__pycache__/merger.cpython-36.pycnu[3 s PK$2]Yll*profiles/__pycache__/loader.cpython-36.pycnu[3 s   PK$2]Wqxx+profiles/__pycache__/locator.cpython-36.pycnu[3 }|j|tjj|}|dk r^||kr^d}q0tjj|r0|Sq0W|r|dkrd}|S)Nr-)reversedrrrrbasenameisfile)r profile_nameZ skip_filesretZconditional_loaddir_name config_filer r r get_configs   zLocator.get_configcCs|dk o|dkod|kS)Nr/r )r rr r r check_profile_name_format0sz!Locator.check_profile_name_formatcCs|j|sdS|j|}|dkr$dSyJtddddd}t|_t|"}|jdtjd|j WdQRX|St t t fk r}zdSd}~XnXdS)N=#TF)Z delimitersZinline_comment_prefixesZallow_no_valuestrict[z] ) r rrstrZ optionxformopenZ read_stringconstsZMAGIC_HEADER_NAMEreadIOErrorOSErrorr)r rrconfigfer r r parse_config3s   &zLocator.parse_configc Cs$y t|}Wntk r*|g}d}YnXy t|}Wntk rV|g}d}YnX||krv||dg||}|j|}|dkrddddgStj|jk}d|g}xtt||D]f\} } | dks| dkrd|d<|dg}q|o| |jtjkr||jtj| ddg}q|| g}qW|S)NrFrTr)raw) lenrr.r'ZPLUGIN_MAIN_UNIT_NAMEZsectionszipZoptionsget) r rZattrsZdefvalsZ attrs_lenZ defvals_lenr+Zmain_unit_in_configvalsattrZdefvalr r r get_profile_attrsGs2       zLocator.get_profile_attrsc Csjt}x^|jD]T}y:x4tj|D]&}|j||}tjj|r |j|q WWqtk r`YqXqW|S)N) setrrlistdirrrraddr*)r Zprofilesrrrr r r list_profileses    zLocator.list_profilescCs t|jS)N)sortedr:)r r r r get_known_namesqszLocator.get_known_namescsfddtjDS)Ncs(g|] }|j|tjgdgdfqS)r)r6r'ZPROFILE_ATTR_SUMMARY).0Zprofile)r r r usz3Locator.get_known_names_summary..)r;r:)r r )r r get_known_names_summarytszLocator.get_known_names_summary)N)N)__name__ __module__ __qualname____doc__ __slots__r propertyr rrr r.r6r:r<r@r r r r rs    r)rZ tuned.constsr'Ztuned.utils.config_parserrrobjectrr r r r s PK$2] _1profiles/__pycache__/profile.cpython-36.opt-1.pycnu[3 s PK$2]Yll0profiles/__pycache__/loader.cpython-36.opt-1.pycnu[3 s   PK$2]?4^^4profiles/__pycache__/exceptions.cpython-36.opt-1.pycnu[3 sPK$2]@ +profiles/__pycache__/factory.cpython-36.pycnu[3 sPK$2]?4^^.profiles/__pycache__/exceptions.cpython-36.pycnu[3 sPK$2] _+profiles/__pycache__/profile.cpython-36.pycnu[3 s PK$2]qZ/ 3profiles/__pycache__/variables.cpython-36.opt-1.pycnu[3 s    PK$2]Wqxx1profiles/__pycache__/locator.cpython-36.opt-1.pycnu[3 }|j|tjj|}|dk r^||kr^d}q0tjj|r0|Sq0W|r|dkrd}|S)Nr-)reversedrrrrbasenameisfile)r profile_nameZ skip_filesretZconditional_loaddir_name config_filer r r get_configs   zLocator.get_configcCs|dk o|dkod|kS)Nr/r )r rr r r check_profile_name_format0sz!Locator.check_profile_name_formatcCs|j|sdS|j|}|dkr$dSyJtddddd}t|_t|"}|jdtjd|j WdQRX|St t t fk r}zdSd}~XnXdS)N=#TF)Z delimitersZinline_comment_prefixesZallow_no_valuestrict[z] ) r rrstrZ optionxformopenZ read_stringconstsZMAGIC_HEADER_NAMEreadIOErrorOSErrorr)r rrconfigfer r r parse_config3s   &zLocator.parse_configc Cs$y t|}Wntk r*|g}d}YnXy t|}Wntk rV|g}d}YnX||krv||dg||}|j|}|dkrddddgStj|jk}d|g}xtt||D]f\} } | dks| dkrd|d<|dg}q|o| |jtjkr||jtj| ddg}q|| g}qW|S)NrFrTr)raw) lenrr.r'ZPLUGIN_MAIN_UNIT_NAMEZsectionszipZoptionsget) r rZattrsZdefvalsZ attrs_lenZ defvals_lenr+Zmain_unit_in_configvalsattrZdefvalr r r get_profile_attrsGs2       zLocator.get_profile_attrsc Csjt}x^|jD]T}y:x4tj|D]&}|j||}tjj|r |j|q WWqtk r`YqXqW|S)N) setrrlistdirrrraddr*)r Zprofilesrrrr r r list_profileses    zLocator.list_profilescCs t|jS)N)sortedr:)r r r r get_known_namesqszLocator.get_known_namescsfddtjDS)Ncs(g|] }|j|tjgdgdfqS)r)r6r'ZPROFILE_ATTR_SUMMARY).0Zprofile)r r r usz3Locator.get_known_names_summary..)r;r:)r r )r r get_known_names_summarytszLocator.get_known_names_summary)N)N)__name__ __module__ __qualname____doc__ __slots__r propertyr rrr r.r6r:r<r@r r r r rs    r)rZ tuned.constsr'Ztuned.utils.config_parserrrobjectrr r r r s PK$2]@ 1profiles/__pycache__/factory.cpython-36.opt-1.pycnu[3 sPK$2]pm5TT0profiles/__pycache__/merger.cpython-36.opt-1.pycnu[3 s PK$2]\,profiles/__pycache__/__init__.cpython-36.pycnu[3 sPK$2]Fprofiles/locator.pynu[import os import tuned.consts as consts from tuned.utils.config_parser import ConfigParser, Error class Locator(object): """ Profiles locator and enumerator. """ __slots__ = ["_load_directories"] def __init__(self, load_directories): if type(load_directories) is not list: raise TypeError("load_directories parameter is not a list") self._load_directories = load_directories @property def load_directories(self): return self._load_directories def _get_config_filename(self, *path_parts): path_parts = list(path_parts) + ["tuned.conf"] config_name = os.path.join(*path_parts) return os.path.normpath(config_name) def get_config(self, profile_name, skip_files=None): ret = None conditional_load = profile_name[0:1] == "-" if conditional_load: profile_name = profile_name[1:] for dir_name in reversed(self._load_directories): # basename is protection not to get out of the path config_file = self._get_config_filename(dir_name, os.path.basename(profile_name)) if skip_files is not None and config_file in skip_files: ret = "" continue if os.path.isfile(config_file): return config_file if conditional_load and ret is None: ret = "" return ret def check_profile_name_format(self, profile_name): return profile_name is not None and profile_name != "" and "/" not in profile_name def parse_config(self, profile_name): if not self.check_profile_name_format(profile_name): return None config_file = self.get_config(profile_name) if config_file is None: return None try: config = ConfigParser(delimiters=('='), inline_comment_prefixes=('#'), allow_no_value=True, strict=False) config.optionxform = str with open(config_file) as f: config.read_string("[" + consts.MAGIC_HEADER_NAME + "]\n" + f.read()) return config except (IOError, OSError, Error) as e: return None # Get profile attributes (e.g. summary, description), attrs is list of requested attributes, # if it is not list it is converted to list, defvals is list of default values to return if # attribute is not found, it is also converted to list if it is not list. # Returns list of the following format [status, profile_name, attr1_val, attr2_val, ...], # status is boolean. def get_profile_attrs(self, profile_name, attrs, defvals = None): # check types try: attrs_len = len(attrs) except TypeError: attrs = [attrs] attrs_len = 1 try: defvals_len = len(defvals) except TypeError: defvals = [defvals] defvals_len = 1 # Extend defvals if needed, last value is used for extension if defvals_len < attrs_len: defvals = defvals + ([defvals[-1]] * (attrs_len - defvals_len)) config = self.parse_config(profile_name) if config is None: return [False, "", "", ""] main_unit_in_config = consts.PLUGIN_MAIN_UNIT_NAME in config.sections() vals = [True, profile_name] for (attr, defval) in zip(attrs, defvals): if attr == "" or attr is None: vals[0] = False vals = vals + [""] elif main_unit_in_config and attr in config.options(consts.PLUGIN_MAIN_UNIT_NAME): vals = vals + [config.get(consts.PLUGIN_MAIN_UNIT_NAME, attr, raw=True)] else: vals = vals + [defval] return vals def list_profiles(self): profiles = set() for dir_name in self._load_directories: try: for profile_name in os.listdir(dir_name): config_file = self._get_config_filename(dir_name, profile_name) if os.path.isfile(config_file): profiles.add(profile_name) except OSError: pass return profiles def get_known_names(self): return sorted(self.list_profiles()) def get_known_names_summary(self): return [(profile, self.get_profile_attrs(profile, [consts.PROFILE_ATTR_SUMMARY], [""])[2]) for profile in sorted(self.list_profiles())] PK$2]$X profiles/functions/repository.pynu[from tuned.utils.plugin_loader import PluginLoader from . import base import tuned.logs import tuned.consts as consts from tuned.utils.commands import commands log = tuned.logs.get() class Repository(PluginLoader): def __init__(self): super(Repository, self).__init__() self._functions = {} @property def functions(self): return self._functions def _set_loader_parameters(self): self._namespace = "tuned.profiles.functions" self._prefix = consts.FUNCTION_PREFIX self._interface = tuned.profiles.functions.base.Function def create(self, function_name): log.debug("creating function %s" % function_name) function_cls = self.load_plugin(function_name) function_instance = function_cls() self._functions[function_name] = function_instance return function_instance # loads function from plugin file and return it # if it is already loaded, just return it, it is not loaded again def load_func(self, function_name): if not function_name in self._functions: return self.create(function_name) return self._functions[function_name] def delete(self, function): assert isinstance(function, self._interface) log.debug("removing function %s" % function) for k, v in list(self._functions.items()): if v == function: del self._functions[k] PK$2],*profiles/functions/function_hex2cpulist.pynu[import os import tuned.logs from . import base from tuned.utils.commands import commands log = tuned.logs.get() class hex2cpulist(base.Function): """ Conversion function: converts hexadecimal CPU mask to CPU list """ def __init__(self): # 1 argument super(hex2cpulist, self).__init__("hex2cpulist", 1, 1) def execute(self, args): if not super(hex2cpulist, self).execute(args): return None return ",".join(str(v) for v in self._cmd.hex2cpulist(args[0])) PK$2]@z-profiles/functions/function_cpulist_invert.pynu[import os import tuned.logs from . import base from tuned.utils.commands import commands log = tuned.logs.get() class cpulist_invert(base.Function): """ Inverts list of CPUs (makes its complement). For the complement it gets number of online CPUs from the /sys/devices/system/cpu/online, e.g. system with 4 CPUs (0-3), the inversion of list "0,2,3" will be "1" """ def __init__(self): # arbitrary number of arguments super(cpulist_invert, self).__init__("cpulist_invert", 0) def execute(self, args): if not super(cpulist_invert, self).execute(args): return None return ",".join(str(v) for v in self._cmd.cpulist_invert(",,".join(args))) PK$2]++2profiles/functions/function_assertion_non_equal.pynu[import os import tuned.logs from . import base from tuned.utils.commands import commands from tuned.profiles.exceptions import InvalidProfileException log = tuned.logs.get() class assertion_non_equal(base.Function): """ Assertion non equal: compares argument 2 with argument 3. If they match it logs text from argument 1 and throws InvalidProfileException. This exception will abort profile loading. """ def __init__(self): # 3 arguments super(assertion_non_equal, self).__init__("assertion_non_equal", 3, 3) def execute(self, args): if not super(assertion_non_equal, self).execute(args): return None if args[1] == args[2]: log.error("assertion '%s' failed: '%s' == '%s'" % (args[0], args[1], args[2])) raise InvalidProfileException("Assertion '%s' failed." % args[0]) return None PK$2]#profiles/functions/function_exec.pynu[import os import tuned.logs from . import base from tuned.utils.commands import commands class execute(base.Function): """ Executes process and substitutes its output. """ def __init__(self): # unlimited number of arguments, min 1 argument (the name of executable) super(execute, self).__init__("exec", 0, 1) def execute(self, args): if not super(execute, self).execute(args): return None (ret, out) = self._cmd.execute(args) if ret == 0: return out return None PK$2]profiles/functions/base.pynu[import os import tuned.logs from tuned.utils.commands import commands log = tuned.logs.get() class Function(object): """ Built-in function """ def __init__(self, name, nargs_max, nargs_min = None): self._name = name self._nargs_max = nargs_max self._nargs_min = nargs_min self._cmd = commands() # checks arguments # nargs_max - maximal number of arguments, there mustn't be more arguments, # if nargs_max is 0, number of arguments is unlimited # nargs_min - minimal number of arguments, if not None there must # be the same number of arguments or more @classmethod def _check_args(cls, args, nargs_max, nargs_min = None): if args is None or nargs_max is None: return False la = len(args) return (nargs_max == 0 or nargs_max >= la) and (nargs_min is None or nargs_min <= la) def execute(self, args): if self._check_args(args, self._nargs_max, self._nargs_min): return True else: log.error("invalid number of arguments for builtin function '%s'" % self._name) return False PK$2]Q4profiles/functions/function_check_net_queue_count.pynu[import tuned.logs from . import base log = tuned.logs.get() class check_net_queue_count(base.Function): """ Checks whether the user has specified a queue count for net devices. If not, return the number of housekeeping CPUs. """ def __init__(self): # 1 argument super(check_net_queue_count, self).__init__("check_net_queue_count", 1, 1) def execute(self, args): if not super(check_net_queue_count, self).execute(args): return None if args[0].isdigit(): return args[0] (ret, out) = self._cmd.execute(["nproc"]) log.warn("net-dev queue count is not correctly specified, setting it to HK CPUs %s" % (out)) return out PK$2]!B;profiles/functions/__pycache__/function_s2kb.cpython-36.pycnu[3 ddlZddlZddlmZddlmZGdddejZdS)N)base)commandscs,eZdZdZfddZfddZZS)s2kbz* Conversion function: sectors to kbytes cstt|jddddS)Nrr)superr__init__)self) __class__#/usr/lib/python3.6/function_s2kb.pyr sz s2kb.__init__c sJtt|j|sdSytttt|ddStk rDdSXdS)Nr)rrexecutestrintround ValueError)rargs)r r r r s z s2kb.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZFunctionrr r r r s  PK$2]1?Eprofiles/functions/__pycache__/function_cpulist_invert.cpython-36.pycnu[3 sz)cpulist_invert.execute..z,,)rrexecutejoinZ_cmd)rargs)r r r rszcpulist_invert.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZlogsgetlogZFunctionrr r r r s    PK$2]jTTRprofiles/functions/__pycache__/function_check_net_queue_count.cpython-36.opt-1.pycnu[3 s  PK$2]m<profiles/functions/__pycache__/__init__.cpython-36.opt-1.pycnu[3 sPK$2] {{Aprofiles/functions/__pycache__/function_kb2s.cpython-36.opt-1.pycnu[3 ddlZddlZddlmZddlmZGdddejZdS)N)base)commandscs,eZdZdZfddZfddZZS)kb2sz* Conversion function: kbytes to sectors cstt|jddddS)Nrr)superr__init__)self) __class__#/usr/lib/python3.6/function_kb2s.pyr sz kb2s.__init__c sBtt|j|sdSytt|ddStk r<dSXdS)Nr)rrexecutestrint ValueError)rargs)r r r r s z kb2s.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZFunctionrr r r r s  PK$2]z0OOBprofiles/functions/__pycache__/function_strip.cpython-36.opt-1.pycnu[3 ddlZddlZddlmZddlmZGdddejZdS)N)base)commandscs,eZdZdZfddZfddZZS)stripz0 Makes string from all arguments and strip it cstt|jddddS)Nrrr)superr__init__)self) __class__$/usr/lib/python3.6/function_strip.pyr szstrip.__init__cs"tt|j|sdSdj|jS)N)rrexecutejoin)rargs)r r r r sz strip.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedr rZtuned.utils.commandsrZFunctionrr r r r s  PK$2]1?Kprofiles/functions/__pycache__/function_cpulist_invert.cpython-36.opt-1.pycnu[3 sz)cpulist_invert.execute..z,,)rrexecutejoinZ_cmd)rargs)r r r rszcpulist_invert.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZlogsgetlogZFunctionrr r r r s    PK$2]E.Lprofiles/functions/__pycache__/function_cpulist_present.cpython-36.opt-1.pycnu[3 sz*cpulist_present.execute..) rrexecuteZ_cmdZcpulist_unpackjoinZ read_filesortedlistset intersection)rargsZcpusZpresent)r r r rs zcpulist_present.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZlogsgetlogZFunctionrr r r r s    PK$2]nIIKprofiles/functions/__pycache__/function_cpulist_unpack.cpython-36.opt-1.pycnu[3 sz)cpulist_unpack.execute..z,,)rrexecutejoinZ_cmd)rargs)r r r rszcpulist_unpack.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZlogsgetlogZFunctionrr r r r s    PK$2]Eprofiles/functions/__pycache__/function_cpulist_online.cpython-36.pycnu[3 sz)cpulist_online.execute..)rrexecuteZ_cmdZcpulist_unpackjoinZ read_file)rargsZcpus)r )rr rs zcpulist_online.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZlogsgetlogZFunctionrr r r r s    PK$2]}22Jprofiles/functions/__pycache__/function_calc_isolated_cores.cpython-36.pycnu[3 s    PK$2]_>profiles/functions/__pycache__/repository.cpython-36.opt-1.pycnu[3 tjd|x*t|jjD]\}}||kr|j|=qWdS)Nzremoving function %s)rrlistr items)r Zfunctionkvr r r delete&szRepository.delete) __name__ __module__ __qualname__rpropertyrrrrr __classcell__r r )r r r s    r)Ztuned.utils.plugin_loaderrrZ tuned.logsrZ tuned.constsrZtuned.utils.commandsrZlogsgetrrr r r r s     PK$2]jTTLprofiles/functions/__pycache__/function_check_net_queue_count.cpython-36.pycnu[3 s  PK$2]ALQprofiles/functions/__pycache__/function_regex_search_ternary.cpython-36.opt-1.pycnu[3 s PK$2]5 Hprofiles/functions/__pycache__/function_cpulist2hex.cpython-36.opt-1.pycnu[3 s    PK$2]5 Bprofiles/functions/__pycache__/function_cpulist2hex.cpython-36.pycnu[3 s    PK$2]Af;;Bprofiles/functions/__pycache__/function_hex2cpulist.cpython-36.pycnu[3 sz&hex2cpulist.execute..r)rrexecutejoinZ_cmd)rargs)r r r rszhex2cpulist.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZlogsgetlogZFunctionrr r r r s    PK$2]k1Cprofiles/functions/__pycache__/function_cpulist_pack.cpython-36.pycnu[3 sz'cpulist_pack.execute..z,,)rrexecutejoinZ_cmd)rargs)r r r rszcpulist_pack.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZlogsgetlogZFunctionrr r r r s    PK$2]ACprofiles/functions/__pycache__/function_cpulist2devs.cpython-36.pycnu[3 s  PK$2]ށ||Oprofiles/functions/__pycache__/function_cpulist2hex_invert.cpython-36.opt-1.pycnu[3 tt|j|sdS|jjdjdd|jjdj|DS)N,css|]}t|VqdS)N)str).0vr r r sz-cpulist2hex_invert.execute..z,,)rrexecuteZ_cmdZ cpulist2hexjoinZcpulist_invert)rargs)r r r rszcpulist2hex_invert.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZlogsgetlogZFunctionrr r r r s    PK$2]Kprofiles/functions/__pycache__/function_cpulist_online.cpython-36.opt-1.pycnu[3 sz)cpulist_online.execute..)rrexecuteZ_cmdZcpulist_unpackjoinZ read_file)rargsZcpus)r )rr rs zcpulist_online.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZlogsgetlogZFunctionrr r r r s    PK$2]Jbo""Aprofiles/functions/__pycache__/function_virt_check.cpython-36.pycnu[3 ddlZddlZddlmZddlmZGdddejZdS)N)base)commandscs,eZdZdZfddZfddZZS) virt_checkz Checks whether running inside virtual machine (VM) or on bare metal. If running inside VM expands to argument 1, otherwise expands to argument 2 (even on error). cstt|jddddS)Nr)superr__init__)self) __class__)/usr/lib/python3.6/function_virt_check.pyr szvirt_check.__init__csJtt|j|sdS|jjdg\}}|dkrBt|dkrB|dS|dS)Nz virt-whatrr)rrexecuteZ_cmdlen)r argsretout)r r r r s zvirt_check.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZFunctionrr r r r s  PK$2]ށ||Iprofiles/functions/__pycache__/function_cpulist2hex_invert.cpython-36.pycnu[3 tt|j|sdS|jjdjdd|jjdj|DS)N,css|]}t|VqdS)N)str).0vr r r sz-cpulist2hex_invert.execute..z,,)rrexecuteZ_cmdZ cpulist2hexjoinZcpulist_invert)rargs)r r r rszcpulist2hex_invert.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZlogsgetlogZFunctionrr r r r s    PK$2][5Jprofiles/functions/__pycache__/function_cpuinfo_check.cpython-36.opt-1.pycnu[3 s  PK$2]3wB B =profiles/functions/__pycache__/functions.cpython-36.opt-1.pycnu[3 1sz+Functions._process_func..z\w+$rzinvalid function name '%s'zfunction '%s' not implemented) resplitrr matchlogerrorrZ load_func ImportErrorZexecuter)rZ_fromZslfrr r r _process_func-s  zFunctions._process_funcc Cs|j|x|j|jkr|jdkrpy|jj}Wn$tk rVtjd||j SX|ds|j |dn|j ddkr|j |j |jdkrd|_ nd |_ |jd7_q Wt|jrtjd ||j S) N}z.invalid variable syntax, non pair '}' in: '%s'rrr"z${\TFz.invalid variable syntax, non pair '{' in: '%s')rr rrrpop IndexErrorr&r'rr*rrrr)rrZsir r r _process?s&     zFunctions._processcCs(|dks|dkr|Stjdd|j|S)Nr z \\(\${f:.*})z\1)r#subr/)rrr r r expandVszFunctions.expandN)r ) __name__ __module__ __qualname____doc__r rrrrrr*r/r1r r r r r s r)osr#Zglobr rZ tuned.logsZtunedZ tuned.constsZconstsZtuned.utils.commandsrZlogsgetr&cmdrr r r r s    PK$2]AIprofiles/functions/__pycache__/function_cpulist2devs.cpython-36.opt-1.pycnu[3 s  PK$2] {{;profiles/functions/__pycache__/function_kb2s.cpython-36.pycnu[3 ddlZddlZddlmZddlmZGdddejZdS)N)base)commandscs,eZdZdZfddZfddZZS)kb2sz* Conversion function: kbytes to sectors cstt|jddddS)Nrr)superr__init__)self) __class__#/usr/lib/python3.6/function_kb2s.pyr sz kb2s.__init__c sBtt|j|sdSytt|ddStk r<dSXdS)Nr)rrexecutestrint ValueError)rargs)r r r r s z kb2s.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZFunctionrr r r r s  PK$2][5Dprofiles/functions/__pycache__/function_cpuinfo_check.cpython-36.pycnu[3 s  PK$2]Jbo""Gprofiles/functions/__pycache__/function_virt_check.cpython-36.opt-1.pycnu[3 ddlZddlZddlmZddlmZGdddejZdS)N)base)commandscs,eZdZdZfddZfddZZS) virt_checkz Checks whether running inside virtual machine (VM) or on bare metal. If running inside VM expands to argument 1, otherwise expands to argument 2 (even on error). cstt|jddddS)Nr)superr__init__)self) __class__)/usr/lib/python3.6/function_virt_check.pyr szvirt_check.__init__csJtt|j|sdS|jjdg\}}|dkrBt|dkrB|dS|dS)Nz virt-whatrr)rrexecuteZ_cmdlen)r argsretout)r r r r s zvirt_check.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZFunctionrr r r r s  PK$2]Af;;Hprofiles/functions/__pycache__/function_hex2cpulist.cpython-36.opt-1.pycnu[3 sz&hex2cpulist.execute..r)rrexecutejoinZ_cmd)rargs)r r r rszhex2cpulist.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZlogsgetlogZFunctionrr r r r s    PK$2]nIIEprofiles/functions/__pycache__/function_cpulist_unpack.cpython-36.pycnu[3 sz)cpulist_unpack.execute..z,,)rrexecutejoinZ_cmd)rargs)r r r rszcpulist_unpack.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZlogsgetlogZFunctionrr r r r s    PK$2]z0OO<profiles/functions/__pycache__/function_strip.cpython-36.pycnu[3 ddlZddlZddlmZddlmZGdddejZdS)N)base)commandscs,eZdZdZfddZfddZZS)stripz0 Makes string from all arguments and strip it cstt|jddddS)Nrrr)superr__init__)self) __class__$/usr/lib/python3.6/function_strip.pyr szstrip.__init__cs"tt|j|sdSdj|jS)N)rrexecutejoin)rargs)r r r r sz strip.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedr rZtuned.utils.commandsrZFunctionrr r r r s  PK$2]DFprofiles/functions/__pycache__/function_assertion.cpython-36.opt-1.pycnu[3 s     PK$2]338profiles/functions/__pycache__/repository.cpython-36.pycnu[3 s     PK$2]q{nnAprofiles/functions/__pycache__/function_exec.cpython-36.opt-1.pycnu[3 ddlZddlZddlmZddlmZGdddejZdS)N)base)commandscs,eZdZdZfddZfddZZS)executez0 Executes process and substitutes its output. cstt|jddddS)Nexecrr)superr__init__)self) __class__#/usr/lib/python3.6/function_exec.pyr szexecute.__init__cs4tt|j|sdS|jj|\}}|dkr0|SdS)Nr)rrZ_cmd)r argsretout)r r r rs zexecute.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZFunctionrr r r r s  PK$2]E.Fprofiles/functions/__pycache__/function_cpulist_present.cpython-36.pycnu[3 sz*cpulist_present.execute..) rrexecuteZ_cmdZcpulist_unpackjoinZ read_filesortedlistset intersection)rargsZcpusZpresent)r r r rs zcpulist_present.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZlogsgetlogZFunctionrr r r r s    PK$2]q{nn;profiles/functions/__pycache__/function_exec.cpython-36.pycnu[3 ddlZddlZddlmZddlmZGdddejZdS)N)base)commandscs,eZdZdZfddZfddZZS)executez0 Executes process and substitutes its output. cstt|jddddS)Nexecrr)superr__init__)self) __class__#/usr/lib/python3.6/function_exec.pyr szexecute.__init__cs4tt|j|sdS|jj|\}}|dkr0|SdS)Nr)rrZ_cmd)r argsretout)r r r rs zexecute.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZFunctionrr r r r s  PK$2]{IPprofiles/functions/__pycache__/function_assertion_non_equal.cpython-36.opt-1.pycnu[3 s     PK$2]3wB B 7profiles/functions/__pycache__/functions.cpython-36.pycnu[3 1sz+Functions._process_func..z\w+$rzinvalid function name '%s'zfunction '%s' not implemented) resplitrr matchlogerrorrZ load_func ImportErrorZexecuter)rZ_fromZslfrr r r _process_func-s  zFunctions._process_funcc Cs|j|x|j|jkr|jdkrpy|jj}Wn$tk rVtjd||j SX|ds|j |dn|j ddkr|j |j |jdkrd|_ nd |_ |jd7_q Wt|jrtjd ||j S) N}z.invalid variable syntax, non pair '}' in: '%s'rrr"z${\TFz.invalid variable syntax, non pair '{' in: '%s')rr rrrpop IndexErrorr&r'rr*rrrr)rrZsir r r _process?s&     zFunctions._processcCs(|dks|dkr|Stjdd|j|S)Nr z \\(\${f:.*})z\1)r#subr/)rrr r r expandVszFunctions.expandN)r ) __name__ __module__ __qualname____doc__r rrrrrr*r/r1r r r r r s r)osr#Zglobr rZ tuned.logsZtunedZ tuned.constsZconstsZtuned.utils.commandsrZlogsgetr&cmdrr r r r s    PK$2]!BAprofiles/functions/__pycache__/function_s2kb.cpython-36.opt-1.pycnu[3 ddlZddlZddlmZddlmZGdddejZdS)N)base)commandscs,eZdZdZfddZfddZZS)s2kbz* Conversion function: sectors to kbytes cstt|jddddS)Nrr)superr__init__)self) __class__#/usr/lib/python3.6/function_s2kb.pyr sz s2kb.__init__c sJtt|j|sdSytttt|ddStk rDdSXdS)Nr)rrexecutestrintround ValueError)rargs)r r r r s z s2kb.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZFunctionrr r r r s  PK$2]D@profiles/functions/__pycache__/function_assertion.cpython-36.pycnu[3 s     PK$2]}22Pprofiles/functions/__pycache__/function_calc_isolated_cores.cpython-36.opt-1.pycnu[3 s    PK$2]k1Iprofiles/functions/__pycache__/function_cpulist_pack.cpython-36.opt-1.pycnu[3 sz'cpulist_pack.execute..z,,)rrexecutejoinZ_cmd)rargs)r r r rszcpulist_pack.execute)__name__ __module__ __qualname____doc__rr __classcell__r r )r r rs r) osZ tuned.logsZtunedrZtuned.utils.commandsrZlogsgetlogZFunctionrr r r r s    PK$2]{IJprofiles/functions/__pycache__/function_assertion_non_equal.cpython-36.pycnu[3 s     PK$2]c.mm8profiles/functions/__pycache__/base.cpython-36.opt-1.pycnu[3 s  PK$2]m6profiles/functions/__pycache__/__init__.cpython-36.pycnu[3 sPK$2]ALKprofiles/functions/__pycache__/function_regex_search_ternary.cpython-36.pycnu[3 s PK$2]c.mm2profiles/functions/__pycache__/base.cpython-36.pycnu[3 s  PK$2]F(profiles/functions/function_assertion.pynu[import os import tuned.logs from . import base from tuned.utils.commands import commands from tuned.profiles.exceptions import InvalidProfileException log = tuned.logs.get() class assertion(base.Function): """ Assertion: compares argument 2 with argument 3. If they don't match it logs text from argument 1 and throws InvalidProfileException. This exception will abort profile loading. """ def __init__(self): # 3 arguments super(assertion, self).__init__("assertion", 3, 3) def execute(self, args): if not super(assertion, self).execute(args): return None if args[1] != args[2]: log.error("assertion '%s' failed: '%s' != '%s'" % (args[0], args[1], args[2])) raise InvalidProfileException("Assertion '%s' failed." % args[0]) return None PK$2]n,profiles/functions/function_cpuinfo_check.pynu[import re import tuned.logs from . import base log = tuned.logs.get() class cpuinfo_check(base.Function): """ Checks regexes against /proc/cpuinfo. Accepts arguments in the following form: REGEX1, STR1, REGEX2, STR2, ...[, STR_FALLBACK] If REGEX1 matches something in /proc/cpuinfo it expands to STR1, if REGEX2 matches it expands to STR2. It stops on the first match, i.e. if REGEX1 matches, no more regexes are processed. If none regex matches it expands to STR_FALLBACK. If there is no fallback, it expands to empty string. """ def __init__(self): # unlimited number of arguments, min 2 arguments super(cpuinfo_check, self).__init__("cpuinfo_check", 0, 2) def execute(self, args): if not super(cpuinfo_check, self).execute(args): return None cpuinfo = self._cmd.read_file("/proc/cpuinfo") for i in range(0, len(args), 2): if i + 1 < len(args): if re.search(args[i], cpuinfo, re.MULTILINE): return args[i + 1] if len(args) % 2: return args[-1] else: return "" PK$2]Ԇ#profiles/functions/function_s2kb.pynu[import os import tuned.logs from . import base from tuned.utils.commands import commands class s2kb(base.Function): """ Conversion function: sectors to kbytes """ def __init__(self): # 1 argument super(s2kb, self).__init__("s2kb", 1, 1) def execute(self, args): if not super(s2kb, self).execute(args): return None try: return str(int(round(int(args[0]) / 2))) except ValueError: return None PK$2]f}}+profiles/functions/function_cpulist_pack.pynu[import os import tuned.logs from . import base from tuned.utils.commands import commands log = tuned.logs.get() class cpulist_pack(base.Function): """ Conversion function: packs CPU list in form 1,2,3,5 to 1-3,5. The cpulist_unpack is used as a preprocessor, so it always returns optimal results. For details about input syntax see cpulist_unpack. """ def __init__(self): # arbitrary number of arguments super(cpulist_pack, self).__init__("cpulist_pack", 0) def execute(self, args): if not super(cpulist_pack, self).execute(args): return None return ",".join(str(v) for v in self._cmd.cpulist_pack(",,".join(args))) PK$2]0Nkk2profiles/functions/function_calc_isolated_cores.pynu[import os import glob import tuned.logs from . import base import tuned.consts as consts log = tuned.logs.get() class calc_isolated_cores(base.Function): """ Calculates and returns isolated cores. The argument specifies how many cores per socket reserve for housekeeping. If not specified, 1 core per socket is reserved for housekeeping and the rest is isolated. """ def __init__(self): # max 1 argument super(calc_isolated_cores, self).__init__("calc_isolated_cores", 1) def execute(self, args): if not super(calc_isolated_cores, self).execute(args): return None cpus_reserve = 1 if len(args) > 0: if not args[0].isdecimal() or int(args[0]) < 0: log.error("invalid argument '%s' for builtin function '%s', it must be non-negative integer" % (args[0], self._name)) return None else: cpus_reserve = int(args[0]) topo = {} for cpu in glob.iglob(os.path.join(consts.SYSFS_CPUS_PATH, "cpu*")): cpuid = os.path.basename(cpu)[3:] if cpuid.isdecimal(): physical_package_id = os.path.join(cpu, "topology/physical_package_id") # Show no errors when the physical_package_id file does not exist -- the CPU may be offline. if not os.path.exists(physical_package_id): log.debug("file '%s' does not exist, cpu%s offline?" % (physical_package_id, cpuid)) continue socket = self._cmd.read_file(physical_package_id).strip() if socket.isdecimal(): topo[socket] = topo.get(socket, []) + [cpuid] isol_cpus = [] for cpus in topo.values(): cpus.sort(key = int) isol_cpus = isol_cpus + cpus[cpus_reserve:] isol_cpus.sort(key = int) return ",".join(isol_cpus) PK$2]RU.profiles/functions/function_cpulist_present.pynu[import os import tuned.logs from . import base from tuned.utils.commands import commands log = tuned.logs.get() class cpulist_present(base.Function): """ Checks whether CPUs from list are present, returns list containing only present CPUs """ def __init__(self): # arbitrary number of arguments super(cpulist_present, self).__init__("cpulist_present", 0) def execute(self, args): if not super(cpulist_present, self).execute(args): return None cpus = self._cmd.cpulist_unpack(",,".join(args)) present = self._cmd.cpulist_unpack(self._cmd.read_file("/sys/devices/system/cpu/present")) return ",".join(str(v) for v in sorted(list(set(cpus).intersection(set(present))))) PK$2]w+bbprofiles/functions/functions.pynu[import os import re import glob from . import repository import tuned.logs import tuned.consts as consts from tuned.utils.commands import commands log = tuned.logs.get() cmd = commands() class Functions(): """ Built-in functions """ def __init__(self): self._repository = repository.Repository() self._parse_init() def _parse_init(self, s = ""): self._cnt = 0 self._str = s self._len = len(s) self._stack = [] self._esc = False def _curr_char(self): return self._str[self._cnt] if self._cnt < self._len else "" def _curr_substr(self, _len): return self._str[self._cnt:self._cnt + _len] def _push_pos(self, esc): self._stack.append((esc, self._cnt)) def _sub(self, a, b, s): self._str = self._str[:a] + s + self._str[b + 1:] self._len = len(self._str) self._cnt += len(s) - (b - a + 1) if self._cnt < 0: self._cnt = 0 def _process_func(self, _from): sl = re.split(r'(? 0: return args[0] return args[1] PK$2](o#profiles/functions/function_kb2s.pynu[import os import tuned.logs from . import base from tuned.utils.commands import commands class kb2s(base.Function): """ Conversion function: kbytes to sectors """ def __init__(self): # 1 argument super(kb2s, self).__init__("kb2s", 1, 1) def execute(self, args): if not super(kb2s, self).execute(args): return None try: return str(int(args[0]) * 2) except ValueError: return None PK$2]{k**3profiles/functions/function_regex_search_ternary.pynu[import re from . import base class regex_search_ternary(base.Function): """ Ternary regex operator, it takes arguments in the following form STR1, REGEX, STR2, STR3 If REGEX matches STR1 (re.search is used), STR2 is returned, otherwise STR3 is returned """ def __init__(self): # 4 arguments super(regex_search_ternary, self).__init__("regex_search_ternary", 4, 4) def execute(self, args): if not super(regex_search_ternary, self).execute(args): return None if re.search(args[1], args[0]): return args[2] else: return args[3] PK$2]mg$profiles/functions/function_strip.pynu[import os import tuned.logs from . import base from tuned.utils.commands import commands class strip(base.Function): """ Makes string from all arguments and strip it """ def __init__(self): # unlimited number of arguments, min 1 argument super(strip, self).__init__("strip", 0, 1) def execute(self, args): if not super(strip, self).execute(args): return None return "".join(args).strip() PK$2]QW##profiles/functions/__init__.pynu[from .repository import Repository PK$2]profiles/merger.pynu[import collections from functools import reduce class Merger(object): """ Tool for merging multiple profiles into one. """ def __init__(self): pass def merge(self, configs): """ Merge multiple configurations into one. If there are multiple units of the same type, option 'devices' is set for each unit with respect to eliminating any duplicate devices. """ merged_config = reduce(self._merge_two, configs) return merged_config def _merge_two(self, profile_a, profile_b): """ Merge two profiles. The configuration of units with matching names are updated with options from the newer profile. If the 'replace' options of the newer unit is 'True', all options from the older unit are dropped. """ profile_a.options.update(profile_b.options) for unit_name, unit in list(profile_b.units.items()): if unit.replace or unit_name not in profile_a.units: profile_a.units[unit_name] = unit else: profile_a.units[unit_name].type = unit.type profile_a.units[unit_name].enabled = unit.enabled profile_a.units[unit_name].devices = unit.devices if unit.devices_udev_regex is not None: profile_a.units[unit_name].devices_udev_regex = unit.devices_udev_regex if unit.cpuinfo_regex is not None: profile_a.units[unit_name].cpuinfo_regex = unit.cpuinfo_regex if unit.uname_regex is not None: profile_a.units[unit_name].uname_regex = unit.uname_regex if unit.script_pre is not None: profile_a.units[unit_name].script_pre = unit.script_pre if unit.script_post is not None: profile_a.units[unit_name].script_post = unit.script_post if unit.drop is not None: for option in unit.drop: profile_a.units[unit_name].options.pop(option, None) unit.drop = None if unit_name == "script" and profile_a.units[unit_name].options.get("script", None) is not None: script = profile_a.units[unit_name].options.get("script", None) profile_a.units[unit_name].options.update(unit.options) profile_a.units[unit_name].options["script"] = script + profile_a.units[unit_name].options["script"] else: profile_a.units[unit_name].options.update(unit.options) return profile_a PK$2]__profiles/exceptions.pynu[import tuned.exceptions class InvalidProfileException(tuned.exceptions.TunedException): pass PK$2]|profiles/loader.pynu[import tuned.profiles.profile import tuned.profiles.variables from tuned.utils.config_parser import ConfigParser, Error import tuned.consts as consts import os.path import collections import tuned.logs import re from tuned.profiles.exceptions import InvalidProfileException log = tuned.logs.get() class Loader(object): """ Profiles loader. """ __slots__ = ["_profile_locator", "_profile_merger", "_profile_factory", "_global_config", "_variables"] def __init__(self, profile_locator, profile_factory, profile_merger, global_config, variables): self._profile_locator = profile_locator self._profile_factory = profile_factory self._profile_merger = profile_merger self._global_config = global_config self._variables = variables def _create_profile(self, profile_name, config): return tuned.profiles.profile.Profile(profile_name, config) @classmethod def safe_name(cls, profile_name): return re.match(r'^[a-zA-Z0-9_.-]+$', profile_name) @property def profile_locator(self): return self._profile_locator def load(self, profile_names): if type(profile_names) is not list: profile_names = profile_names.split() profile_names = list(filter(self.safe_name, profile_names)) if len(profile_names) == 0: raise InvalidProfileException("No profile or invalid profiles were specified.") if len(profile_names) > 1: log.info("loading profiles: %s" % ", ".join(profile_names)) else: log.info("loading profile: %s" % profile_names[0]) profiles = [] processed_files = [] self._load_profile(profile_names, profiles, processed_files) if len(profiles) > 1: final_profile = self._profile_merger.merge(profiles) else: final_profile = profiles[0] final_profile.name = " ".join(profile_names) if "variables" in final_profile.units: self._variables.add_from_cfg(final_profile.units["variables"].options) del(final_profile.units["variables"]) # FIXME hack, do all variable expansions in one place self._expand_vars_in_devices(final_profile) self._expand_vars_in_regexes(final_profile) return final_profile def _expand_vars_in_devices(self, profile): for unit in profile.units: profile.units[unit].devices = self._variables.expand(profile.units[unit].devices) def _expand_vars_in_regexes(self, profile): for unit in profile.units: profile.units[unit].cpuinfo_regex = self._variables.expand(profile.units[unit].cpuinfo_regex) profile.units[unit].uname_regex = self._variables.expand(profile.units[unit].uname_regex) def _load_profile(self, profile_names, profiles, processed_files): for name in profile_names: filename = self._profile_locator.get_config(name, processed_files) if filename == "": continue if filename is None: raise InvalidProfileException("Cannot find profile '%s' in '%s'." % (name, list(reversed(self._profile_locator._load_directories)))) processed_files.append(filename) config = self._load_config_data(filename) profile = self._profile_factory.create(name, config) if "include" in profile.options: include_names = re.split(r"\s*[,;]\s*", self._variables.expand(profile.options.pop("include"))) self._load_profile(include_names, profiles, processed_files) profiles.append(profile) def _expand_profile_dir(self, profile_dir, string): return re.sub(r'(?ZLOG_FILEZLOG_FILE_MAXBYTESZLOG_FILE_COUNTrIr3 classmethodrBrD __classcell__rr)r<r r6Xs   r6) atexitrZlogging.handlersrMZos.pathr.Z tuned.constsr>rrZ threadingrio__all__r rZLockrobjectrrr%r*rZgetLoggerClassr6Z addLevelNamer?ZLOG_LEVEL_CONSOLE_NAMEZsetLoggerClassregisterZshutdownrrrr s4  6 PK$2]3>#__pycache__/patterns.cpython-36.pycnu[3 sPK$2]gt)__pycache__/__init__.cpython-36.opt-1.pycnu[3 sPK$2]Knm"__pycache__/version.cpython-36.pycnu[3 sPK$2]vdwP!__pycache__/consts.cpython-36.pycnu[3 j`@sddlZddlZejejddZdZdZdZdZdZ d Z d Z d Z d Z e Zd ZdZdZdZddgZdZdZdZddgZdZdZdZddgZdZdZedeZd ed!Zd"ed!Z d#Z!d$Z"d%Z#dZ$d&Z%d'Z&d(Z'd)Z(d*Z)d+Z*d,Z+d-Z,d.Z-d/Z.d0Z/d1Z0d2Z1d3Z2d4Z3d5Z4d6Z5d7Z6d8Z7d9Z8d:Z9d}Z:d=Z;d>ZdAZ?dZ@dBZAd:ZBdCZCdDZDdEZEeEZFdFZGeFZHdGZIdHZJdIZKdJZLdKZMdLZNdMZOdNZPdOZQdPZRdQZSdRZTdSZUdTZVdUZWdVZXdWZYdXZZdYZ[dZZ\d[Z]d\Z^d]Z_d^Z`d]Zad^ZbdBZcd_Zdd.Zed_Zfd]Zgd^Zhd]Zid^ZjdZkd_Zld~Zmd:Znd_ZodZpd]Zqd^ZrdaZsd^ZtdbZudcZvddZwdeZxdfZyd_ZzdgZ{dhZ|diZ}djZ~dkZdlZdmZdnZdoZdpZdqZdrZdsZdtZduZdvZdwZdgZdxZdyZdzZd{Zejejejejedd|ZdS)Nz !@'+-.,/:;_$&*()%<=>?#[]{|}^~"iz/etc/tuned/tuned-main.confz/etc/tuned/active_profilez/etc/tuned/profile_modez/etc/tuned/post_loaded_profilez tuned.confz/etc/tuned/recommend.confzcom.redhat.tunedzcom.redhat.tuned.controlz/TunedZbalancedz/run/tuned/save.picklez/usr/lib/tunedz /etc/tunedz/var/lib/tunedmainZ:this_is_some_magic_section_header_because_of_compatibilityz/usr/lib/tuned/recommend.dz/etc/tuned/recommend.dz.tmpz/bootz/etc/grub2.cfgz/etc/grub2-efi.cfgz /etc/grub.dZ00_tuned/z### BEGIN /etc/grub.d/z ###z### END /etc/grub.d/Z tuned_paramsZ tuned_initrdz/etc/default/grubZTUNED_BOOT_CMDLINEZTUNED_BOOT_INITRD_ADDZTUNED_BOOT_KARGS_DELETEDz/etc/tuned/bootcmdlinez/sys/firmware/opalz/etc/machine-idz*/usr/lib/kernel/install.d/92-tuned.installz/boot/loader/entries z/procz/sys/fs/cgroup/cpusetiz /etc/systemd/system/%s.service.diz/etc/modprobe.d/tuned.confz/etc/systemd/system.confZ CPUAffinityz/etc/sysconfig/irqbalancez/sys/firmware/acpiz/sys/devices/system/cpudiz/var/log/tuned/tuned.logz/run/tuned/tuned.pidz/etc/system-release-cpeZ function_ZTUNED_ZSystemZUserznet.hadess.PowerProfilesz/net/hadess/PowerProfilesz/etc/tuned/ppd.confZdaemonZdynamic_tuningZsleep_intervalZupdate_intervalZrecommend_commandZreapply_sysctlZdefault_instance_priorityZudev_buffer_sizeZlog_file_countZlog_file_max_sizeZ uname_stringZcpuinfo_stringZ enable_dbusZenable_unix_socketZunix_socket_pathZunix_socket_signal_pathsZunix_socket_ownershipZunix_socket_permissionsZconnections_backlogZhwp_eppZrollbackTZ getbooleanZgetintiFz/run/tuned/tuned.sockz-1 -1Z0o600Z1024autoz/dev/cpu_dma_latencyZsummary descriptionZprofile_changedz-you need to reboot for changes to take effectz&verify: passed: device %s: '%s' = '%s'zverify: passed: '%s' = '%s'zverify: passed: '%s'z)verify: skipped, missing: device %s: '%s'zverify: skipped, missing: '%s'z5verify: failed: device %s: '%s' = '%s', expected '%s'z*verify: failed: '%s' = '%s', expected '%s'z/verify: failed: cmdline arg '%s', expected '%s'z:verify: failed: cmdline arg '%s' is missing, expected '%s'zverify: failed: '%s'iXZmanual<ZCONSOLEconsole)debuginfowarnerrorrZnoneiii)ZloggingstringZ ascii_lettersZdigitsZNAMES_ALLOWED_CHARSZNAMES_MAX_LENGTHZGLOBAL_CONFIG_FILEZACTIVE_PROFILE_FILEZPROFILE_MODE_FILEZPOST_LOADED_PROFILE_FILEZ PROFILE_FILEZRECOMMEND_CONF_FILEZDAEMONIZE_PARENT_TIMEOUTZ NAMESPACEZDBUS_BUSZDBUS_INTERFACEZ DBUS_OBJECTZDEFAULT_PROFILEZDEFAULT_STORAGE_FILEZLOAD_DIRECTORIESZPERSISTENT_STORAGE_DIRZPLUGIN_MAIN_UNIT_NAMEZMAGIC_HEADER_NAMEZRECOMMEND_DIRECTORIESZTMP_FILE_SUFFIXZERROR_THRESHOLDZBOOT_DIRZGRUB2_CFG_FILESZ GRUB2_CFG_DIRZGRUB2_TUNED_TEMPLATE_NAMEZGRUB2_TUNED_TEMPLATE_PATHZGRUB2_TEMPLATE_HEADER_BEGINZGRUB2_TEMPLATE_HEADER_ENDZGRUB2_TUNED_VARZGRUB2_TUNED_INITRD_VARZGRUB2_DEFAULT_ENV_FILEZINITRD_IMAGE_DIRZBOOT_CMDLINE_TUNED_VARZBOOT_CMDLINE_INITRD_ADD_VARZBOOT_CMDLINE_KARGS_DELETED_VARZBOOT_CMDLINE_FILEZPETITBOOT_DETECT_DIRZMACHINE_ID_FILEZKERNEL_UPDATE_HOOK_FILEZBLS_ENTRIES_PATHZCGROUP_CLEANUP_TASKS_RETRYZPROCFS_MOUNT_POINTZDEF_CGROUP_MOUNT_POINTZDEF_CGROUP_MODEZSERVICE_SYSTEMD_CFG_PATHZDEF_SERVICE_CFG_DIR_MODEZ MODULES_FILEZSYSTEMD_SYSTEM_CONF_FILEZSYSTEMD_CPUAFFINITY_VARZIRQBALANCE_SYSCONFIG_FILEZACPI_DIRZSYSFS_CPUS_PATHZLOG_FILE_COUNTZLOG_FILE_MAXBYTESZLOG_FILEZPID_FILEZSYSTEM_RELEASE_FILEZFUNCTION_PREFIXZ ENV_PREFIXZ ROLLBACK_NONEZ ROLLBACK_SOFTZ ROLLBACK_FULLZPREFIX_PROFILE_FACTORYZPREFIX_PROFILE_USERZ PPD_NAMESPACEZ PPD_DBUS_BUSZPPD_DBUS_OBJECTZPPD_DBUS_INTERFACEZPPD_CONFIG_FILEZ CFG_DAEMONZCFG_DYNAMIC_TUNINGZCFG_SLEEP_INTERVALZCFG_UPDATE_INTERVALZCFG_RECOMMEND_COMMANDZCFG_REAPPLY_SYSCTLZCFG_DEFAULT_INSTANCE_PRIORITYZCFG_UDEV_BUFFER_SIZEZCFG_LOG_FILE_COUNTZCFG_LOG_FILE_MAX_SIZEZCFG_UNAME_STRINGZCFG_CPUINFO_STRINGZCFG_ENABLE_DBUSZCFG_ENABLE_UNIX_SOCKETZCFG_UNIX_SOCKET_PATHZCFG_UNIX_SOCKET_SIGNAL_PATHSZCFG_UNIX_SOCKET_OWNERSHIPZCFG_UNIX_SOCKET_PERMISIONSZ#CFG_UNIX_SOCKET_CONNECTIONS_BACKLOGZCFG_CPU_EPP_FLAGZ CFG_ROLLBACKZCFG_DEF_DAEMONZCFG_FUNC_DAEMONZCFG_DEF_DYNAMIC_TUNINGZCFG_FUNC_DYNAMIC_TUNINGZCFG_DEF_SLEEP_INTERVALZCFG_FUNC_SLEEP_INTERVALZCFG_DEF_UPDATE_INTERVALZCFG_FUNC_UPDATE_INTERVALZCFG_DEF_RECOMMEND_COMMANDZCFG_FUNC_RECOMMEND_COMMANDZCFG_DEF_REAPPLY_SYSCTLZCFG_FUNC_REAPPLY_SYSCTLZ!CFG_DEF_DEFAULT_INSTANCE_PRIORITYZ"CFG_FUNC_DEFAULT_INSTANCE_PRIORITYZCFG_DEF_UDEV_BUFFER_SIZEZCFG_DEF_LOG_FILE_COUNTZCFG_FUNC_LOG_FILE_COUNTZCFG_DEF_LOG_FILE_MAX_SIZEZCFG_DEF_ENABLE_DBUSZCFG_FUNC_ENABLE_DBUSZCFG_DEF_ENABLE_UNIX_SOCKETZCFG_FUNC_ENABLE_UNIX_SOCKETZCFG_DEF_UNIX_SOCKET_PATHZ CFG_DEF_UNIX_SOCKET_SIGNAL_PATHSZCFG_DEF_UNIX_SOCKET_OWNERSHIPZCFG_DEF_UNIX_SOCKET_PERMISIONSZ'CFG_DEF_UNIX_SOCKET_CONNECTIONS_BACKLOGZ(CFG_FUNC_UNIX_SOCKET_CONNECTIONS_BACKLOGZCFG_DEF_ROLLBACKZPATH_CPU_DMA_LATENCYZPROFILE_ATTR_SUMMARYZPROFILE_ATTR_DESCRIPTIONZSIGNAL_PROFILE_CHANGEDZSTR_HINT_REBOOTZ"STR_VERIFY_PROFILE_DEVICE_VALUE_OKZSTR_VERIFY_PROFILE_VALUE_OKZSTR_VERIFY_PROFILE_OKZ'STR_VERIFY_PROFILE_DEVICE_VALUE_MISSINGZ STR_VERIFY_PROFILE_VALUE_MISSINGZ$STR_VERIFY_PROFILE_DEVICE_VALUE_FAILZSTR_VERIFY_PROFILE_VALUE_FAILZSTR_VERIFY_PROFILE_CMDLINE_FAILZ'STR_VERIFY_PROFILE_CMDLINE_FAIL_MISSINGZSTR_VERIFY_PROFILE_FAILZ ADMIN_TIMEOUTZACTIVE_PROFILE_AUTOZACTIVE_PROFILE_MANUALZLOG_LEVEL_CONSOLEZLOG_LEVEL_CONSOLE_NAMEZCAPTURE_LOG_LEVELDEBUGINFOZWARNZERRORZCAPTURE_LOG_LEVELSrr/usr/lib/python3.6/consts.pys(   PK$2]*v+__pycache__/exceptions.cpython-36.opt-1.pycnu[3 s PK$2]vdwP'__pycache__/consts.cpython-36.opt-1.pycnu[3 j`@sddlZddlZejejddZdZdZdZdZdZ d Z d Z d Z d Z e Zd ZdZdZdZddgZdZdZdZddgZdZdZdZddgZdZdZedeZd ed!Zd"ed!Z d#Z!d$Z"d%Z#dZ$d&Z%d'Z&d(Z'd)Z(d*Z)d+Z*d,Z+d-Z,d.Z-d/Z.d0Z/d1Z0d2Z1d3Z2d4Z3d5Z4d6Z5d7Z6d8Z7d9Z8d:Z9d}Z:d=Z;d>ZdAZ?dZ@dBZAd:ZBdCZCdDZDdEZEeEZFdFZGeFZHdGZIdHZJdIZKdJZLdKZMdLZNdMZOdNZPdOZQdPZRdQZSdRZTdSZUdTZVdUZWdVZXdWZYdXZZdYZ[dZZ\d[Z]d\Z^d]Z_d^Z`d]Zad^ZbdBZcd_Zdd.Zed_Zfd]Zgd^Zhd]Zid^ZjdZkd_Zld~Zmd:Znd_ZodZpd]Zqd^ZrdaZsd^ZtdbZudcZvddZwdeZxdfZyd_ZzdgZ{dhZ|diZ}djZ~dkZdlZdmZdnZdoZdpZdqZdrZdsZdtZduZdvZdwZdgZdxZdyZdzZd{Zejejejejedd|ZdS)Nz !@'+-.,/:;_$&*()%<=>?#[]{|}^~"iz/etc/tuned/tuned-main.confz/etc/tuned/active_profilez/etc/tuned/profile_modez/etc/tuned/post_loaded_profilez tuned.confz/etc/tuned/recommend.confzcom.redhat.tunedzcom.redhat.tuned.controlz/TunedZbalancedz/run/tuned/save.picklez/usr/lib/tunedz /etc/tunedz/var/lib/tunedmainZ:this_is_some_magic_section_header_because_of_compatibilityz/usr/lib/tuned/recommend.dz/etc/tuned/recommend.dz.tmpz/bootz/etc/grub2.cfgz/etc/grub2-efi.cfgz /etc/grub.dZ00_tuned/z### BEGIN /etc/grub.d/z ###z### END /etc/grub.d/Z tuned_paramsZ tuned_initrdz/etc/default/grubZTUNED_BOOT_CMDLINEZTUNED_BOOT_INITRD_ADDZTUNED_BOOT_KARGS_DELETEDz/etc/tuned/bootcmdlinez/sys/firmware/opalz/etc/machine-idz*/usr/lib/kernel/install.d/92-tuned.installz/boot/loader/entries z/procz/sys/fs/cgroup/cpusetiz /etc/systemd/system/%s.service.diz/etc/modprobe.d/tuned.confz/etc/systemd/system.confZ CPUAffinityz/etc/sysconfig/irqbalancez/sys/firmware/acpiz/sys/devices/system/cpudiz/var/log/tuned/tuned.logz/run/tuned/tuned.pidz/etc/system-release-cpeZ function_ZTUNED_ZSystemZUserznet.hadess.PowerProfilesz/net/hadess/PowerProfilesz/etc/tuned/ppd.confZdaemonZdynamic_tuningZsleep_intervalZupdate_intervalZrecommend_commandZreapply_sysctlZdefault_instance_priorityZudev_buffer_sizeZlog_file_countZlog_file_max_sizeZ uname_stringZcpuinfo_stringZ enable_dbusZenable_unix_socketZunix_socket_pathZunix_socket_signal_pathsZunix_socket_ownershipZunix_socket_permissionsZconnections_backlogZhwp_eppZrollbackTZ getbooleanZgetintiFz/run/tuned/tuned.sockz-1 -1Z0o600Z1024autoz/dev/cpu_dma_latencyZsummary descriptionZprofile_changedz-you need to reboot for changes to take effectz&verify: passed: device %s: '%s' = '%s'zverify: passed: '%s' = '%s'zverify: passed: '%s'z)verify: skipped, missing: device %s: '%s'zverify: skipped, missing: '%s'z5verify: failed: device %s: '%s' = '%s', expected '%s'z*verify: failed: '%s' = '%s', expected '%s'z/verify: failed: cmdline arg '%s', expected '%s'z:verify: failed: cmdline arg '%s' is missing, expected '%s'zverify: failed: '%s'iXZmanual<ZCONSOLEconsole)debuginfowarnerrorrZnoneiii)ZloggingstringZ ascii_lettersZdigitsZNAMES_ALLOWED_CHARSZNAMES_MAX_LENGTHZGLOBAL_CONFIG_FILEZACTIVE_PROFILE_FILEZPROFILE_MODE_FILEZPOST_LOADED_PROFILE_FILEZ PROFILE_FILEZRECOMMEND_CONF_FILEZDAEMONIZE_PARENT_TIMEOUTZ NAMESPACEZDBUS_BUSZDBUS_INTERFACEZ DBUS_OBJECTZDEFAULT_PROFILEZDEFAULT_STORAGE_FILEZLOAD_DIRECTORIESZPERSISTENT_STORAGE_DIRZPLUGIN_MAIN_UNIT_NAMEZMAGIC_HEADER_NAMEZRECOMMEND_DIRECTORIESZTMP_FILE_SUFFIXZERROR_THRESHOLDZBOOT_DIRZGRUB2_CFG_FILESZ GRUB2_CFG_DIRZGRUB2_TUNED_TEMPLATE_NAMEZGRUB2_TUNED_TEMPLATE_PATHZGRUB2_TEMPLATE_HEADER_BEGINZGRUB2_TEMPLATE_HEADER_ENDZGRUB2_TUNED_VARZGRUB2_TUNED_INITRD_VARZGRUB2_DEFAULT_ENV_FILEZINITRD_IMAGE_DIRZBOOT_CMDLINE_TUNED_VARZBOOT_CMDLINE_INITRD_ADD_VARZBOOT_CMDLINE_KARGS_DELETED_VARZBOOT_CMDLINE_FILEZPETITBOOT_DETECT_DIRZMACHINE_ID_FILEZKERNEL_UPDATE_HOOK_FILEZBLS_ENTRIES_PATHZCGROUP_CLEANUP_TASKS_RETRYZPROCFS_MOUNT_POINTZDEF_CGROUP_MOUNT_POINTZDEF_CGROUP_MODEZSERVICE_SYSTEMD_CFG_PATHZDEF_SERVICE_CFG_DIR_MODEZ MODULES_FILEZSYSTEMD_SYSTEM_CONF_FILEZSYSTEMD_CPUAFFINITY_VARZIRQBALANCE_SYSCONFIG_FILEZACPI_DIRZSYSFS_CPUS_PATHZLOG_FILE_COUNTZLOG_FILE_MAXBYTESZLOG_FILEZPID_FILEZSYSTEM_RELEASE_FILEZFUNCTION_PREFIXZ ENV_PREFIXZ ROLLBACK_NONEZ ROLLBACK_SOFTZ ROLLBACK_FULLZPREFIX_PROFILE_FACTORYZPREFIX_PROFILE_USERZ PPD_NAMESPACEZ PPD_DBUS_BUSZPPD_DBUS_OBJECTZPPD_DBUS_INTERFACEZPPD_CONFIG_FILEZ CFG_DAEMONZCFG_DYNAMIC_TUNINGZCFG_SLEEP_INTERVALZCFG_UPDATE_INTERVALZCFG_RECOMMEND_COMMANDZCFG_REAPPLY_SYSCTLZCFG_DEFAULT_INSTANCE_PRIORITYZCFG_UDEV_BUFFER_SIZEZCFG_LOG_FILE_COUNTZCFG_LOG_FILE_MAX_SIZEZCFG_UNAME_STRINGZCFG_CPUINFO_STRINGZCFG_ENABLE_DBUSZCFG_ENABLE_UNIX_SOCKETZCFG_UNIX_SOCKET_PATHZCFG_UNIX_SOCKET_SIGNAL_PATHSZCFG_UNIX_SOCKET_OWNERSHIPZCFG_UNIX_SOCKET_PERMISIONSZ#CFG_UNIX_SOCKET_CONNECTIONS_BACKLOGZCFG_CPU_EPP_FLAGZ CFG_ROLLBACKZCFG_DEF_DAEMONZCFG_FUNC_DAEMONZCFG_DEF_DYNAMIC_TUNINGZCFG_FUNC_DYNAMIC_TUNINGZCFG_DEF_SLEEP_INTERVALZCFG_FUNC_SLEEP_INTERVALZCFG_DEF_UPDATE_INTERVALZCFG_FUNC_UPDATE_INTERVALZCFG_DEF_RECOMMEND_COMMANDZCFG_FUNC_RECOMMEND_COMMANDZCFG_DEF_REAPPLY_SYSCTLZCFG_FUNC_REAPPLY_SYSCTLZ!CFG_DEF_DEFAULT_INSTANCE_PRIORITYZ"CFG_FUNC_DEFAULT_INSTANCE_PRIORITYZCFG_DEF_UDEV_BUFFER_SIZEZCFG_DEF_LOG_FILE_COUNTZCFG_FUNC_LOG_FILE_COUNTZCFG_DEF_LOG_FILE_MAX_SIZEZCFG_DEF_ENABLE_DBUSZCFG_FUNC_ENABLE_DBUSZCFG_DEF_ENABLE_UNIX_SOCKETZCFG_FUNC_ENABLE_UNIX_SOCKETZCFG_DEF_UNIX_SOCKET_PATHZ CFG_DEF_UNIX_SOCKET_SIGNAL_PATHSZCFG_DEF_UNIX_SOCKET_OWNERSHIPZCFG_DEF_UNIX_SOCKET_PERMISIONSZ'CFG_DEF_UNIX_SOCKET_CONNECTIONS_BACKLOGZ(CFG_FUNC_UNIX_SOCKET_CONNECTIONS_BACKLOGZCFG_DEF_ROLLBACKZPATH_CPU_DMA_LATENCYZPROFILE_ATTR_SUMMARYZPROFILE_ATTR_DESCRIPTIONZSIGNAL_PROFILE_CHANGEDZSTR_HINT_REBOOTZ"STR_VERIFY_PROFILE_DEVICE_VALUE_OKZSTR_VERIFY_PROFILE_VALUE_OKZSTR_VERIFY_PROFILE_OKZ'STR_VERIFY_PROFILE_DEVICE_VALUE_MISSINGZ STR_VERIFY_PROFILE_VALUE_MISSINGZ$STR_VERIFY_PROFILE_DEVICE_VALUE_FAILZSTR_VERIFY_PROFILE_VALUE_FAILZSTR_VERIFY_PROFILE_CMDLINE_FAILZ'STR_VERIFY_PROFILE_CMDLINE_FAIL_MISSINGZSTR_VERIFY_PROFILE_FAILZ ADMIN_TIMEOUTZACTIVE_PROFILE_AUTOZACTIVE_PROFILE_MANUALZLOG_LEVEL_CONSOLEZLOG_LEVEL_CONSOLE_NAMEZCAPTURE_LOG_LEVELDEBUGINFOZWARNZERRORZCAPTURE_LOG_LEVELSrr/usr/lib/python3.6/consts.pys(   PK$2]*v%__pycache__/exceptions.cpython-36.pycnu[3 s PK$2]3>)__pycache__/patterns.cpython-36.opt-1.pycnu[3 sPK$2]Knm(__pycache__/version.cpython-36.opt-1.pycnu[3 sPK$2]^{2__pycache__/logs.cpython-36.pycnu[3 s4  6 PK$2]gt#__pycache__/__init__.cpython-36.pycnu[3 sPK$2]}`` consts.pynu[import logging import string NAMES_ALLOWED_CHARS = string.ascii_letters + string.digits + " !@'+-.,/:;_$&*()%<=>?#[]{|}^~" + '"' NAMES_MAX_LENGTH = 4096 GLOBAL_CONFIG_FILE = "/etc/tuned/tuned-main.conf" ACTIVE_PROFILE_FILE = "/etc/tuned/active_profile" PROFILE_MODE_FILE = "/etc/tuned/profile_mode" POST_LOADED_PROFILE_FILE = "/etc/tuned/post_loaded_profile" PROFILE_FILE = "tuned.conf" RECOMMEND_CONF_FILE = "/etc/tuned/recommend.conf" DAEMONIZE_PARENT_TIMEOUT = 5 NAMESPACE = "com.redhat.tuned" DBUS_BUS = NAMESPACE DBUS_INTERFACE = "com.redhat.tuned.control" DBUS_OBJECT = "/Tuned" DEFAULT_PROFILE = "balanced" DEFAULT_STORAGE_FILE = "/run/tuned/save.pickle" LOAD_DIRECTORIES = ["/usr/lib/tuned", "/etc/tuned"] PERSISTENT_STORAGE_DIR = "/var/lib/tuned" PLUGIN_MAIN_UNIT_NAME = "main" # Magic section header because ConfigParser does not support "headerless" config MAGIC_HEADER_NAME = "this_is_some_magic_section_header_because_of_compatibility" RECOMMEND_DIRECTORIES = ["/usr/lib/tuned/recommend.d", "/etc/tuned/recommend.d"] TMP_FILE_SUFFIX = ".tmp" # max. number of consecutive errors to give up ERROR_THRESHOLD = 3 # bootloader plugin configuration BOOT_DIR = "/boot" GRUB2_CFG_FILES = ["/etc/grub2.cfg", "/etc/grub2-efi.cfg"] GRUB2_CFG_DIR = "/etc/grub.d" GRUB2_TUNED_TEMPLATE_NAME = "00_tuned" GRUB2_TUNED_TEMPLATE_PATH = GRUB2_CFG_DIR + "/" + GRUB2_TUNED_TEMPLATE_NAME GRUB2_TEMPLATE_HEADER_BEGIN = "### BEGIN /etc/grub.d/" + GRUB2_TUNED_TEMPLATE_NAME + " ###" GRUB2_TEMPLATE_HEADER_END = "### END /etc/grub.d/" + GRUB2_TUNED_TEMPLATE_NAME + " ###" GRUB2_TUNED_VAR = "tuned_params" GRUB2_TUNED_INITRD_VAR = "tuned_initrd" GRUB2_DEFAULT_ENV_FILE = "/etc/default/grub" INITRD_IMAGE_DIR = "/boot" BOOT_CMDLINE_TUNED_VAR = "TUNED_BOOT_CMDLINE" BOOT_CMDLINE_INITRD_ADD_VAR = "TUNED_BOOT_INITRD_ADD" BOOT_CMDLINE_KARGS_DELETED_VAR = "TUNED_BOOT_KARGS_DELETED" BOOT_CMDLINE_FILE = "/etc/tuned/bootcmdline" PETITBOOT_DETECT_DIR = "/sys/firmware/opal" MACHINE_ID_FILE = "/etc/machine-id" KERNEL_UPDATE_HOOK_FILE = "/usr/lib/kernel/install.d/92-tuned.install" BLS_ENTRIES_PATH = "/boot/loader/entries" # scheduler plugin configuration # how many times retry to move tasks to parent cgroup on cgroup cleanup CGROUP_CLEANUP_TASKS_RETRY = 10 PROCFS_MOUNT_POINT = "/proc" DEF_CGROUP_MOUNT_POINT = "/sys/fs/cgroup/cpuset" DEF_CGROUP_MODE = 0o770 # service plugin configuration SERVICE_SYSTEMD_CFG_PATH = "/etc/systemd/system/%s.service.d" DEF_SERVICE_CFG_DIR_MODE = 0o755 # modules plugin configuration MODULES_FILE = "/etc/modprobe.d/tuned.conf" # systemd plugin configuration SYSTEMD_SYSTEM_CONF_FILE = "/etc/systemd/system.conf" SYSTEMD_CPUAFFINITY_VAR = "CPUAffinity" # irqbalance plugin configuration IRQBALANCE_SYSCONFIG_FILE = "/etc/sysconfig/irqbalance" # acpi plugin configuration ACPI_DIR = "/sys/firmware/acpi" # built-in functions configuration SYSFS_CPUS_PATH = "/sys/devices/system/cpu" # number of backups LOG_FILE_COUNT = 2 LOG_FILE_MAXBYTES = 100*1000 LOG_FILE = "/var/log/tuned/tuned.log" PID_FILE = "/run/tuned/tuned.pid" SYSTEM_RELEASE_FILE = "/etc/system-release-cpe" # prefix for functions plugins FUNCTION_PREFIX = "function_" # prefix for exported environment variables when calling scripts ENV_PREFIX = "TUNED_" ROLLBACK_NONE = 0 ROLLBACK_SOFT = 1 ROLLBACK_FULL = 2 # tuned-gui PREFIX_PROFILE_FACTORY = "System" PREFIX_PROFILE_USER = "User" # PPD-to-tuned API translation daemon configuration PPD_NAMESPACE = "net.hadess.PowerProfiles" PPD_DBUS_BUS = PPD_NAMESPACE PPD_DBUS_OBJECT = "/net/hadess/PowerProfiles" PPD_DBUS_INTERFACE = PPD_DBUS_BUS PPD_CONFIG_FILE = "/etc/tuned/ppd.conf" # After adding new option to tuned-main.conf add here its name with CFG_ prefix # and eventually default value with CFG_DEF_ prefix (default is None) # and function for check with CFG_FUNC_ prefix # (see configobj for methods, default is get for string) CFG_DAEMON = "daemon" CFG_DYNAMIC_TUNING = "dynamic_tuning" CFG_SLEEP_INTERVAL = "sleep_interval" CFG_UPDATE_INTERVAL = "update_interval" CFG_RECOMMEND_COMMAND = "recommend_command" CFG_REAPPLY_SYSCTL = "reapply_sysctl" CFG_DEFAULT_INSTANCE_PRIORITY = "default_instance_priority" CFG_UDEV_BUFFER_SIZE = "udev_buffer_size" CFG_LOG_FILE_COUNT = "log_file_count" CFG_LOG_FILE_MAX_SIZE = "log_file_max_size" CFG_UNAME_STRING = "uname_string" CFG_CPUINFO_STRING = "cpuinfo_string" CFG_ENABLE_DBUS = "enable_dbus" CFG_ENABLE_UNIX_SOCKET = "enable_unix_socket" CFG_UNIX_SOCKET_PATH = "unix_socket_path" CFG_UNIX_SOCKET_SIGNAL_PATHS = "unix_socket_signal_paths" CFG_UNIX_SOCKET_OWNERSHIP = "unix_socket_ownership" CFG_UNIX_SOCKET_PERMISIONS = "unix_socket_permissions" CFG_UNIX_SOCKET_CONNECTIONS_BACKLOG = "connections_backlog" CFG_CPU_EPP_FLAG = "hwp_epp" CFG_ROLLBACK = "rollback" # no_daemon mode CFG_DEF_DAEMON = True CFG_FUNC_DAEMON = "getboolean" # default configuration CFG_DEF_DYNAMIC_TUNING = True CFG_FUNC_DYNAMIC_TUNING = "getboolean" # how long to sleep before checking for events (in seconds) CFG_DEF_SLEEP_INTERVAL = 1 CFG_FUNC_SLEEP_INTERVAL = "getint" # update interval for dynamic tuning (in seconds) CFG_DEF_UPDATE_INTERVAL = 10 CFG_FUNC_UPDATE_INTERVAL = "getint" # recommend command availability CFG_DEF_RECOMMEND_COMMAND = True CFG_FUNC_RECOMMEND_COMMAND = "getboolean" # reapply system sysctl CFG_DEF_REAPPLY_SYSCTL = True CFG_FUNC_REAPPLY_SYSCTL = "getboolean" # default instance priority CFG_DEF_DEFAULT_INSTANCE_PRIORITY = 0 CFG_FUNC_DEFAULT_INSTANCE_PRIORITY = "getint" # default pyudev.Monitor buffer size CFG_DEF_UDEV_BUFFER_SIZE = 1024 * 1024 # default log file count CFG_DEF_LOG_FILE_COUNT = 2 CFG_FUNC_LOG_FILE_COUNT = "getint" # default log file max size CFG_DEF_LOG_FILE_MAX_SIZE = 1024 * 1024 # default listening on dbus CFG_DEF_ENABLE_DBUS = True CFG_FUNC_ENABLE_DBUS = "getboolean" # default listening on unix socket # as it is not used commonly disabled by default CFG_DEF_ENABLE_UNIX_SOCKET = False CFG_FUNC_ENABLE_UNIX_SOCKET = "getboolean" # default unix socket path CFG_DEF_UNIX_SOCKET_PATH = "/run/tuned/tuned.sock" CFG_DEF_UNIX_SOCKET_SIGNAL_PATHS = "" # default unix socket ownership # (uid and gid, python2 does not support names out of box, -1 leaves default) CFG_DEF_UNIX_SOCKET_OWNERSHIP = "-1 -1" # default unix socket permissions CFG_DEF_UNIX_SOCKET_PERMISIONS = "0o600" # default unix socket conections backlog CFG_DEF_UNIX_SOCKET_CONNECTIONS_BACKLOG = "1024" CFG_FUNC_UNIX_SOCKET_CONNECTIONS_BACKLOG = "getint" # default rollback strategy CFG_DEF_ROLLBACK = "auto" PATH_CPU_DMA_LATENCY = "/dev/cpu_dma_latency" # profile attributes which can be specified in the main section PROFILE_ATTR_SUMMARY = "summary" PROFILE_ATTR_DESCRIPTION = "description" SIGNAL_PROFILE_CHANGED = "profile_changed" STR_HINT_REBOOT = "you need to reboot for changes to take effect" STR_VERIFY_PROFILE_DEVICE_VALUE_OK = "verify: passed: device %s: '%s' = '%s'" STR_VERIFY_PROFILE_VALUE_OK = "verify: passed: '%s' = '%s'" STR_VERIFY_PROFILE_OK = "verify: passed: '%s'" STR_VERIFY_PROFILE_DEVICE_VALUE_MISSING = "verify: skipped, missing: device %s: '%s'" STR_VERIFY_PROFILE_VALUE_MISSING = "verify: skipped, missing: '%s'" STR_VERIFY_PROFILE_DEVICE_VALUE_FAIL = "verify: failed: device %s: '%s' = '%s', expected '%s'" STR_VERIFY_PROFILE_VALUE_FAIL = "verify: failed: '%s' = '%s', expected '%s'" STR_VERIFY_PROFILE_CMDLINE_FAIL = "verify: failed: cmdline arg '%s', expected '%s'" STR_VERIFY_PROFILE_CMDLINE_FAIL_MISSING = "verify: failed: cmdline arg '%s' is missing, expected '%s'" STR_VERIFY_PROFILE_FAIL = "verify: failed: '%s'" # timout for tuned-adm operations in seconds ADMIN_TIMEOUT = 600 # Strings for /etc/tuned/profile_mode specifying if the active profile # was set automatically or manually ACTIVE_PROFILE_AUTO = "auto" ACTIVE_PROFILE_MANUAL = "manual" LOG_LEVEL_CONSOLE = 60 LOG_LEVEL_CONSOLE_NAME = "CONSOLE" CAPTURE_LOG_LEVEL = "console" CAPTURE_LOG_LEVELS = { "debug": logging.DEBUG, "info": logging.INFO, "warn": logging.WARN, "error": logging.ERROR, "console": LOG_LEVEL_CONSOLE, "none": None, } PK$2];>,,ppd/tuned-ppd.servicenu[[Unit] Description=PPD-to-TuneD API Translation Daemon Requires=tuned.service After=tuned.service Before=multi-user.target display-manager.target [Service] Type=dbus PIDFile=/run/tuned/tuned-ppd.pid BusName=net.hadess.PowerProfiles ExecStart=/usr/sbin/tuned-ppd [Install] WantedBy=graphical.target PK$2]8ppd/controller.pynu[from tuned import exports, logs from tuned.utils.commands import commands from tuned.consts import PPD_CONFIG_FILE from tuned.ppd.config import PPDConfig, PPD_PERFORMANCE, PPD_POWER_SAVER from enum import StrEnum import threading import dbus import os log = logs.get() DRIVER = "tuned" NO_TURBO_PATH = "/sys/devices/system/cpu/intel_pstate/no_turbo" LAP_MODE_PATH = "/sys/bus/platform/devices/thinkpad_acpi/dytc_lapmode" class PerformanceDegraded(StrEnum): NONE = "" LAP_DETECTED = "lap-detected" HIGH_OPERATING_TEMPERATURE = "high-operating-temperature" class ProfileHold(object): def __init__(self, profile, reason, app_id, watch): self.profile = profile self.reason = reason self.app_id = app_id self.watch = watch def as_dict(self): return { "Profile": self.profile, "Reason": self.reason, "ApplicationId": self.app_id, } class ProfileHoldManager(object): def __init__(self, controller): self._holds = {} self._cookie_counter = 0 self._controller = controller def _callback(self, cookie, app_id): def callback(name): if name == "": log.info("Application '%s' disappeared, releasing hold '%s'" % (app_id, cookie)) self.remove(cookie) return callback def _effective_hold_profile(self): if any(hold.profile == PPD_POWER_SAVER for hold in self._holds.values()): return PPD_POWER_SAVER return PPD_PERFORMANCE def _cancel(self, cookie): if cookie not in self._holds: return hold = self._holds.pop(cookie) hold.watch.cancel() exports.send_signal("ProfileReleased", cookie) exports.property_changed("ActiveProfileHolds", self.as_dbus_array()) log.info("Releasing hold '%s': profile '%s' by application '%s'" % (cookie, hold.profile, hold.app_id)) def as_dbus_array(self): return dbus.Array([hold.as_dict() for hold in self._holds.values()], signature="a{sv}") def add(self, profile, reason, app_id, caller): cookie = self._cookie_counter self._cookie_counter += 1 watch = self._controller.bus.watch_name_owner(caller, self._callback(cookie, app_id)) log.info("Adding hold '%s': profile '%s' by application '%s'" % (cookie, profile, app_id)) self._holds[cookie] = ProfileHold(profile, reason, app_id, watch) exports.property_changed("ActiveProfileHolds", self.as_dbus_array()) self._controller.switch_profile(profile) return cookie def has(self, cookie): return cookie in self._holds def remove(self, cookie): self._cancel(cookie) if len(self._holds) != 0: new_profile = self._effective_hold_profile() else: new_profile = self._controller.base_profile self._controller.switch_profile(new_profile) def clear(self): for cookie in self._holds: self._cancel(cookie) class Controller(exports.interfaces.ExportableInterface): def __init__(self, bus, tuned_interface): super(Controller, self).__init__() self._bus = bus self._tuned_interface = tuned_interface self._profile_holds = ProfileHoldManager(self) self._performance_degraded = PerformanceDegraded.NONE self._cmd = commands() self._terminate = threading.Event() self.load_config() def _check_performance_degraded(self): performance_degraded = PerformanceDegraded.NONE if os.path.exists(NO_TURBO_PATH): if int(self._cmd.read_file(NO_TURBO_PATH)) == 1: performance_degraded = PerformanceDegraded.HIGH_OPERATING_TEMPERATURE if os.path.exists(LAP_MODE_PATH): if int(self._cmd.read_file(LAP_MODE_PATH)) == 1: performance_degraded = PerformanceDegraded.LAP_DETECTED if performance_degraded != self._performance_degraded: log.info("Performance degraded: %s" % performance_degraded) self._performance_degraded = performance_degraded exports.property_changed("PerformanceDegraded", performance_degraded) def run(self): exports.start() while not self._cmd.wait(self._terminate, 1): self._check_performance_degraded() exports.stop() @property def bus(self): return self._bus @property def base_profile(self): return self._base_profile def terminate(self): self._terminate.set() def load_config(self): self._config = PPDConfig(PPD_CONFIG_FILE) self._base_profile = self._config.default_profile self.switch_profile(self._config.default_profile) def switch_profile(self, profile): if self.active_profile() == profile: return tuned_profile = self._config.ppd_to_tuned[profile] log.info("Switching to profile '%s'" % tuned_profile) self._tuned_interface.switch_profile(tuned_profile) exports.property_changed("ActiveProfile", profile) def active_profile(self): tuned_profile = self._tuned_interface.active_profile() return self._config.tuned_to_ppd.get(tuned_profile, "unknown") @exports.export("sss", "u") def HoldProfile(self, profile, reason, app_id, caller): if profile != PPD_POWER_SAVER and profile != PPD_PERFORMANCE: raise dbus.exceptions.DBusException( "Only '%s' and '%s' profiles may be held" % (PPD_POWER_SAVER, PPD_PERFORMANCE) ) return self._profile_holds.add(profile, reason, app_id, caller) @exports.export("u", "") def ReleaseProfile(self, cookie, caller): if not self._profile_holds.has(cookie): raise dbus.exceptions.DBusException("No active hold for cookie '%s'" % cookie) self._profile_holds.remove(cookie) @exports.signal("u") def ProfileReleased(self, cookie): pass @exports.property_setter("ActiveProfile") def set_active_profile(self, profile): if profile not in self._config.ppd_to_tuned: raise dbus.exceptions.DBusException("Invalid profile '%s'" % profile) self._base_profile = profile self._profile_holds.clear() self.switch_profile(profile) @exports.property_getter("ActiveProfile") def get_active_profile(self): return self.active_profile() @exports.property_getter("Profiles") def get_profiles(self): return dbus.Array( [{"Profile": profile, "Driver": DRIVER} for profile in self._config.ppd_to_tuned.keys()], signature="a{sv}", ) @exports.property_getter("Actions") def get_actions(self): return dbus.Array([], signature="s") @exports.property_getter("PerformanceDegraded") def get_performance_degraded(self): return self._performance_degraded @exports.property_getter("ActiveProfileHolds") def get_active_profile_holds(self): return self._profile_holds.as_dbus_array() PK$2]+VQ Q ppd/config.pynu[from tuned.utils.config_parser import ConfigParser, Error from tuned.exceptions import TunedException import os PPD_POWER_SAVER = "power-saver" PPD_PERFORMANCE = "performance" MAIN_SECTION = "main" PROFILES_SECTION = "profiles" DEFAULT_PROFILE_OPTION = "default" class PPDConfig: def __init__(self, config_file): self.load_from_file(config_file) @property def default_profile(self): return self._default_profile @property def ppd_to_tuned(self): return self._ppd_to_tuned @property def tuned_to_ppd(self): return self._tuned_to_ppd def load_from_file(self, config_file): cfg = ConfigParser() if not os.path.isfile(config_file): raise TunedException("Configuration file '%s' does not exist" % config_file) try: cfg.read(config_file) except Error: raise TunedException("Error parsing the configuration file '%s'" % config_file) if PROFILES_SECTION not in cfg: raise TunedException("Missing profiles section in the configuration file '%s'" % config_file) self._ppd_to_tuned = dict(cfg[PROFILES_SECTION]) if not all(isinstance(mapped_profile, str) for mapped_profile in self._ppd_to_tuned.values()): raise TunedException("Invalid profile mapping in the configuration file '%s'" % config_file) if len(set(self._ppd_to_tuned.values())) != len(self._ppd_to_tuned): raise TunedException("Duplicate profile mapping in the configuration file '%s'" % config_file) self._tuned_to_ppd = {v: k for k, v in self._ppd_to_tuned.items()} if PPD_POWER_SAVER not in self._ppd_to_tuned: raise TunedException("Missing power-saver profile in the configuration file '%s'" % config_file) if PPD_PERFORMANCE not in self._ppd_to_tuned: raise TunedException("Missing performance profile in the configuration file '%s'" % config_file) if MAIN_SECTION not in cfg or DEFAULT_PROFILE_OPTION not in cfg[MAIN_SECTION]: raise TunedException("Missing default profile in the configuration file '%s'" % config_file) self._default_profile = cfg[MAIN_SECTION][DEFAULT_PROFILE_OPTION] if self._default_profile not in self._ppd_to_tuned: raise TunedException("Unknown default profile '%s'" % self._default_profile) PK$2]%r  %ppd/__pycache__/config.cpython-36.pycnu[3 +sz+PPDConfig.load_from_file..z6Invalid profile mapping in the configuration file '%s'z8Duplicate profile mapping in the configuration file '%s'cSsi|]\}}||qSr r )rkvr r r 0sz,PPDConfig.load_from_file..z:Missing power-saver profile in the configuration file '%s'z:Missing performance profile in the configuration file '%s'z6Missing default profile in the configuration file '%s'zUnknown default profile '%s')rospathisfilerreadrPROFILES_SECTIONdictrallvalueslensetitemsrPPD_POWER_SAVERPPD_PERFORMANCE MAIN_SECTIONDEFAULT_PROFILE_OPTIONr)r r Zcfgr r r rs0          zPPDConfig.load_from_fileN) __name__ __module__ __qualname__r propertyrrrrr r r r r s    r) Ztuned.utils.config_parserrrZtuned.exceptionsrrr&r'r(rr)rr r r r s PK$2]%r  +ppd/__pycache__/config.cpython-36.opt-1.pycnu[3 +sz+PPDConfig.load_from_file..z6Invalid profile mapping in the configuration file '%s'z8Duplicate profile mapping in the configuration file '%s'cSsi|]\}}||qSr r )rkvr r r 0sz,PPDConfig.load_from_file..z:Missing power-saver profile in the configuration file '%s'z:Missing performance profile in the configuration file '%s'z6Missing default profile in the configuration file '%s'zUnknown default profile '%s')rospathisfilerreadrPROFILES_SECTIONdictrallvalueslensetitemsrPPD_POWER_SAVERPPD_PERFORMANCE MAIN_SECTIONDEFAULT_PROFILE_OPTIONr)r r Zcfgr r r rs0          zPPDConfig.load_from_fileN) __name__ __module__ __qualname__r propertyrrrrr r r r r s    r) Ztuned.utils.config_parserrrZtuned.exceptionsrrr&r'r(rr)rr r r r s PK$2]7!!)ppd/__pycache__/controller.cpython-36.pycnu[3 .callbackr)rr&rr'r)rr&rr _callback,szProfileHoldManager._callbackcCs tdd|jjDrtStS)Ncss|]}|jtkVqdS)N)rr).0holdrrr 5sz=ProfileHoldManager._effective_hold_profile..)anyrvaluesrr)rrrr_effective_hold_profile4sz*ProfileHoldManager._effective_hold_profilecCs\||jkrdS|jj|}|jjtjd|tjd|jtj d||j |j fdS)NProfileReleasedActiveProfileHoldsz5Releasing hold '%s': profile '%s' by application '%s') rpoprZcancelrZ send_signalproperty_changed as_dbus_arrayr"r#rr)rr&r*rrr_cancel9s    zProfileHoldManager._cancelcCstjdd|jjDddS)NcSsg|] }|jqSr)r)r)r*rrr Csz4ProfileHoldManager.as_dbus_array..za{sv}) signature)dbusArrayrr-)rrrrr3Bsz ProfileHoldManager.as_dbus_arraycCst|j}|jd7_|jjj||j||}tjd|||ft|||||j|<t j d|j |jj ||S)Nz2Adding hold '%s': profile '%s' by application '%s'r0) r r!busZwatch_name_ownerr(r"r#rrrr2r3switch_profile)rrrrcallerr&rrrraddEs zProfileHoldManager.addcCs ||jkS)N)r)rr&rrrhasOszProfileHoldManager.hascCs:|j|t|jdkr"|j}n|jj}|jj|dS)Nr)r4lenrr.r! base_profiler;)rr&Z new_profilerrrr$Rs   zProfileHoldManager.removecCsx|jD]}|j|qWdS)N)rr4)rr&rrrclearZs zProfileHoldManager.clearN) r rrrr(r.r4r3r=r>r$rArrrrr&s  rcs eZdZfddZddZddZeddZed d Zd d Z d dZ ddZ ddZ e jddddZe jddddZe jdddZe jdddZe jddd Ze jd!d"d#Ze jd$d%d&Ze jd'd(d)Ze jd*d+d,ZZS)- ControllercsJtt|j||_||_t||_tj|_ t |_ t j |_|jdS)N)superrBr_bus_tuned_interfacer_profile_holdsr r_performance_degradedr_cmd threadingZEvent _terminate load_config)rr:Ztuned_interface) __class__rrr`s  zController.__init__cCstj}tjjtr,t|jjtdkr,tj }tjjt rRt|jjt dkrRtj }||j kr|t jd|||_ tjd|dS)Nr9zPerformance degraded: %sr )r rospathexists NO_TURBO_PATHintrHZ read_filer LAP_MODE_PATHrrGr"r#rr2)rZperformance_degradedrrr_check_performance_degradedjs   z&Controller._check_performance_degradedcCs2tjx|jj|jds$|jq WtjdS)Nr9)rstartrHwaitrJrSstop)rrrrrunws zController.runcCs|jS)N)rD)rrrrr:}szController.buscCs|jS)N) _base_profile)rrrrr@szController.base_profilecCs|jjdS)N)rJset)rrrr terminateszController.terminatecCs&tt|_|jj|_|j|jjdS)N)rr_configZdefault_profilerXr;)rrrrrKs  zController.load_configcCsF|j|krdS|jj|}tjd||jj|tjd|dS)NzSwitching to profile '%s' ActiveProfile) active_profiler[ ppd_to_tunedr"r#rEr;rr2)rr tuned_profilerrrr;s    zController.switch_profilecCs|jj}|jjj|dS)Nunknown)rEr]r[Z tuned_to_ppdget)rr_rrrr]s zController.active_profileZsssucCs6|tkr$|tkr$tjjdttf|jj||||S)Nz'Only '%s' and '%s' profiles may be held)rrr7 exceptions DBusExceptionrFr=)rrrrr<rrr HoldProfileszController.HoldProfiler cCs,|jj|stjjd||jj|dS)NzNo active hold for cookie '%s')rFr>r7rcrdr$)rr&r<rrrReleaseProfiles zController.ReleaseProfilecCsdS)Nr)rr&rrrr/szController.ProfileReleasedr\cCs:||jjkrtjjd|||_|jj|j|dS)NzInvalid profile '%s') r[r^r7rcrdrXrFrAr;)rrrrrset_active_profiles   zController.set_active_profilecCs|jS)N)r])rrrrget_active_profileszController.get_active_profileZProfilescCs tjdd|jjjDddS)NcSsg|]}|tdqS))rZDriver)DRIVER)r)rrrrr5sz+Controller.get_profiles..za{sv})r6)r7r8r[r^keys)rrrr get_profilesszController.get_profilesZActionscCstjgddS)Ns)r6)r7r8)rrrr get_actionsszController.get_actionsr cCs|jS)N)rG)rrrrget_performance_degradedsz#Controller.get_performance_degradedr0cCs |jjS)N)rFr3)rrrrget_active_profile_holdssz#Controller.get_active_profile_holds)r rrrrSrWpropertyr:r@rZrKr;r]rZexportrerfsignalr/Zproperty_setterrgZproperty_getterrhrkrmrnro __classcell__rr)rLrrB_s$    rB)r rrZtuned.utils.commandsrZ tuned.constsrZtuned.ppd.configrrrenumr rIr7rMrar"rirPrRr objectrrZ interfacesZExportableInterfacerBrrrrs   9PK$2]7!!/ppd/__pycache__/controller.cpython-36.opt-1.pycnu[3 .callbackr)rr&rr'r)rr&rr _callback,szProfileHoldManager._callbackcCs tdd|jjDrtStS)Ncss|]}|jtkVqdS)N)rr).0holdrrr 5sz=ProfileHoldManager._effective_hold_profile..)anyrvaluesrr)rrrr_effective_hold_profile4sz*ProfileHoldManager._effective_hold_profilecCs\||jkrdS|jj|}|jjtjd|tjd|jtj d||j |j fdS)NProfileReleasedActiveProfileHoldsz5Releasing hold '%s': profile '%s' by application '%s') rpoprZcancelrZ send_signalproperty_changed as_dbus_arrayr"r#rr)rr&r*rrr_cancel9s    zProfileHoldManager._cancelcCstjdd|jjDddS)NcSsg|] }|jqSr)r)r)r*rrr Csz4ProfileHoldManager.as_dbus_array..za{sv}) signature)dbusArrayrr-)rrrrr3Bsz ProfileHoldManager.as_dbus_arraycCst|j}|jd7_|jjj||j||}tjd|||ft|||||j|<t j d|j |jj ||S)Nz2Adding hold '%s': profile '%s' by application '%s'r0) r r!busZwatch_name_ownerr(r"r#rrrr2r3switch_profile)rrrrcallerr&rrrraddEs zProfileHoldManager.addcCs ||jkS)N)r)rr&rrrhasOszProfileHoldManager.hascCs:|j|t|jdkr"|j}n|jj}|jj|dS)Nr)r4lenrr.r! base_profiler;)rr&Z new_profilerrrr$Rs   zProfileHoldManager.removecCsx|jD]}|j|qWdS)N)rr4)rr&rrrclearZs zProfileHoldManager.clearN) r rrrr(r.r4r3r=r>r$rArrrrr&s  rcs eZdZfddZddZddZeddZed d Zd d Z d dZ ddZ ddZ e jddddZe jddddZe jdddZe jdddZe jddd Ze jd!d"d#Ze jd$d%d&Ze jd'd(d)Ze jd*d+d,ZZS)- ControllercsJtt|j||_||_t||_tj|_ t |_ t j |_|jdS)N)superrBr_bus_tuned_interfacer_profile_holdsr r_performance_degradedr_cmd threadingZEvent _terminate load_config)rr:Ztuned_interface) __class__rrr`s  zController.__init__cCstj}tjjtr,t|jjtdkr,tj }tjjt rRt|jjt dkrRtj }||j kr|t jd|||_ tjd|dS)Nr9zPerformance degraded: %sr )r rospathexists NO_TURBO_PATHintrHZ read_filer LAP_MODE_PATHrrGr"r#rr2)rZperformance_degradedrrr_check_performance_degradedjs   z&Controller._check_performance_degradedcCs2tjx|jj|jds$|jq WtjdS)Nr9)rstartrHwaitrJrSstop)rrrrrunws zController.runcCs|jS)N)rD)rrrrr:}szController.buscCs|jS)N) _base_profile)rrrrr@szController.base_profilecCs|jjdS)N)rJset)rrrr terminateszController.terminatecCs&tt|_|jj|_|j|jjdS)N)rr_configZdefault_profilerXr;)rrrrrKs  zController.load_configcCsF|j|krdS|jj|}tjd||jj|tjd|dS)NzSwitching to profile '%s' ActiveProfile) active_profiler[ ppd_to_tunedr"r#rEr;rr2)rr tuned_profilerrrr;s    zController.switch_profilecCs|jj}|jjj|dS)Nunknown)rEr]r[Z tuned_to_ppdget)rr_rrrr]s zController.active_profileZsssucCs6|tkr$|tkr$tjjdttf|jj||||S)Nz'Only '%s' and '%s' profiles may be held)rrr7 exceptions DBusExceptionrFr=)rrrrr<rrr HoldProfileszController.HoldProfiler cCs,|jj|stjjd||jj|dS)NzNo active hold for cookie '%s')rFr>r7rcrdr$)rr&r<rrrReleaseProfiles zController.ReleaseProfilecCsdS)Nr)rr&rrrr/szController.ProfileReleasedr\cCs:||jjkrtjjd|||_|jj|j|dS)NzInvalid profile '%s') r[r^r7rcrdrXrFrAr;)rrrrrset_active_profiles   zController.set_active_profilecCs|jS)N)r])rrrrget_active_profileszController.get_active_profileZProfilescCs tjdd|jjjDddS)NcSsg|]}|tdqS))rZDriver)DRIVER)r)rrrrr5sz+Controller.get_profiles..za{sv})r6)r7r8r[r^keys)rrrr get_profilesszController.get_profilesZActionscCstjgddS)Ns)r6)r7r8)rrrr get_actionsszController.get_actionsr cCs|jS)N)rG)rrrrget_performance_degradedsz#Controller.get_performance_degradedr0cCs |jjS)N)rFr3)rrrrget_active_profile_holdssz#Controller.get_active_profile_holds)r rrrrSrWpropertyr:r@rZrKr;r]rZexportrerfsignalr/Zproperty_setterrgZproperty_getterrhrkrmrnro __classcell__rr)rLrrB_s$    rB)r rrZtuned.utils.commandsrZ tuned.constsrZtuned.ppd.configrrrenumr rIr7rMrar"rirPrRr objectrrZ interfacesZExportableInterfacerBrrrrs   9PK$2]ppd/tuned-ppd.policynu[ TuneD https://tuned-project.org/ Hold power profile Authentication is required to hold power profiles. no no yes Release power profile Authentication is required to release power profiles. no no yes PK$2]&^iippd/tuned-ppd.dbus.servicenu[[D-BUS Service] Name=net.hadess.PowerProfiles Exec=/bin/false User=root SystemdService=tuned-ppd.service PK$2]CEj ppd/ppd.confnu[[main] # The default PPD profile default=balanced [profiles] # PPD = TuneD power-saver=powersave balanced=balanced performance=throughput-performance PK$2]"za ppd/dbus.confnu[ PK$2]A CWWadmin/dbus_controller.pynu[import dbus import dbus.exceptions import time from dbus.mainloop.glib import DBusGMainLoop from gi.repository import GLib, GObject from .exceptions import TunedAdminDBusException __all__ = ["DBusController"] class DBusController(object): def __init__(self, bus_name, interface_name, object_name, debug = False): self._bus_name = bus_name self._interface_name = interface_name self._object_name = object_name self._proxy = None self._interface = None self._debug = debug self._main_loop = None self._action = None self._on_exit_action = None self._ret = True self._exit = False self._exception = None def _init_proxy(self): try: if self._proxy is None: DBusGMainLoop(set_as_default=True) self._main_loop = GLib.MainLoop() bus = dbus.SystemBus() self._proxy = bus.get_object(self._bus_name, self._object_name) self._interface = dbus.Interface(self._proxy, dbus_interface = self._interface_name) except dbus.exceptions.DBusException: raise TunedAdminDBusException("Cannot talk to TuneD daemon via DBus. Is TuneD daemon running?") def _idle(self): if self._action is not None: # This may (and very probably will) run in child thread, so catch and pass exceptions to the main thread try: self._action_exit_code = self._action(*self._action_args, **self._action_kwargs) except TunedAdminDBusException as e: self._exception = e self._exit = True if self._exit: if self._on_exit_action is not None: self._on_exit_action(*self._on_exit_action_args, **self._on_exit_action_kwargs) self._main_loop.quit() return False else: time.sleep(1) return True def set_on_exit_action(self, action, *args, **kwargs): self._on_exit_action = action self._on_exit_action_args = args self._on_exit_action_kwargs = kwargs def set_action(self, action, *args, **kwargs): self._action = action self._action_args = args self._action_kwargs = kwargs def run(self): self._exception = None GLib.idle_add(self._idle) self._main_loop.run() # Pass exception happened in child thread to the caller if self._exception is not None: raise self._exception return self._ret def _call(self, method_name, *args, **kwargs): self._init_proxy() try: method = self._interface.get_dbus_method(method_name) return method(*args, timeout=40) except dbus.exceptions.DBusException as dbus_exception: err_str = "DBus call to TuneD daemon failed" if self._debug: err_str += " (%s)" % str(dbus_exception) raise TunedAdminDBusException(err_str) def set_signal_handler(self, signal, cb): self._init_proxy() self._proxy.connect_to_signal(signal, cb) def is_running(self): return self._call("is_running") def start(self): return self._call("start") def stop(self): return self._call("stop") def profiles(self): return self._call("profiles") def profiles2(self): return self._call("profiles2") def profile_info(self, profile_name): return self._call("profile_info", profile_name) def log_capture_start(self, log_level, timeout): return self._call("log_capture_start", log_level, timeout) def log_capture_finish(self, token): return self._call("log_capture_finish", token) def active_profile(self): return self._call("active_profile") def profile_mode(self): return self._call("profile_mode") def post_loaded_profile(self): return self._call("post_loaded_profile") def switch_profile(self, new_profile): if new_profile == "": return (False, "No profile specified") return self._call("switch_profile", new_profile) def auto_profile(self): return self._call("auto_profile") def recommend_profile(self): return self._call("recommend_profile") def verify_profile(self): return self._call("verify_profile") def verify_profile_ignore_missing(self): return self._call("verify_profile_ignore_missing") def off(self): return self._call("disable") def get_plugins(self): """Return dict with plugin names and their hints Return: dictionary -- {plugin_name: {parameter_name: default_value}} """ return self._call("get_all_plugins") def get_plugin_documentation(self, plugin_name): """Return docstring of plugin's class""" return self._call("get_plugin_documentation", plugin_name) def get_plugin_hints(self, plugin_name): """Return dictionary with parameters of plugin and their hints Parameters: plugin_name -- name of plugin Return: dictionary -- {parameter_name: hint} """ return self._call("get_plugin_hints", plugin_name) def instance_acquire_devices(self, devices, instance): return self._call("instance_acquire_devices", devices, instance) def get_instances(self, plugin_name): return self._call("get_instances", plugin_name) def instance_get_devices(self, instance): return self._call("instance_get_devices", instance) def exit(self, ret): self.set_action(None) self._ret = ret self._exit = True return ret PK$2] VsBB&admin/__pycache__/admin.cpython-36.pycnu[3 @sddlmZddlZddlmZddlmZddl m Z ddl m Z ddl jZddlmZddlZddlZddlZddlZddlZddlZGd d d eZdS) )print_functionN)commands)Locator)TunedAdminDBusException)TunedException)ProfileRecommenderc@seZdZdddejejfddZddZddZ d d Z d d Z d dZ ddZ ddZddZddZddZddZddZddZdfd d!Zdgd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zd6d7Z d8d9Z!d:d;Z"dd?Z$d@dAZ%dBdCZ&dDdEZ'dFdGZ(dHdIZ)dJdKZ*dLdMZ+dNdOZ,dhdQdRZ-didSdTZ.djdUdVZ/dkdWdXZ0dYdZZ1d[d\Z2d]d^Z3d_d`Z4dadbZ5dcddZ6deS)lAdminTFcCs||_||_||_||_t||_ttj|_ t j |_ d|_ d|_d|_d|_d|_||_t|_|jrtjjtjtjtj||_y|jjtj|jWn2tk r}z|j|d|_WYdd}~XnXdS)NTF) _dbusZ_debug_async_timeoutr_cmdprofiles_locatorconstsZLOAD_DIRECTORIES_profiles_locator threadingZEvent_daemon_action_finished_daemon_action_profile_daemon_action_result_daemon_action_errstr _controller _log_token _log_levelr_profile_recommendertunedZadminZDBusControllerZDBUS_BUSZDBUS_INTERFACEZ DBUS_OBJECTZset_signal_handlerZSIGNAL_PROFILE_CHANGED_signal_profile_changed_cbr_error)selfZdbusdebugZasyncotimeoutZ log_leveler"/usr/lib/python3.6/admin.py__init__s*    zAdmin.__init__cCst|tjddS)N)file)printsysstderr)rmessager"r"r#r+sz Admin._errorcCs*|jjs&||_||_||_|jjdS)N)rZis_setrrrset)r profile_nameresultZerrstrr"r"r#r.s  z Admin._signal_profile_changed_cbcCsnytjt|jjtjdWnJtk rF}z |jtj kSd}~Xn$t t fk rh}zdSd}~XnXdS)NrFT) oskillintrZ read_filerZPID_FILEOSErrorerrnoZEPERM ValueErrorIOError)rr!r"r"r#_tuned_is_running6szAdmin._tuned_is_runningc-Os6|dks|dkrdSd}d}d}yt|d|}Wn(tk rZ}z d|_WYdd}~XnXyt|d|}WnBtk r}z&|js|jt|d|dSWYdd}~XnX|jr y0|jj|j|jj|f|||jj }Wn4t k r}z|j|d|_WYdd}~XnX|js2|||}|S)Nr FZ _action_dbus_Z_action_z , action '%s' is not implemented) getattrAttributeErrorr rstrrZset_on_exit_action_log_capture_finish set_actionZrunr)rZ action_nameargskwargsactionZ action_dbusresr!r"r"r#r<@s6  z Admin.actioncCshtdxZ|D]R}|ddk rP|ddkrPt|jjd|ddd|dqtd|dqWdS)NzAvailable profiles:rr z- %sr)r&rZ align_str)r profile_namesprofiler"r"r#_print_profiles^s  &zAdmin._print_profilescCsdy|jj}Wn6tk rD}zdd|jjD}WYdd}~XnX|j||j|jjdS)NcSsg|] }|dfqS)r r").0r@r"r"r# ksz4Admin._action_dbus_list_profiles..T)rZ profiles2rprofilesrA_action_dbus_activeexit)rr?r!r"r"r#_action_dbus_list_profilesfs& z Admin._action_dbus_list_profilescCs|j|jj|jdS)NT)rArZget_known_names_summary_action_active)rr"r"r#_action_list_profilespszAdmin._action_list_profilescCs&|jj}|dkrd}|jjd|S)Nr T)ractive_profilerF)rr+r"r"r#_dbus_get_active_profileus   zAdmin._dbus_get_active_profilecCs|jj\}}|S)N)rget_active_profile)rr+manualr"r"r#_get_active_profile|szAdmin._get_active_profilecCs.|jj\}}|dkr|dk }|r(tjStjS)N)rrLrZACTIVE_PROFILE_MANUALZACTIVE_PROFILE_AUTO)rr@rMr"r"r#_get_profile_modeszAdmin._get_profile_modecCs|jj}|dkrd}|S)Nr )rpost_loaded_profile)rr+r"r"r#_dbus_get_post_loaded_profiles z#Admin._dbus_get_post_loaded_profilecCs|jj}|S)N)rZget_post_loaded_profile)rr+r"r"r#_get_post_loaded_profiles zAdmin._get_post_loaded_profilecCsl|ddkrXtdt|dttdt|dttdt|ddStd |d SdS) NrTz Profile name:rzProfile summary:zProfile description:z,Unable to get information about profile '%s'F)r&)rr@ profile_infor"r"r#_print_profile_infos     zAdmin._print_profile_infor cCsB|dkr|j}|r*|j||jj|}n tdd}|jj|S)Nr zNo current active profile.F)rKrVrrUr&rF)rr@r=r"r"r#_action_dbus_profile_infoszAdmin._action_dbus_profile_infocCs||dkrXy |j}|dkr&tddSWn.tk rV}z|jt|dSd}~XnX|j||jj|tj tj gddgS)Nr zNo current active profile.F) rNr&rrr7rVrZget_profile_attrsrZPROFILE_ATTR_SUMMARYZPROFILE_ATTR_DESCRIPTION)rr@r!r"r"r#_action_profile_infoszAdmin._action_profile_infocCs$|dkrtddStd|dS)NzNo current active profile.FzCurrent active profile: %sT)r&)rr+r"r"r#_print_profile_names  zAdmin._print_profile_namecCs|rtd|dS)NzCurrent post-loaded profile: %s)r&)rr+r"r"r#_print_post_loaded_profilesz Admin._print_post_loaded_profilecCs4|j}|j|}|r(|j}|j||jj|S)N)rKrYrQrZrrF)rrJr=rPr"r"r#rEs   zAdmin._action_dbus_activecCsy2|j}|j}|r0|r$|d7}nd}||7}Wn.tk r`}z|jt|dSd}~XnX|dk r|j rtdtd||rtd|dS|j|}|j||S)N r FzKIt seems that tuned daemon is not running, preset profile is not activated.zPreset profile: %szPreset post-loaded profile: %sT) rNrRrrr7r4r&rYrZ)rr+rPr!r=r"r"r#rHs(      zAdmin._action_activecCstd|dS)NzProfile selection mode: )r&)rmoder"r"r#_print_profile_modeszAdmin._print_profile_modecCsB|jj\}}|j||dkr6|j||jjdS|jjdS)Nr FT)rZ profile_moder]rrF)rr\errorr"r"r#_action_dbus_profile_modes    zAdmin._action_dbus_profile_modecCsJy|j}|j|dStk rD}z|jt|dSd}~XnXdS)NTF)rOr]rrr7)rr\r!r"r"r#_action_profile_modes zAdmin._action_profile_modecCs>|r,|jj r:|jj r:|jdd}n|jd||S)NzCannot enable the tuning.FzUnable to switch profile: %s)rZ is_runningstartr)rretmsgr"r"r#_profile_print_statuss  zAdmin._profile_print_statuscCsrtj|j|jkr.td|j|jjdS|jjrn|j|krn|j sbtd|j |jjdS|jjdSdS)NzOperation timed out after waiting %d seconds(s), you may try to increase timeout by using --timeout command line option or using --async.FzError changing profile: %sT) time _timestampr r&rrFrZisSetrrr)rr+r"r"r#_action_dbus_wait_profiles     zAdmin._action_dbus_wait_profilecCs||jdks|jdkrdSy2|jj|j}d|_t|dtjdtjjWn,tk rv}z|jdWYdd}~XnXdS)Nr )endr%zUError: Failed to stop log capture. Restart the TuneD daemon to prevent a memory leak.) rrZlog_capture_finishr&r'r(flushrr)rZlog_msgsr!r"r"r#r8 szAdmin._log_capture_finishcCst|dkr|jSdj|}|dkr2|jjdS|jj|j rn|jdk rn|j dd}|jj |j||_ |jj |\}}|js| r|jj|j ||Stj|_|jj|j||j ||S)Nrr[r F)len_action_dbus_listjoinrrFrclearr rr log_capture_startrZswitch_profilerdrerfr9rg)rrDr+r rbrcr"r"r#_action_dbus_profiles        zAdmin._action_dbus_profilecCs<td|jjdddg\}}|dkr0tdntddS)NzTrying to (re)start tuned...ZservicerZrestartrz#TuneD (re)started, changes applied.zQTuneD (re)start failed, you need to (re)start TuneD by hand for changes to apply.)r&rZexecute)rrbrcr"r"r#_restart_tuned+s  zAdmin._restart_tunedcCsz||jjkrdy|jj|||jdStk r`}z|jt||jddSd}~XqvXn|jd|dSdS)NTzUnable to switch profile.Fz%Requested profile '%s' doesn't exist.)rZget_known_namesrZsave_active_profilerrrrr7)rr+rMr!r"r"r# _set_profile3s zAdmin._set_profilecCs6t|dkr|jSdj|}|dkr*dS|j|dS)Nrr[r FT)rlrIrnrs)rrDr+r"r"r#_action_profileAs   zAdmin._action_profilecCs|jj}|jj|j rF|jdk rF|jdd}|jj|j||_|jj \}}|js`| rt|jj |j ||St j |_ |jj|j||j ||S)Nrjrk)rrecommend_profilerror rr rprZ auto_profilerFrdrerfr9rg)rr+r rbrcr"r"r#_action_dbus_auto_profileIs     zAdmin._action_dbus_auto_profilecCs|jj}|j|dS)NF)r recommendrs)rr+r"r"r#_action_auto_profileYs zAdmin._action_auto_profilecCst|jj|jjdS)NT)r&rrurF)rr"r"r#_action_dbus_recommend_profile]sz$Admin._action_dbus_recommend_profilecCst|jjdS)NT)r&rrw)rr"r"r#_action_recommend_profileaszAdmin._action_recommend_profilecCsr|r|jj}n |jj}|r(tdn0tdtdtdtdtdtdtdtj|jj|S) NzIVerification succeeded, current system settings match the preset profile.zLVerification failed, current system settings differ from the preset profile.z=You can mostly fix this by restarting the TuneD daemon, e.g.:z systemctl restart tunedorz service tuned restartzNSometimes (if some plugins like bootloader are used) a reboot may be required.z&See TuneD log file ('%s') for details.)rZverify_profile_ignore_missingZverify_profiler&rZLOG_FILErF)rignore_missingrbr"r"r#_action_dbus_verify_profilees   z!Admin._action_dbus_verify_profilecCs tddS)Nz Not supported in no_daemon mode.F)r&)rr|r"r"r#_action_verify_profilevszAdmin._action_verify_profilecCs:d}|jj|j||_|jj}|s.|jd|jj|S)NrjrkzCannot disable active profile.r>)rrprrZoffrrF)rr rbr"r"r#_action_dbus_offzs   zAdmin._action_dbus_offcCs tddS)Nz Not supported in no_daemon mode.F)r&)rr"r"r# _action_offszAdmin._action_offrDcCs(|dkr|jS|dkr$|j|dSdS)aDPrint accessible profiles or plugins got from TuneD dbus api Keyword arguments: list_choice -- argument from command line deciding what will be listed verbose -- if True then list plugin's config options and their hints if possible. Functional only with plugin listing, with profiles this argument is omitted rDplugins)verboseN)rG_action_dbus_list_plugins)r list_choicerr"r"r#rms zAdmin._action_dbus_listcCs(|dkr|jS|dkr$|j|dSdS)aaPrint accessible profiles or plugins with no daemon mode Keyword arguments: list_choice -- argument from command line deciding what will be listed verbose -- Plugins cannot be listed in this mode, so verbose argument is here only because argparse module always supplies verbose option and if verbose was not here it would result in error rDr)rN)rI_action_list_plugins)rrrr"r"r# _action_lists zAdmin._action_listcCs|jj}xv|jD]j}t|| st||dkr8q|jj|}x8||D],}td||j|d}|rNtd|qNWqW|jjdS)zvPrint accessible plugins Keyword arguments: verbose -- if is set to True then parameters and hints are printed rz %sNz %sT)rZ get_pluginskeysr&rlZget_plugin_hintsgetrF)rrrpluginZhintsZ parameterZhintr"r"r#rs    zAdmin._action_dbus_list_pluginscCs tddS)Nz Not supported in no_daemon mode.F)r&)rrr"r"r#rszAdmin._action_list_pluginscCs0|jj||\}}|s$|jd||jj|S)NzUnable to acquire devices: %s)rZinstance_acquire_devicesrrF)rdevicesinstancerbrcr"r"r#%_action_dbus_instance_acquire_devicessz+Admin._action_dbus_instance_acquire_devicescCs tddS)Nz Not supported in no_daemon mode.F)r&)rrrr"r"r# _action_instance_acquire_devicessz&Admin._action_instance_acquire_devicescCs^|jj|\}}}|s0|jd||jjdSx |D]\}}td||fq6W|jjdS)NzUnable to list instances: %sFz%s (%s)T)rZ get_instancesrrFr&)r plugin_namerbrcZpairsrrr"r"r#_action_dbus_get_instancess z Admin._action_dbus_get_instancescCs tddS)Nz Not supported in no_daemon mode.F)r&)rrr"r"r#_action_get_instancesszAdmin._action_get_instancescCsR|jj|\}}}|s0|jd||jjdSx|D] }t|q6W|jjdS)NzUnable to list devices: %sFT)rZinstance_get_devicesrrFr&)rrrbrcrZdevicer"r"r#!_action_dbus_instance_get_devicess   z'Admin._action_dbus_instance_get_devicescCs tddS)Nz Not supported in no_daemon mode.F)r&)rrr"r"r#_action_instance_get_devicessz"Admin._action_instance_get_devicesN)r )r )rDF)rDF)F)F)7__name__ __module__ __qualname__rZ ADMIN_TIMEOUTloggingZERRORr$rrr4r<rArGrIrKrNrOrQrRrVrWrXrYrZrErHr]r_r`rdrgr8rqrrrsrtrvrxryrzr}r~rrrmrrrrrrrrrr"r"r"r#r sd              r )Z __future__rZ tuned.adminrZtuned.utils.commandsrZtuned.profilesrr exceptionsrZtuned.exceptionsrZ tuned.constsrZtuned.utils.profile_recommenderrr-r'r1rerrobjectr r"r"r"r#s       PK$2]/admin/__pycache__/__init__.cpython-36.opt-1.pycnu[3 sPK$2]ϨA^^1admin/__pycache__/exceptions.cpython-36.opt-1.pycnu[3 sPK$2]ϨA^^+admin/__pycache__/exceptions.cpython-36.pycnu[3 sPK$2]D0admin/__pycache__/dbus_controller.cpython-36.pycnu[3 d?Z!d@dAZ"dBS)DrFcCsL||_||_||_d|_d|_||_d|_d|_d|_d|_ d|_ d|_ dS)NTF) _bus_name_interface_name _object_name_proxy _interface_debug _main_loop_action_on_exit_action_ret_exit _exception)selfZbus_nameZinterface_nameZ object_namedebugr%/usr/lib/python3.6/dbus_controller.py__init__ szDBusController.__init__c CsvyP|jdkrNtddtj|_tj}|j|j|j |_tj |j|j d|_ Wn tj jk rptdYnXdS)NT)Zset_as_default)Zdbus_interfacez>Cannot talk to TuneD daemon via DBus. Is TuneD daemon running?)r rrZMainLooprdbusZ SystemBusZ get_objectrr Z Interfacer r exceptions DBusExceptionr)rZbusrrr _init_proxys   zDBusController._init_proxycCs|jdk rPy|j|j|j|_Wn.tk rN}z||_d|_WYdd}~XnX|jr~|jdk rp|j|j|j |j j dSt j ddS)NTFr)r _action_args_action_kwargsZ_action_exit_coderrrr_on_exit_action_args_on_exit_action_kwargsrquittimeZsleep)rerrr_idle$s    zDBusController._idlecOs||_||_||_dS)N)rrr )ractionargskwargsrrrset_on_exit_action7sz!DBusController.set_on_exit_actioncOs||_||_||_dS)N)rrr)rr%r&r'rrr set_action<szDBusController.set_actioncCs2d|_tj|j|jj|jdk r,|j|jS)N)rrZidle_addr$rrunr)rrrrr*As    zDBusController.runcOsp|jy|jj|}||ddiStjjk rj}z(d}|jrR|dt|7}t|WYdd}~XnXdS)Ntimeout(z DBus call to TuneD daemon failedz (%s)) rr Zget_dbus_methodrrrr strr)rZ method_namer&r'methodZdbus_exceptionZerr_strrrr_callJs zDBusController._callcCs|j|jj||dS)N)rr Zconnect_to_signal)rsignalcbrrrset_signal_handlerVsz!DBusController.set_signal_handlercCs |jdS)N is_running)r/)rrrrr3ZszDBusController.is_runningcCs |jdS)Nstart)r/)rrrrr4]szDBusController.startcCs |jdS)Nstop)r/)rrrrr5`szDBusController.stopcCs |jdS)Nprofiles)r/)rrrrr6cszDBusController.profilescCs |jdS)N profiles2)r/)rrrrr7fszDBusController.profiles2cCs |jd|S)N profile_info)r/)rZ profile_namerrrr8iszDBusController.profile_infocCs|jd||S)Nlog_capture_start)r/)rZ log_levelr+rrrr9lsz DBusController.log_capture_startcCs |jd|S)Nlog_capture_finish)r/)rtokenrrrr:osz!DBusController.log_capture_finishcCs |jdS)Nactive_profile)r/)rrrrr<rszDBusController.active_profilecCs |jdS)N profile_mode)r/)rrrrr=uszDBusController.profile_modecCs |jdS)Npost_loaded_profile)r/)rrrrr>xsz"DBusController.post_loaded_profilecCs|dkr dS|jd|S)NFNo profile specifiedswitch_profile)Fr@)r/)rZ new_profilerrrrA{szDBusController.switch_profilecCs |jdS)N auto_profile)r/)rrrrrBszDBusController.auto_profilecCs |jdS)Nrecommend_profile)r/)rrrrrCsz DBusController.recommend_profilecCs |jdS)Nverify_profile)r/)rrrrrDszDBusController.verify_profilecCs |jdS)Nverify_profile_ignore_missing)r/)rrrrrEsz,DBusController.verify_profile_ignore_missingcCs |jdS)Ndisable)r/)rrrroffszDBusController.offcCs |jdS)zzReturn dict with plugin names and their hints Return: dictionary -- {plugin_name: {parameter_name: default_value}} Zget_all_plugins)r/)rrrr get_pluginsszDBusController.get_pluginscCs |jd|S)z"Return docstring of plugin's classget_plugin_documentation)r/)r plugin_namerrrrIsz'DBusController.get_plugin_documentationcCs |jd|S)zReturn dictionary with parameters of plugin and their hints Parameters: plugin_name -- name of plugin Return: dictionary -- {parameter_name: hint} get_plugin_hints)r/)rrJrrrrKs zDBusController.get_plugin_hintscCs|jd||S)Ninstance_acquire_devices)r/)rZdevicesinstancerrrrLsz'DBusController.instance_acquire_devicescCs |jd|S)N get_instances)r/)rrJrrrrNszDBusController.get_instancescCs |jd|S)Ninstance_get_devices)r/)rrMrrrrOsz#DBusController.instance_get_devicescCs|jd||_d|_|S)NT)r)rr)rretrrrexits zDBusController.exitN)F)#__name__ __module__ __qualname__rrr$r(r)r*r/r2r3r4r5r6r7r8r9r:r<r=r>rArBrCrDrErGrHrIrKrLrNrOrQrrrrr s@     ) rZdbus.exceptionsr"Zdbus.mainloop.glibrZ gi.repositoryrrrr__all__objectrrrrrs  PK$2] VsBB,admin/__pycache__/admin.cpython-36.opt-1.pycnu[3 @sddlmZddlZddlmZddlmZddl m Z ddl m Z ddl jZddlmZddlZddlZddlZddlZddlZddlZGd d d eZdS) )print_functionN)commands)Locator)TunedAdminDBusException)TunedException)ProfileRecommenderc@seZdZdddejejfddZddZddZ d d Z d d Z d dZ ddZ ddZddZddZddZddZddZddZdfd d!Zdgd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zd6d7Z d8d9Z!d:d;Z"dd?Z$d@dAZ%dBdCZ&dDdEZ'dFdGZ(dHdIZ)dJdKZ*dLdMZ+dNdOZ,dhdQdRZ-didSdTZ.djdUdVZ/dkdWdXZ0dYdZZ1d[d\Z2d]d^Z3d_d`Z4dadbZ5dcddZ6deS)lAdminTFcCs||_||_||_||_t||_ttj|_ t j |_ d|_ d|_d|_d|_d|_||_t|_|jrtjjtjtjtj||_y|jjtj|jWn2tk r}z|j|d|_WYdd}~XnXdS)NTF) _dbusZ_debug_async_timeoutr_cmdprofiles_locatorconstsZLOAD_DIRECTORIES_profiles_locator threadingZEvent_daemon_action_finished_daemon_action_profile_daemon_action_result_daemon_action_errstr _controller _log_token _log_levelr_profile_recommendertunedZadminZDBusControllerZDBUS_BUSZDBUS_INTERFACEZ DBUS_OBJECTZset_signal_handlerZSIGNAL_PROFILE_CHANGED_signal_profile_changed_cbr_error)selfZdbusdebugZasyncotimeoutZ log_leveler"/usr/lib/python3.6/admin.py__init__s*    zAdmin.__init__cCst|tjddS)N)file)printsysstderr)rmessager"r"r#r+sz Admin._errorcCs*|jjs&||_||_||_|jjdS)N)rZis_setrrrset)r profile_nameresultZerrstrr"r"r#r.s  z Admin._signal_profile_changed_cbcCsnytjt|jjtjdWnJtk rF}z |jtj kSd}~Xn$t t fk rh}zdSd}~XnXdS)NrFT) oskillintrZ read_filerZPID_FILEOSErrorerrnoZEPERM ValueErrorIOError)rr!r"r"r#_tuned_is_running6szAdmin._tuned_is_runningc-Os6|dks|dkrdSd}d}d}yt|d|}Wn(tk rZ}z d|_WYdd}~XnXyt|d|}WnBtk r}z&|js|jt|d|dSWYdd}~XnX|jr y0|jj|j|jj|f|||jj }Wn4t k r}z|j|d|_WYdd}~XnX|js2|||}|S)Nr FZ _action_dbus_Z_action_z , action '%s' is not implemented) getattrAttributeErrorr rstrrZset_on_exit_action_log_capture_finish set_actionZrunr)rZ action_nameargskwargsactionZ action_dbusresr!r"r"r#r<@s6  z Admin.actioncCshtdxZ|D]R}|ddk rP|ddkrPt|jjd|ddd|dqtd|dqWdS)NzAvailable profiles:rr z- %sr)r&rZ align_str)r profile_namesprofiler"r"r#_print_profiles^s  &zAdmin._print_profilescCsdy|jj}Wn6tk rD}zdd|jjD}WYdd}~XnX|j||j|jjdS)NcSsg|] }|dfqS)r r").0r@r"r"r# ksz4Admin._action_dbus_list_profiles..T)rZ profiles2rprofilesrA_action_dbus_activeexit)rr?r!r"r"r#_action_dbus_list_profilesfs& z Admin._action_dbus_list_profilescCs|j|jj|jdS)NT)rArZget_known_names_summary_action_active)rr"r"r#_action_list_profilespszAdmin._action_list_profilescCs&|jj}|dkrd}|jjd|S)Nr T)ractive_profilerF)rr+r"r"r#_dbus_get_active_profileus   zAdmin._dbus_get_active_profilecCs|jj\}}|S)N)rget_active_profile)rr+manualr"r"r#_get_active_profile|szAdmin._get_active_profilecCs.|jj\}}|dkr|dk }|r(tjStjS)N)rrLrZACTIVE_PROFILE_MANUALZACTIVE_PROFILE_AUTO)rr@rMr"r"r#_get_profile_modeszAdmin._get_profile_modecCs|jj}|dkrd}|S)Nr )rpost_loaded_profile)rr+r"r"r#_dbus_get_post_loaded_profiles z#Admin._dbus_get_post_loaded_profilecCs|jj}|S)N)rZget_post_loaded_profile)rr+r"r"r#_get_post_loaded_profiles zAdmin._get_post_loaded_profilecCsl|ddkrXtdt|dttdt|dttdt|ddStd |d SdS) NrTz Profile name:rzProfile summary:zProfile description:z,Unable to get information about profile '%s'F)r&)rr@ profile_infor"r"r#_print_profile_infos     zAdmin._print_profile_infor cCsB|dkr|j}|r*|j||jj|}n tdd}|jj|S)Nr zNo current active profile.F)rKrVrrUr&rF)rr@r=r"r"r#_action_dbus_profile_infoszAdmin._action_dbus_profile_infocCs||dkrXy |j}|dkr&tddSWn.tk rV}z|jt|dSd}~XnX|j||jj|tj tj gddgS)Nr zNo current active profile.F) rNr&rrr7rVrZget_profile_attrsrZPROFILE_ATTR_SUMMARYZPROFILE_ATTR_DESCRIPTION)rr@r!r"r"r#_action_profile_infoszAdmin._action_profile_infocCs$|dkrtddStd|dS)NzNo current active profile.FzCurrent active profile: %sT)r&)rr+r"r"r#_print_profile_names  zAdmin._print_profile_namecCs|rtd|dS)NzCurrent post-loaded profile: %s)r&)rr+r"r"r#_print_post_loaded_profilesz Admin._print_post_loaded_profilecCs4|j}|j|}|r(|j}|j||jj|S)N)rKrYrQrZrrF)rrJr=rPr"r"r#rEs   zAdmin._action_dbus_activecCsy2|j}|j}|r0|r$|d7}nd}||7}Wn.tk r`}z|jt|dSd}~XnX|dk r|j rtdtd||rtd|dS|j|}|j||S)N r FzKIt seems that tuned daemon is not running, preset profile is not activated.zPreset profile: %szPreset post-loaded profile: %sT) rNrRrrr7r4r&rYrZ)rr+rPr!r=r"r"r#rHs(      zAdmin._action_activecCstd|dS)NzProfile selection mode: )r&)rmoder"r"r#_print_profile_modeszAdmin._print_profile_modecCsB|jj\}}|j||dkr6|j||jjdS|jjdS)Nr FT)rZ profile_moder]rrF)rr\errorr"r"r#_action_dbus_profile_modes    zAdmin._action_dbus_profile_modecCsJy|j}|j|dStk rD}z|jt|dSd}~XnXdS)NTF)rOr]rrr7)rr\r!r"r"r#_action_profile_modes zAdmin._action_profile_modecCs>|r,|jj r:|jj r:|jdd}n|jd||S)NzCannot enable the tuning.FzUnable to switch profile: %s)rZ is_runningstartr)rretmsgr"r"r#_profile_print_statuss  zAdmin._profile_print_statuscCsrtj|j|jkr.td|j|jjdS|jjrn|j|krn|j sbtd|j |jjdS|jjdSdS)NzOperation timed out after waiting %d seconds(s), you may try to increase timeout by using --timeout command line option or using --async.FzError changing profile: %sT) time _timestampr r&rrFrZisSetrrr)rr+r"r"r#_action_dbus_wait_profiles     zAdmin._action_dbus_wait_profilecCs||jdks|jdkrdSy2|jj|j}d|_t|dtjdtjjWn,tk rv}z|jdWYdd}~XnXdS)Nr )endr%zUError: Failed to stop log capture. Restart the TuneD daemon to prevent a memory leak.) rrZlog_capture_finishr&r'r(flushrr)rZlog_msgsr!r"r"r#r8 szAdmin._log_capture_finishcCst|dkr|jSdj|}|dkr2|jjdS|jj|j rn|jdk rn|j dd}|jj |j||_ |jj |\}}|js| r|jj|j ||Stj|_|jj|j||j ||S)Nrr[r F)len_action_dbus_listjoinrrFrclearr rr log_capture_startrZswitch_profilerdrerfr9rg)rrDr+r rbrcr"r"r#_action_dbus_profiles        zAdmin._action_dbus_profilecCs<td|jjdddg\}}|dkr0tdntddS)NzTrying to (re)start tuned...ZservicerZrestartrz#TuneD (re)started, changes applied.zQTuneD (re)start failed, you need to (re)start TuneD by hand for changes to apply.)r&rZexecute)rrbrcr"r"r#_restart_tuned+s  zAdmin._restart_tunedcCsz||jjkrdy|jj|||jdStk r`}z|jt||jddSd}~XqvXn|jd|dSdS)NTzUnable to switch profile.Fz%Requested profile '%s' doesn't exist.)rZget_known_namesrZsave_active_profilerrrrr7)rr+rMr!r"r"r# _set_profile3s zAdmin._set_profilecCs6t|dkr|jSdj|}|dkr*dS|j|dS)Nrr[r FT)rlrIrnrs)rrDr+r"r"r#_action_profileAs   zAdmin._action_profilecCs|jj}|jj|j rF|jdk rF|jdd}|jj|j||_|jj \}}|js`| rt|jj |j ||St j |_ |jj|j||j ||S)Nrjrk)rrecommend_profilerror rr rprZ auto_profilerFrdrerfr9rg)rr+r rbrcr"r"r#_action_dbus_auto_profileIs     zAdmin._action_dbus_auto_profilecCs|jj}|j|dS)NF)r recommendrs)rr+r"r"r#_action_auto_profileYs zAdmin._action_auto_profilecCst|jj|jjdS)NT)r&rrurF)rr"r"r#_action_dbus_recommend_profile]sz$Admin._action_dbus_recommend_profilecCst|jjdS)NT)r&rrw)rr"r"r#_action_recommend_profileaszAdmin._action_recommend_profilecCsr|r|jj}n |jj}|r(tdn0tdtdtdtdtdtdtdtj|jj|S) NzIVerification succeeded, current system settings match the preset profile.zLVerification failed, current system settings differ from the preset profile.z=You can mostly fix this by restarting the TuneD daemon, e.g.:z systemctl restart tunedorz service tuned restartzNSometimes (if some plugins like bootloader are used) a reboot may be required.z&See TuneD log file ('%s') for details.)rZverify_profile_ignore_missingZverify_profiler&rZLOG_FILErF)rignore_missingrbr"r"r#_action_dbus_verify_profilees   z!Admin._action_dbus_verify_profilecCs tddS)Nz Not supported in no_daemon mode.F)r&)rr|r"r"r#_action_verify_profilevszAdmin._action_verify_profilecCs:d}|jj|j||_|jj}|s.|jd|jj|S)NrjrkzCannot disable active profile.r>)rrprrZoffrrF)rr rbr"r"r#_action_dbus_offzs   zAdmin._action_dbus_offcCs tddS)Nz Not supported in no_daemon mode.F)r&)rr"r"r# _action_offszAdmin._action_offrDcCs(|dkr|jS|dkr$|j|dSdS)aDPrint accessible profiles or plugins got from TuneD dbus api Keyword arguments: list_choice -- argument from command line deciding what will be listed verbose -- if True then list plugin's config options and their hints if possible. Functional only with plugin listing, with profiles this argument is omitted rDplugins)verboseN)rG_action_dbus_list_plugins)r list_choicerr"r"r#rms zAdmin._action_dbus_listcCs(|dkr|jS|dkr$|j|dSdS)aaPrint accessible profiles or plugins with no daemon mode Keyword arguments: list_choice -- argument from command line deciding what will be listed verbose -- Plugins cannot be listed in this mode, so verbose argument is here only because argparse module always supplies verbose option and if verbose was not here it would result in error rDr)rN)rI_action_list_plugins)rrrr"r"r# _action_lists zAdmin._action_listcCs|jj}xv|jD]j}t|| st||dkr8q|jj|}x8||D],}td||j|d}|rNtd|qNWqW|jjdS)zvPrint accessible plugins Keyword arguments: verbose -- if is set to True then parameters and hints are printed rz %sNz %sT)rZ get_pluginskeysr&rlZget_plugin_hintsgetrF)rrrpluginZhintsZ parameterZhintr"r"r#rs    zAdmin._action_dbus_list_pluginscCs tddS)Nz Not supported in no_daemon mode.F)r&)rrr"r"r#rszAdmin._action_list_pluginscCs0|jj||\}}|s$|jd||jj|S)NzUnable to acquire devices: %s)rZinstance_acquire_devicesrrF)rdevicesinstancerbrcr"r"r#%_action_dbus_instance_acquire_devicessz+Admin._action_dbus_instance_acquire_devicescCs tddS)Nz Not supported in no_daemon mode.F)r&)rrrr"r"r# _action_instance_acquire_devicessz&Admin._action_instance_acquire_devicescCs^|jj|\}}}|s0|jd||jjdSx |D]\}}td||fq6W|jjdS)NzUnable to list instances: %sFz%s (%s)T)rZ get_instancesrrFr&)r plugin_namerbrcZpairsrrr"r"r#_action_dbus_get_instancess z Admin._action_dbus_get_instancescCs tddS)Nz Not supported in no_daemon mode.F)r&)rrr"r"r#_action_get_instancesszAdmin._action_get_instancescCsR|jj|\}}}|s0|jd||jjdSx|D] }t|q6W|jjdS)NzUnable to list devices: %sFT)rZinstance_get_devicesrrFr&)rrrbrcrZdevicer"r"r#!_action_dbus_instance_get_devicess   z'Admin._action_dbus_instance_get_devicescCs tddS)Nz Not supported in no_daemon mode.F)r&)rrr"r"r#_action_instance_get_devicessz"Admin._action_instance_get_devicesN)r )r )rDF)rDF)F)F)7__name__ __module__ __qualname__rZ ADMIN_TIMEOUTloggingZERRORr$rrr4r<rArGrIrKrNrOrQrRrVrWrXrYrZrErHr]r_r`rdrgr8rqrrrsrtrvrxryrzr}r~rrrmrrrrrrrrrr"r"r"r#r sd              r )Z __future__rZ tuned.adminrZtuned.utils.commandsrZtuned.profilesrr exceptionsrZtuned.exceptionsrZ tuned.constsrZtuned.utils.profile_recommenderrr-r'r1rerrobjectr r"r"r"r#s       PK$2]D6admin/__pycache__/dbus_controller.cpython-36.opt-1.pycnu[3 d?Z!d@dAZ"dBS)DrFcCsL||_||_||_d|_d|_||_d|_d|_d|_d|_ d|_ d|_ dS)NTF) _bus_name_interface_name _object_name_proxy _interface_debug _main_loop_action_on_exit_action_ret_exit _exception)selfZbus_nameZinterface_nameZ object_namedebugr%/usr/lib/python3.6/dbus_controller.py__init__ szDBusController.__init__c CsvyP|jdkrNtddtj|_tj}|j|j|j |_tj |j|j d|_ Wn tj jk rptdYnXdS)NT)Zset_as_default)Zdbus_interfacez>Cannot talk to TuneD daemon via DBus. Is TuneD daemon running?)r rrZMainLooprdbusZ SystemBusZ get_objectrr Z Interfacer r exceptions DBusExceptionr)rZbusrrr _init_proxys   zDBusController._init_proxycCs|jdk rPy|j|j|j|_Wn.tk rN}z||_d|_WYdd}~XnX|jr~|jdk rp|j|j|j |j j dSt j ddS)NTFr)r _action_args_action_kwargsZ_action_exit_coderrrr_on_exit_action_args_on_exit_action_kwargsrquittimeZsleep)rerrr_idle$s    zDBusController._idlecOs||_||_||_dS)N)rrr )ractionargskwargsrrrset_on_exit_action7sz!DBusController.set_on_exit_actioncOs||_||_||_dS)N)rrr)rr%r&r'rrr set_action<szDBusController.set_actioncCs2d|_tj|j|jj|jdk r,|j|jS)N)rrZidle_addr$rrunr)rrrrr*As    zDBusController.runcOsp|jy|jj|}||ddiStjjk rj}z(d}|jrR|dt|7}t|WYdd}~XnXdS)Ntimeout(z DBus call to TuneD daemon failedz (%s)) rr Zget_dbus_methodrrrr strr)rZ method_namer&r'methodZdbus_exceptionZerr_strrrr_callJs zDBusController._callcCs|j|jj||dS)N)rr Zconnect_to_signal)rsignalcbrrrset_signal_handlerVsz!DBusController.set_signal_handlercCs |jdS)N is_running)r/)rrrrr3ZszDBusController.is_runningcCs |jdS)Nstart)r/)rrrrr4]szDBusController.startcCs |jdS)Nstop)r/)rrrrr5`szDBusController.stopcCs |jdS)Nprofiles)r/)rrrrr6cszDBusController.profilescCs |jdS)N profiles2)r/)rrrrr7fszDBusController.profiles2cCs |jd|S)N profile_info)r/)rZ profile_namerrrr8iszDBusController.profile_infocCs|jd||S)Nlog_capture_start)r/)rZ log_levelr+rrrr9lsz DBusController.log_capture_startcCs |jd|S)Nlog_capture_finish)r/)rtokenrrrr:osz!DBusController.log_capture_finishcCs |jdS)Nactive_profile)r/)rrrrr<rszDBusController.active_profilecCs |jdS)N profile_mode)r/)rrrrr=uszDBusController.profile_modecCs |jdS)Npost_loaded_profile)r/)rrrrr>xsz"DBusController.post_loaded_profilecCs|dkr dS|jd|S)NFNo profile specifiedswitch_profile)Fr@)r/)rZ new_profilerrrrA{szDBusController.switch_profilecCs |jdS)N auto_profile)r/)rrrrrBszDBusController.auto_profilecCs |jdS)Nrecommend_profile)r/)rrrrrCsz DBusController.recommend_profilecCs |jdS)Nverify_profile)r/)rrrrrDszDBusController.verify_profilecCs |jdS)Nverify_profile_ignore_missing)r/)rrrrrEsz,DBusController.verify_profile_ignore_missingcCs |jdS)Ndisable)r/)rrrroffszDBusController.offcCs |jdS)zzReturn dict with plugin names and their hints Return: dictionary -- {plugin_name: {parameter_name: default_value}} Zget_all_plugins)r/)rrrr get_pluginsszDBusController.get_pluginscCs |jd|S)z"Return docstring of plugin's classget_plugin_documentation)r/)r plugin_namerrrrIsz'DBusController.get_plugin_documentationcCs |jd|S)zReturn dictionary with parameters of plugin and their hints Parameters: plugin_name -- name of plugin Return: dictionary -- {parameter_name: hint} get_plugin_hints)r/)rrJrrrrKs zDBusController.get_plugin_hintscCs|jd||S)Ninstance_acquire_devices)r/)rZdevicesinstancerrrrLsz'DBusController.instance_acquire_devicescCs |jd|S)N get_instances)r/)rrJrrrrNszDBusController.get_instancescCs |jd|S)Ninstance_get_devices)r/)rrMrrrrOsz#DBusController.instance_get_devicescCs|jd||_d|_|S)NT)r)rr)rretrrrexits zDBusController.exitN)F)#__name__ __module__ __qualname__rrr$r(r)r*r/r2r3r4r5r6r7r8r9r:r<r=r>rArBrCrDrErGrHrIrKrLrNrOrQrrrrr s@     ) rZdbus.exceptionsr"Zdbus.mainloop.glibrZ gi.repositoryrrrr__all__objectrrrrrs  PK$2])admin/__pycache__/__init__.cpython-36.pycnu[3 sPK$2]ϐ__admin/exceptions.pynu[import tuned.exceptions class TunedAdminDBusException(tuned.exceptions.TunedException): pass PK$2]϶c>>admin/admin.pynu[ from __future__ import print_function import tuned.admin from tuned.utils.commands import commands from tuned.profiles import Locator as profiles_locator from .exceptions import TunedAdminDBusException from tuned.exceptions import TunedException import tuned.consts as consts from tuned.utils.profile_recommender import ProfileRecommender import os import sys import errno import time import threading import logging class Admin(object): def __init__(self, dbus = True, debug = False, asynco = False, timeout = consts.ADMIN_TIMEOUT, log_level = logging.ERROR): self._dbus = dbus self._debug = debug self._async = asynco self._timeout = timeout self._cmd = commands(debug) self._profiles_locator = profiles_locator(consts.LOAD_DIRECTORIES) self._daemon_action_finished = threading.Event() self._daemon_action_profile = "" self._daemon_action_result = True self._daemon_action_errstr = "" self._controller = None self._log_token = None self._log_level = log_level self._profile_recommender = ProfileRecommender() if self._dbus: self._controller = tuned.admin.DBusController(consts.DBUS_BUS, consts.DBUS_INTERFACE, consts.DBUS_OBJECT, debug) try: self._controller.set_signal_handler(consts.SIGNAL_PROFILE_CHANGED, self._signal_profile_changed_cb) except TunedAdminDBusException as e: self._error(e) self._dbus = False def _error(self, message): print(message, file=sys.stderr) def _signal_profile_changed_cb(self, profile_name, result, errstr): # ignore successive signals if the signal is not yet processed if not self._daemon_action_finished.is_set(): self._daemon_action_profile = profile_name self._daemon_action_result = result self._daemon_action_errstr = errstr self._daemon_action_finished.set() def _tuned_is_running(self): try: os.kill(int(self._cmd.read_file(consts.PID_FILE)), 0) except OSError as e: return e.errno == errno.EPERM except (ValueError, IOError) as e: return False return True # run the action specified by the action_name with args def action(self, action_name, *args, **kwargs): if action_name is None or action_name == "": return False action = None action_dbus = None res = False try: action_dbus = getattr(self, "_action_dbus_" + action_name) except AttributeError as e: self._dbus = False try: action = getattr(self, "_action_" + action_name) except AttributeError as e: if not self._dbus: self._error(str(e) + ", action '%s' is not implemented" % action_name) return False if self._dbus: try: self._controller.set_on_exit_action( self._log_capture_finish) self._controller.set_action(action_dbus, *args, **kwargs) res = self._controller.run() except TunedAdminDBusException as e: self._error(e) self._dbus = False if not self._dbus: res = action(*args, **kwargs) return res def _print_profiles(self, profile_names): print("Available profiles:") for profile in profile_names: if profile[1] is not None and profile[1] != "": print(self._cmd.align_str("- %s" % profile[0], 30, "- %s" % profile[1])) else: print("- %s" % profile[0]) def _action_dbus_list_profiles(self): try: profile_names = self._controller.profiles2() except TunedAdminDBusException as e: # fallback to older API profile_names = [(profile, "") for profile in self._controller.profiles()] self._print_profiles(profile_names) self._action_dbus_active() return self._controller.exit(True) def _action_list_profiles(self): self._print_profiles(self._profiles_locator.get_known_names_summary()) self._action_active() return True def _dbus_get_active_profile(self): profile_name = self._controller.active_profile() if profile_name == "": profile_name = None self._controller.exit(True) return profile_name def _get_active_profile(self): profile_name, manual = self._cmd.get_active_profile() return profile_name def _get_profile_mode(self): (profile, manual) = self._cmd.get_active_profile() if manual is None: manual = profile is not None return consts.ACTIVE_PROFILE_MANUAL if manual else consts.ACTIVE_PROFILE_AUTO def _dbus_get_post_loaded_profile(self): profile_name = self._controller.post_loaded_profile() if profile_name == "": profile_name = None return profile_name def _get_post_loaded_profile(self): profile_name = self._cmd.get_post_loaded_profile() return profile_name def _print_profile_info(self, profile, profile_info): if profile_info[0] == True: print("Profile name:") print(profile_info[1]) print() print("Profile summary:") print(profile_info[2]) print() print("Profile description:") print(profile_info[3]) return True else: print("Unable to get information about profile '%s'" % profile) return False def _action_dbus_profile_info(self, profile = ""): if profile == "": profile = self._dbus_get_active_profile() if profile: res = self._print_profile_info(profile, self._controller.profile_info(profile)) else: print("No current active profile.") res = False return self._controller.exit(res) def _action_profile_info(self, profile = ""): if profile == "": try: profile = self._get_active_profile() if profile is None: print("No current active profile.") return False except TunedException as e: self._error(str(e)) return False return self._print_profile_info(profile, self._profiles_locator.get_profile_attrs(profile, [consts.PROFILE_ATTR_SUMMARY, consts.PROFILE_ATTR_DESCRIPTION], ["", ""])) def _print_profile_name(self, profile_name): if profile_name is None: print("No current active profile.") return False else: print("Current active profile: %s" % profile_name) return True def _print_post_loaded_profile(self, profile_name): if profile_name: print("Current post-loaded profile: %s" % profile_name) def _action_dbus_active(self): active_profile = self._dbus_get_active_profile() res = self._print_profile_name(active_profile) if res: post_loaded_profile = self._dbus_get_post_loaded_profile() self._print_post_loaded_profile(post_loaded_profile) return self._controller.exit(res) def _action_active(self): try: profile_name = self._get_active_profile() post_loaded_profile = self._get_post_loaded_profile() # The result of the DBus call active_profile includes # the post-loaded profile, so add it here as well if post_loaded_profile: if profile_name: profile_name += " " else: profile_name = "" profile_name += post_loaded_profile except TunedException as e: self._error(str(e)) return False if profile_name is not None and not self._tuned_is_running(): print("It seems that tuned daemon is not running, preset profile is not activated.") print("Preset profile: %s" % profile_name) if post_loaded_profile: print("Preset post-loaded profile: %s" % post_loaded_profile) return True res = self._print_profile_name(profile_name) self._print_post_loaded_profile(post_loaded_profile) return res def _print_profile_mode(self, mode): print("Profile selection mode: " + mode) def _action_dbus_profile_mode(self): mode, error = self._controller.profile_mode() self._print_profile_mode(mode) if error != "": self._error(error) return self._controller.exit(False) return self._controller.exit(True) def _action_profile_mode(self): try: mode = self._get_profile_mode() self._print_profile_mode(mode) return True except TunedException as e: self._error(str(e)) return False def _profile_print_status(self, ret, msg): if ret: if not self._controller.is_running() and not self._controller.start(): self._error("Cannot enable the tuning.") ret = False else: self._error("Unable to switch profile: %s" % msg) return ret def _action_dbus_wait_profile(self, profile_name): if time.time() >= self._timestamp + self._timeout: print("Operation timed out after waiting %d seconds(s), you may try to increase timeout by using --timeout command line option or using --async." % self._timeout) return self._controller.exit(False) if self._daemon_action_finished.isSet(): if self._daemon_action_profile == profile_name: if not self._daemon_action_result: print("Error changing profile: %s" % self._daemon_action_errstr) return self._controller.exit(False) return self._controller.exit(True) return False def _log_capture_finish(self): if self._log_token is None or self._log_token == "": return try: log_msgs = self._controller.log_capture_finish( self._log_token) self._log_token = None print(log_msgs, end = "", file = sys.stderr) sys.stderr.flush() except TunedAdminDBusException as e: self._error("Error: Failed to stop log capture. Restart the TuneD daemon to prevent a memory leak.") def _action_dbus_profile(self, profiles): if len(profiles) == 0: return self._action_dbus_list() profile_name = " ".join(profiles) if profile_name == "": return self._controller.exit(False) self._daemon_action_finished.clear() if not self._async and self._log_level is not None: # 25 seconds default DBus timeout + 5 secs safety margin timeout = self._timeout + 25 + 5 self._log_token = self._controller.log_capture_start( self._log_level, timeout) (ret, msg) = self._controller.switch_profile(profile_name) if self._async or not ret: return self._controller.exit(self._profile_print_status(ret, msg)) else: self._timestamp = time.time() self._controller.set_action(self._action_dbus_wait_profile, profile_name) return self._profile_print_status(ret, msg) def _restart_tuned(self): print("Trying to (re)start tuned...") (ret, msg) = self._cmd.execute(["service", "tuned", "restart"]) if ret == 0: print("TuneD (re)started, changes applied.") else: print("TuneD (re)start failed, you need to (re)start TuneD by hand for changes to apply.") def _set_profile(self, profile_name, manual): if profile_name in self._profiles_locator.get_known_names(): try: self._cmd.save_active_profile(profile_name, manual) self._restart_tuned() return True except TunedException as e: self._error(str(e)) self._error("Unable to switch profile.") return False else: self._error("Requested profile '%s' doesn't exist." % profile_name) return False def _action_profile(self, profiles): if len(profiles) == 0: return self._action_list_profiles() profile_name = " ".join(profiles) if profile_name == "": return False return self._set_profile(profile_name, True) def _action_dbus_auto_profile(self): profile_name = self._controller.recommend_profile() self._daemon_action_finished.clear() if not self._async and self._log_level is not None: # 25 seconds default DBus timeout + 5 secs safety margin timeout = self._timeout + 25 + 5 self._log_token = self._controller.log_capture_start( self._log_level, timeout) (ret, msg) = self._controller.auto_profile() if self._async or not ret: return self._controller.exit(self._profile_print_status(ret, msg)) else: self._timestamp = time.time() self._controller.set_action(self._action_dbus_wait_profile, profile_name) return self._profile_print_status(ret, msg) def _action_auto_profile(self): profile_name = self._profile_recommender.recommend() return self._set_profile(profile_name, False) def _action_dbus_recommend_profile(self): print(self._controller.recommend_profile()) return self._controller.exit(True) def _action_recommend_profile(self): print(self._profile_recommender.recommend()) return True def _action_dbus_verify_profile(self, ignore_missing): if ignore_missing: ret = self._controller.verify_profile_ignore_missing() else: ret = self._controller.verify_profile() if ret: print("Verification succeeded, current system settings match the preset profile.") else: print("Verification failed, current system settings differ from the preset profile.") print("You can mostly fix this by restarting the TuneD daemon, e.g.:") print(" systemctl restart tuned") print("or") print(" service tuned restart") print("Sometimes (if some plugins like bootloader are used) a reboot may be required.") print("See TuneD log file ('%s') for details." % consts.LOG_FILE) return self._controller.exit(ret) def _action_verify_profile(self, ignore_missing): print("Not supported in no_daemon mode.") return False def _action_dbus_off(self): # 25 seconds default DBus timeout + 5 secs safety margin timeout = 25 + 5 self._log_token = self._controller.log_capture_start( self._log_level, timeout) ret = self._controller.off() if not ret: self._error("Cannot disable active profile.") return self._controller.exit(ret) def _action_off(self): print("Not supported in no_daemon mode.") return False def _action_dbus_list(self, list_choice="profiles", verbose=False): """Print accessible profiles or plugins got from TuneD dbus api Keyword arguments: list_choice -- argument from command line deciding what will be listed verbose -- if True then list plugin's config options and their hints if possible. Functional only with plugin listing, with profiles this argument is omitted """ if list_choice == "profiles": return self._action_dbus_list_profiles() elif list_choice == "plugins": return self._action_dbus_list_plugins(verbose=verbose) def _action_list(self, list_choice="profiles", verbose=False): """Print accessible profiles or plugins with no daemon mode Keyword arguments: list_choice -- argument from command line deciding what will be listed verbose -- Plugins cannot be listed in this mode, so verbose argument is here only because argparse module always supplies verbose option and if verbose was not here it would result in error """ if list_choice == "profiles": return self._action_list_profiles() elif list_choice == "plugins": return self._action_list_plugins(verbose=verbose) def _action_dbus_list_plugins(self, verbose=False): """Print accessible plugins Keyword arguments: verbose -- if is set to True then parameters and hints are printed """ plugins = self._controller.get_plugins() for plugin in plugins.keys(): print(plugin) if not verbose or len(plugins[plugin]) == 0: continue hints = self._controller.get_plugin_hints(plugin) for parameter in plugins[plugin]: print("\t%s" %(parameter)) hint = hints.get(parameter, None) if hint: print("\t\t%s" %(hint)) return self._controller.exit(True) def _action_list_plugins(self, verbose=False): print("Not supported in no_daemon mode.") return False def _action_dbus_instance_acquire_devices(self, devices, instance): (ret, msg) = self._controller.instance_acquire_devices(devices, instance) if not ret: self._error("Unable to acquire devices: %s" % msg) return self._controller.exit(ret) def _action_instance_acquire_devices(self, devices, instance): print("Not supported in no_daemon mode.") return False def _action_dbus_get_instances(self, plugin_name): (ret, msg, pairs) = self._controller.get_instances(plugin_name) if not ret: self._error("Unable to list instances: %s" % msg) return self._controller.exit(False) for instance, plugin in pairs: print("%s (%s)" % (instance, plugin)) return self._controller.exit(True) def _action_get_instances(self, plugin_name): print("Not supported in no_daemon mode.") return False def _action_dbus_instance_get_devices(self, instance): (ret, msg, devices) = self._controller.instance_get_devices(instance) if not ret: self._error("Unable to list devices: %s" % msg) return self._controller.exit(False) for device in devices: print(device) return self._controller.exit(True) def _action_instance_get_devices(self, instance): print("Not supported in no_daemon mode.") return False PK$2]L|NNadmin/__init__.pynu[from .admin import * from .exceptions import * from .dbus_controller import * PK$2]Nlogs.pynu[import atexit import logging import logging.handlers import os import os.path import inspect import tuned.consts as consts import random import string import threading try: from StringIO import StringIO except: from io import StringIO __all__ = ["get"] root_logger = None log_handlers = {} log_handlers_lock = threading.Lock() class LogHandler(object): def __init__(self, handler, stream): self.handler = handler self.stream = stream def _random_string(length): r = random.SystemRandom() chars = string.ascii_letters + string.digits res = "" for i in range(length): res += r.choice(chars) return res def log_capture_start(log_level): with log_handlers_lock: for i in range(10): token = _random_string(16) if token not in log_handlers: break else: return None stream = StringIO() handler = logging.StreamHandler(stream) handler.setLevel(log_level) formatter = logging.Formatter( "%(levelname)-8s %(name)s: %(message)s") handler.setFormatter(formatter) root_logger.addHandler(handler) log_handler = LogHandler(handler, stream) log_handlers[token] = log_handler root_logger.debug("Added log handler %s." % token) return token def log_capture_finish(token): with log_handlers_lock: try: log_handler = log_handlers[token] except KeyError: return None content = log_handler.stream.getvalue() log_handler.stream.close() root_logger.removeHandler(log_handler.handler) del log_handlers[token] root_logger.debug("Removed log handler %s." % token) return content def get(): global root_logger if root_logger is None: root_logger = logging.getLogger("tuned") calling_module = inspect.currentframe().f_back name = calling_module.f_locals["__name__"] if name == "__main__": name = "tuned" return root_logger elif name.startswith("tuned."): (root, child) = name.split(".", 1) child_logger = root_logger.getChild(child) child_logger.remove_all_handlers() child_logger.setLevel("NOTSET") return child_logger else: assert False class TunedLogger(logging.getLoggerClass()): """Custom TuneD daemon logger class.""" _formatter = logging.Formatter("%(asctime)s %(levelname)-8s %(name)s: %(message)s") _console_handler = None _file_handler = None def __init__(self, *args, **kwargs): super(TunedLogger, self).__init__(*args, **kwargs) self.setLevel(logging.INFO) self.switch_to_console() def console(self, msg, *args, **kwargs): self.log(consts.LOG_LEVEL_CONSOLE, msg, *args, **kwargs) def switch_to_console(self): self._setup_console_handler() self.remove_all_handlers() self.addHandler(self._console_handler) def switch_to_file(self, filename = consts.LOG_FILE, maxBytes = consts.LOG_FILE_MAXBYTES, backupCount = consts.LOG_FILE_COUNT): self._setup_file_handler(filename, maxBytes, backupCount) self.remove_all_handlers() self.addHandler(self._file_handler) def remove_all_handlers(self): _handlers = self.handlers for handler in _handlers: self.removeHandler(handler) @classmethod def _setup_console_handler(cls): if cls._console_handler is not None: return cls._console_handler = logging.StreamHandler() cls._console_handler.setFormatter(cls._formatter) @classmethod def _setup_file_handler(cls, filename, maxBytes, backupCount): if cls._file_handler is not None: return log_directory = os.path.dirname(filename) if log_directory == '': log_directory = '.' if not os.path.exists(log_directory): os.makedirs(log_directory) cls._file_handler = logging.handlers.RotatingFileHandler( filename, maxBytes = int(maxBytes), backupCount = int(backupCount)) cls._file_handler.setFormatter(cls._formatter) logging.addLevelName(consts.LOG_LEVEL_CONSOLE, consts.LOG_LEVEL_CONSOLE_NAME) logging.setLoggerClass(TunedLogger) atexit.register(logging.shutdown) PK$2]H"Sunits/manager.pynu[import collections import os import re import traceback import tuned.exceptions import tuned.logs import tuned.plugins.exceptions import tuned.consts as consts from tuned.utils.global_config import GlobalConfig from tuned.utils.commands import commands log = tuned.logs.get() __all__ = ["Manager"] class Manager(object): """ Manager creates plugin instances and keeps a track of them. """ def __init__(self, plugins_repository, monitors_repository, def_instance_priority, hardware_inventory, config = None): super(Manager, self).__init__() self._plugins_repository = plugins_repository self._monitors_repository = monitors_repository self._def_instance_priority = def_instance_priority self._hardware_inventory = hardware_inventory self._instances = [] self._plugins = [] self._config = config or GlobalConfig() self._cmd = commands() @property def plugins(self): return self._plugins @property def instances(self): return self._instances @property def plugins_repository(self): return self._plugins_repository def _unit_matches_cpuinfo(self, unit): if unit.cpuinfo_regex is None: return True cpuinfo_string = self._config.get(consts.CFG_CPUINFO_STRING) if cpuinfo_string is None: cpuinfo_string = self._cmd.read_file("/proc/cpuinfo") return re.search(unit.cpuinfo_regex, cpuinfo_string, re.MULTILINE) is not None def _unit_matches_uname(self, unit): if unit.uname_regex is None: return True uname_string = self._config.get(consts.CFG_UNAME_STRING) if uname_string is None: uname_string = " ".join(os.uname()) return re.search(unit.uname_regex, uname_string, re.MULTILINE) is not None def create(self, instances_config): instance_info_list = [] for instance_name, instance_info in list(instances_config.items()): if not instance_info.enabled: log.debug("skipping disabled instance '%s'" % instance_name) continue if not self._unit_matches_cpuinfo(instance_info): log.debug("skipping instance '%s', cpuinfo does not match" % instance_name) continue if not self._unit_matches_uname(instance_info): log.debug("skipping instance '%s', uname does not match" % instance_name) continue instance_info.options.setdefault("priority", self._def_instance_priority) instance_info.options["priority"] = int(instance_info.options["priority"]) instance_info_list.append(instance_info) instance_info_list.sort(key=lambda x: x.options["priority"]) plugins_by_name = collections.OrderedDict() for instance_info in instance_info_list: instance_info.options.pop("priority") plugins_by_name[instance_info.type] = None for plugin_name, none in list(plugins_by_name.items()): try: plugin = self._plugins_repository.create(plugin_name) plugins_by_name[plugin_name] = plugin self._plugins.append(plugin) except tuned.plugins.exceptions.NotSupportedPluginException: log.info("skipping plugin '%s', not supported on your system" % plugin_name) continue except Exception as e: log.error("failed to initialize plugin %s" % plugin_name) log.exception(e) continue instances = [] for instance_info in instance_info_list: plugin = plugins_by_name[instance_info.type] if plugin is None: continue log.debug("creating '%s' (%s)" % (instance_info.name, instance_info.type)) new_instance = plugin.create_instance(instance_info.name, instance_info.devices, instance_info.devices_udev_regex, \ instance_info.script_pre, instance_info.script_post, instance_info.options) instances.append(new_instance) for instance in instances: instance.plugin.init_devices() instance.plugin.assign_free_devices(instance) instance.plugin.initialize_instance(instance) # At this point we should be able to start the HW events # monitoring/processing thread, without risking race conditions self._hardware_inventory.start_processing_events() self._instances.extend(instances) def _try_call(self, caller, exc_ret, f, *args, **kwargs): try: return f(*args, **kwargs) except Exception as e: trace = traceback.format_exc() log.error("BUG: Unhandled exception in %s: %s" % (caller, str(e))) log.error(trace) return exc_ret def destroy_all(self): for instance in self._instances: log.debug("destroying instance %s" % instance.name) self._try_call("destroy_all", None, instance.plugin.destroy_instance, instance) for plugin in self._plugins: log.debug("cleaning plugin '%s'" % plugin.name) self._try_call("destroy_all", None, plugin.cleanup) del self._plugins[:] del self._instances[:] def update_monitors(self): for monitor in self._monitors_repository.monitors: log.debug("updating monitor %s" % monitor) self._try_call("update_monitors", None, monitor.update) def start_tuning(self): for instance in self._instances: self._try_call("start_tuning", None, instance.apply_tuning) def verify_tuning(self, ignore_missing): ret = True for instance in self._instances: res = self._try_call("verify_tuning", False, instance.verify_tuning, ignore_missing) if res == False: ret = False return ret def update_tuning(self): for instance in self._instances: self._try_call("update_tuning", None, instance.update_tuning) # rollback parameter is a helper telling plugins whether soft or full # rollback is needed, e.g. for bootloader plugin we need grub.cfg # tuning to persist across reboots and restarts of the daemon, so in # this case the rollback is usually set to consts.ROLLBACK_SOFT, # but we also need to clean it all up when TuneD is disabled or the # profile is changed. In this case the rollback is set to # consts.ROLLBACK_FULL. In practice it means to remove all temporal # or helper files, unpatch third party config files, etc. def stop_tuning(self, rollback = consts.ROLLBACK_SOFT): self._hardware_inventory.stop_processing_events() for instance in reversed(self._instances): self._try_call("stop_tuning", None, instance.unapply_tuning, rollback) PK$2] O/units/__pycache__/__init__.cpython-36.opt-1.pycnu[3 sPK$2]-[7vvv.units/__pycache__/manager.cpython-36.opt-1.pycnu[3 Psz Manager.create..)keyz2skipping plugin '%s', not supported on your systemzfailed to initialize plugin %szcreating '%s' (%s))*listitemsZenabledlogdebugrr"r$ setdefaultr intappendsort collections OrderedDictpoptypercreater tunedr exceptionsZNotSupportedPluginExceptioninfo ExceptionerrorZ exceptionnameZcreate_instanceZdevicesZdevices_udev_regexZ script_preZ script_postpluginZ init_devicesZassign_free_devicesZinitialize_instancer Zstart_processing_eventsr extend) rZinstances_configZinstance_info_listZ instance_nameZ instance_infoZplugins_by_nameZ plugin_nameZnoner;erZ new_instanceinstancerrrr4?s\             zManager.createcOsXy |||Stk rR}z,tj}tjd|t|ftj||Sd}~XnXdS)Nz"BUG: Unhandled exception in %s: %s)r8 traceback format_excr*r9str)rZcallerZexc_retfargskwargsr=Ztracerrr _try_callus  zManager._try_callcCsx2|jD](}tjd|j|jdd|jj|qWx.|jD]$}tjd|j|jdd|jqr;rrrrFs    zManager.destroy_allcCs4x.|jjD]"}tjd||jdd|jq WdS)Nzupdating monitor %supdate_monitors)rZmonitorsr*r+rEupdate)rZmonitorrrrrGszManager.update_monitorscCs$x|jD]}|jdd|jqWdS)N start_tuning)r rEZ apply_tuning)rr>rrrrIs zManager.start_tuningcCs6d}x,|jD]"}|jdd|j|}|dkr d}q W|S)NT verify_tuningF)r rErJ)rZignore_missingretr>resrrrrJs  zManager.verify_tuningcCs$x|jD]}|jdd|jqWdS)N update_tuning)r rErM)rr>rrrrMs zManager.update_tuningcCs4|jjx$t|jD]}|jdd|j|qWdS)N stop_tuning)r Zstop_processing_eventsreversedr rEZunapply_tuning)rZrollbackr>rrrrNs zManager.stop_tuning)N)__name__ __module__ __qualname____doc__rpropertyrrrrr"r4rErFrGrIrJrMrZ ROLLBACK_SOFTrN __classcell__rr)rrrs     6    )r0r rr?Ztuned.exceptionsr5Z tuned.logsZtuned.plugins.exceptionsZ tuned.constsrZtuned.utils.global_configrZtuned.utils.commandsrZlogsrr*__all__objectrrrrrs    PK$2]-[7vvv(units/__pycache__/manager.cpython-36.pycnu[3 Psz Manager.create..)keyz2skipping plugin '%s', not supported on your systemzfailed to initialize plugin %szcreating '%s' (%s))*listitemsZenabledlogdebugrr"r$ setdefaultr intappendsort collections OrderedDictpoptypercreater tunedr exceptionsZNotSupportedPluginExceptioninfo ExceptionerrorZ exceptionnameZcreate_instanceZdevicesZdevices_udev_regexZ script_preZ script_postpluginZ init_devicesZassign_free_devicesZinitialize_instancer Zstart_processing_eventsr extend) rZinstances_configZinstance_info_listZ instance_nameZ instance_infoZplugins_by_nameZ plugin_nameZnoner;erZ new_instanceinstancerrrr4?s\             zManager.createcOsXy |||Stk rR}z,tj}tjd|t|ftj||Sd}~XnXdS)Nz"BUG: Unhandled exception in %s: %s)r8 traceback format_excr*r9str)rZcallerZexc_retfargskwargsr=Ztracerrr _try_callus  zManager._try_callcCsx2|jD](}tjd|j|jdd|jj|qWx.|jD]$}tjd|j|jdd|jqr;rrrrFs    zManager.destroy_allcCs4x.|jjD]"}tjd||jdd|jq WdS)Nzupdating monitor %supdate_monitors)rZmonitorsr*r+rEupdate)rZmonitorrrrrGszManager.update_monitorscCs$x|jD]}|jdd|jqWdS)N start_tuning)r rEZ apply_tuning)rr>rrrrIs zManager.start_tuningcCs6d}x,|jD]"}|jdd|j|}|dkr d}q W|S)NT verify_tuningF)r rErJ)rZignore_missingretr>resrrrrJs  zManager.verify_tuningcCs$x|jD]}|jdd|jqWdS)N update_tuning)r rErM)rr>rrrrMs zManager.update_tuningcCs4|jjx$t|jD]}|jdd|j|qWdS)N stop_tuning)r Zstop_processing_eventsreversedr rEZunapply_tuning)rZrollbackr>rrrrNs zManager.stop_tuning)N)__name__ __module__ __qualname____doc__rpropertyrrrrr"r4rErFrGrIrJrMrZ ROLLBACK_SOFTrN __classcell__rr)rrrs     6    )r0r rr?Ztuned.exceptionsr5Z tuned.logsZtuned.plugins.exceptionsZ tuned.constsrZtuned.utils.global_configrZtuned.utils.commandsrZlogsrr*__all__objectrrrrrs    PK$2] O)units/__pycache__/__init__.cpython-36.pycnu[3 sPK$2]@bunits/__init__.pynu[from .manager import * PK$2]P88 exceptions.pynu[import tuned.logs import sys import traceback exception_logger = tuned.logs.get() class TunedException(Exception): """ """ def log(self, logger = None): if logger is None: logger = exception_logger logger.error(str(self)) self._log_trace(logger) def _log_trace(self, logger): (exc_type, exc_value, exc_traceback) = sys.exc_info() if exc_value != self: logger.debug("stack trace is no longer available") else: exception_info = "".join(traceback.format_exception(exc_type, exc_value, exc_traceback)).rstrip() logger.debug(exception_info) PK$2]g ??monitors/repository.pynu[import tuned.logs import tuned.monitors from tuned.utils.plugin_loader import PluginLoader log = tuned.logs.get() __all__ = ["Repository"] class Repository(PluginLoader): def __init__(self): super(Repository, self).__init__() self._monitors = set() @property def monitors(self): return self._monitors def _set_loader_parameters(self): self._namespace = "tuned.monitors" self._prefix = "monitor_" self._interface = tuned.monitors.Monitor def create(self, plugin_name, devices): log.debug("creating monitor %s" % plugin_name) monitor_cls = self.load_plugin(plugin_name) monitor_instance = monitor_cls(devices) self._monitors.add(monitor_instance) return monitor_instance def delete(self, monitor): assert isinstance(monitor, self._interface) monitor.cleanup() self._monitors.remove(monitor) PK$2]smonitors/monitor_net.pynu[import tuned.monitors import os import re from tuned.utils.nettool import ethcard class NetMonitor(tuned.monitors.Monitor): @classmethod def _init_available_devices(cls): available = [] for root, dirs, files in os.walk("/sys/devices"): if root.endswith("/net") and not root.endswith("/virtual/net"): available += dirs cls._available_devices = set(available) for dev in available: #max_speed = cls._calcspeed(ethcard(dev).get_max_speed()) cls._load[dev] = ['0', '0', '0', '0'] @classmethod def _calcspeed(cls, speed): # 0.6 is just a magical constant (empirical value): Typical workload on netcard won't exceed # that and if it does, then the code is smart enough to adapt it. # 1024 * 1024 as for MB -> B # speed / 8 Mb -> MB return (int) (0.6 * 1024 * 1024 * speed / 8) @classmethod def _updateStat(cls, dev): files = ["rx_bytes", "rx_packets", "tx_bytes", "tx_packets"] for i,f in enumerate(files): with open("/sys/class/net/" + dev + "/statistics/" + f) as statfile: cls._load[dev][i] = statfile.read().strip() @classmethod def update(cls): for device in cls._updating_devices: cls._updateStat(device) PK$2]4j j monitors/base.pynu[import tuned.logs log = tuned.logs.get() __all__ = ["Monitor"] class Monitor(object): """ Base class for all monitors. Monitors provide data about the running system to Plugin objects, which use the data to tune system parameters. Following methods require reimplementation: - _init_available_devices(cls) - update(cls) """ # class properties @classmethod def _init_class(cls): cls._class_initialized = False cls._instances = set() cls._available_devices = set() cls._updating_devices = set() cls._load = {} cls._init_available_devices() assert isinstance(cls._available_devices, set) cls._class_initialized = True log.debug("available devices: %s" % ", ".join(cls._available_devices)) @classmethod def _init_available_devices(cls): raise NotImplementedError() @classmethod def _update_available_devices(cls): cls._init_available_devices() log.debug("available devices updated to: %s" % ", ".join(cls._available_devices)) @classmethod def get_available_devices(cls): return cls._available_devices @classmethod def update(cls): raise NotImplementedError() @classmethod def _register_instance(cls, instance): cls._instances.add(instance) @classmethod def _deregister_instance(cls, instance): cls._instances.remove(instance) @classmethod def _refresh_updating_devices(cls): new_updating = set() for instance in cls._instances: new_updating |= instance.devices cls._updating_devices.clear() cls._updating_devices.update(new_updating) @classmethod def instances(cls): return cls._instances # instance properties def __init__(self, devices = None): if not hasattr(self, "_class_initialized"): self._init_class() assert hasattr(self, "_class_initialized") self._register_instance(self) if devices is not None: self.devices = devices else: self.devices = self.get_available_devices() self.update() def __del__(self): try: self.cleanup() except: pass def cleanup(self): self._deregister_instance(self) self._refresh_updating_devices() @property def devices(self): return self._devices @devices.setter def devices(self, value): new_devices = self._available_devices & set(value) self._devices = new_devices self._refresh_updating_devices() def add_device(self, device): assert (isinstance(device,str) or isinstance(device,unicode)) self._update_available_devices() if device in self._available_devices: self._devices.add(device) self._updating_devices.add(device) def remove_device(self, device): assert (isinstance(device,str) or isinstance(device,unicode)) if device in self._devices: self._devices.remove(device) self._updating_devices.remove(device) def get_load(self): return dict([dev_load for dev_load in list(self._load.items()) if dev_load[0] in self._devices]) def get_device_load(self, device): return self._load.get(device, None) PK$2]o\DE0monitors/__pycache__/monitor_disk.cpython-36.pycnu[3 sPK$2]m7/monitors/__pycache__/monitor_net.cpython-36.pycnu[3 \}}td|d|}|jj|j||<WdQRXqWdS)NZrx_bytesZ rx_packetsZtx_bytesZ tx_packetsz/sys/class/net/z /statistics/) enumerateopenreadstripr )r rr ifZstatfilerrr _updateStats zNetMonitor._updateStatcCsx|jD]}|j|qWdS)N)Z_updating_devicesr)r Zdevicerrrupdate$s zNetMonitor.updateN)__name__ __module__ __qualname__ classmethodrrrrrrrrrs  r) Ztuned.monitorsZtunedrreZtuned.utils.nettoolrZmonitorsZMonitorrrrrrs PK$2]?%l2monitors/__pycache__/__init__.cpython-36.opt-1.pycnu[3 sPK$2]R5?L4monitors/__pycache__/repository.cpython-36.opt-1.pycnu[3 s   PK$2]oM  6monitors/__pycache__/monitor_load.cpython-36.opt-1.pycnu[3 sPK$2]oM  0monitors/__pycache__/monitor_load.cpython-36.pycnu[3 sPK$2]ٿ.monitors/__pycache__/repository.cpython-36.pycnu[3 s   PK$2]m75monitors/__pycache__/monitor_net.cpython-36.opt-1.pycnu[3 \}}td|d|}|jj|j||<WdQRXqWdS)NZrx_bytesZ rx_packetsZtx_bytesZ tx_packetsz/sys/class/net/z /statistics/) enumerateopenreadstripr )r rr ifZstatfilerrr _updateStats zNetMonitor._updateStatcCsx|jD]}|j|qWdS)N)Z_updating_devicesr)r Zdevicerrrupdate$s zNetMonitor.updateN)__name__ __module__ __qualname__ classmethodrrrrrrrrrs  r) Ztuned.monitorsZtunedrreZtuned.utils.nettoolrZmonitorsZMonitorrrrrrs PK$2]o\DE6monitors/__pycache__/monitor_disk.cpython-36.opt-1.pycnu[3 sPK$2]N.monitors/__pycache__/base.cpython-36.opt-1.pycnu[3 ysz$Monitor.get_load..)dictlistritems)rr)rrget_loadxszMonitor.get_loadcCs|jj|dS)N)rget)rr%rrrget_device_load{szMonitor.get_device_load)N)__name__ __module__ __qualname____doc__ classmethodrr rrrrrrrr r"r!propertyrsetterr&r'r-r/rrrrrs&           )Z tuned.logsZtunedZlogsr.r __all__objectrrrrrs PK$2]?%l,monitors/__pycache__/__init__.cpython-36.pycnu[3 sPK$2]+t|tst|tst||jkr:|jj||jj|dS)N)r r'r(r r%rr)r!r)rrr remove_devicers  zMonitor.remove_devicecs tfddtjjDS)Ncsg|]}|djkr|qS)r)r%).0Zdev_load)r!rr ysz$Monitor.get_load..)dictlistritems)r!r)r!rget_loadxszMonitor.get_loadcCs|jj|dS)N)rget)r!r)rrrget_device_load{szMonitor.get_device_load)N)__name__ __module__ __qualname____doc__ classmethodrr rrrrrrrr"r$r#propertyrsetterr*r+r1r3rrrrrs&           )Z tuned.logsZtunedZlogsr2r __all__objectrrrrrs PK$2]evvmonitors/monitor_disk.pynu[import tuned.monitors import os class DiskMonitor(tuned.monitors.Monitor): _supported_vendors = ["ATA", "SCSI"] @classmethod def _init_available_devices(cls): block_devices = os.listdir("/sys/block") available = set(filter(cls._is_device_supported, block_devices)) cls._available_devices = available for d in available: cls._load[d] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] @classmethod def _is_device_supported(cls, device): vendor_file = "/sys/block/%s/device/vendor" % device try: vendor = open(vendor_file).read().strip() except IOError: return False return vendor in cls._supported_vendors @classmethod def update(cls): for device in cls._updating_devices: cls._update_disk(device) @classmethod def _update_disk(cls, dev): with open("/sys/block/" + dev + "/stat") as statfile: cls._load[dev] = list(map(int, statfile.read().split())) PK$2]I>22monitors/monitor_load.pynu[import tuned.monitors class LoadMonitor(tuned.monitors.Monitor): @classmethod def _init_available_devices(cls): cls._available_devices = set(["system"]) @classmethod def update(cls): with open("/proc/loadavg") as statfile: data = statfile.read().split() cls._load["system"] = float(data[0]) PK$2].eI..monitors/__init__.pynu[from .base import * from .repository import * PK$2]jzstorage/storage.pynu[class Storage(object): __slots__ = ["_storage_provider", "_namespace"] def __init__(self, storage_provider, namespace): self._storage_provider = storage_provider self._namespace = namespace def set(self, option, value): self._storage_provider.set(self._namespace, option, value) def get(self, option, default=None): return self._storage_provider.get(self._namespace, option, default) def unset(self, option): self._storage_provider.unset(self._namespace, option) PK$2]Yffstorage/factory.pynu[from . import interfaces from . import storage class Factory(interfaces.Factory): __slots__ = ["_storage_provider"] def __init__(self, storage_provider): self._storage_provider = storage_provider @property def provider(self): return self._storage_provider def create(self, namespace): return storage.Storage(self._storage_provider, namespace) PK$2]W:0storage/__pycache__/storage.cpython-36.opt-1.pycnu[3 sPK$2]W:*storage/__pycache__/storage.cpython-36.pycnu[3 sPK$2]tL1storage/__pycache__/__init__.cpython-36.opt-1.pycnu[3 s  PK$2]|{2storage/__pycache__/pickle_provider.cpython-36.pycnu[3 tjdt|jt|jd}tj|j|WdQRXWn:tt fk rx}ztj d|j|fWYdd}~XnXdS)Nz Saving %swbz"Error saving storage file '%s': %s) logdebugstrropenrpickledumpOSErrorIOErrorerror)rfer r r saves zPickleProvider.savecCsy(t|jd}tj||_WdQRXWnXttfk rh}z tjd|j|fi|_WYdd}~Xnt k ri|_YnXdS)Nrbz#Error loading storage file '%s': %s) rrrloadrrrrrEOFError)rrr r r r r#'szPickleProvider.loadcCsZ|jjytj|jWn:ttfk rT}ztjd|j|fWYdd}~XnXdS)Nz$Error removing storage file '%s': %s) rclearosunlinkrrrrr)rr r r r r%1s  zPickleProvider.clear)N)N) __name__ __module__ __qualname__ __slots__r rrrr!r#r%r r r r r s   r) rZ tuned.logsZtunedrr&Z tuned.constsrZlogsrrZProviderrr r r r s   PK$2]d*storage/__pycache__/factory.cpython-36.pycnu[3 s  PK$2]|{8storage/__pycache__/pickle_provider.cpython-36.opt-1.pycnu[3 tjdt|jt|jd}tj|j|WdQRXWn:tt fk rx}ztj d|j|fWYdd}~XnXdS)Nz Saving %swbz"Error saving storage file '%s': %s) logdebugstrropenrpickledumpOSErrorIOErrorerror)rfer r r saves zPickleProvider.savecCsy(t|jd}tj||_WdQRXWnXttfk rh}z tjd|j|fi|_WYdd}~Xnt k ri|_YnXdS)Nrbz#Error loading storage file '%s': %s) rrrloadrrrrrEOFError)rrr r r r r#'szPickleProvider.loadcCsZ|jjytj|jWn:ttfk rT}ztjd|j|fWYdd}~XnXdS)Nz$Error removing storage file '%s': %s) rclearosunlinkrrrrr)rr r r r r%1s  zPickleProvider.clear)N)N) __name__ __module__ __qualname__ __slots__r rrrr!r#r%r r r r r s   r) rZ tuned.logsZtunedrr&Z tuned.constsrZlogsrrZProviderrr r r r s   PK$2]r3storage/__pycache__/interfaces.cpython-36.opt-1.pycnu[3 eZdZddZdddZddZdd Zd d Zd d ZdS)ProvidercCs tdS)N)r)rroptionvaluerrrsetsz Provider.setNcCs tdS)N)r)rrr defaultrrrget sz Provider.getcCs tdS)N)r)rrr rrrunset szProvider.unsetcCs tdS)N)r)rrrrclearszProvider.clearcCs tdS)N)r)rrrrloadsz Provider.loadcCs tdS)N)r)rrrrsavesz Provider.save)N) rr r rrrrrrrrrrr s  r N)objectrr rrrrsPK$2]r-storage/__pycache__/interfaces.cpython-36.pycnu[3 eZdZddZdddZddZdd Zd d Zd d ZdS)ProvidercCs tdS)N)r)rroptionvaluerrrsetsz Provider.setNcCs tdS)N)r)rrr defaultrrrget sz Provider.getcCs tdS)N)r)rrr rrrunset szProvider.unsetcCs tdS)N)r)rrrrclearszProvider.clearcCs tdS)N)r)rrrrloadsz Provider.loadcCs tdS)N)r)rrrrsavesz Provider.save)N) rr r rrrrrrrrrrr s  r N)objectrr rrrrsPK$2]d0storage/__pycache__/factory.cpython-36.opt-1.pycnu[3 s  PK$2]tL+storage/__pycache__/__init__.cpython-36.pycnu[3 s  PK$2].storage/interfaces.pynu[class Factory(object): def create(self, namespace): raise NotImplementedError() class Provider(object): def set(self, namespace, option, value): raise NotImplementedError() def get(self, namespace, option, default=None): raise NotImplementedError() def unset(self, namespace, option): raise NotImplementedError() def clear(self): raise NotImplementedError() def load(self): raise NotImplementedError() def save(self): raise NotImplementedError() PK$2]ystorage/pickle_provider.pynu[from . import interfaces import tuned.logs import pickle import os import tuned.consts as consts log = tuned.logs.get() class PickleProvider(interfaces.Provider): __slots__ = ["_path", "_data"] def __init__(self, path=None): if path is None: path = consts.DEFAULT_STORAGE_FILE self._path = path self._data = {} def set(self, namespace, option, value): self._data.setdefault(namespace, {}) self._data[namespace][option] = value def get(self, namespace, option, default=None): self._data.setdefault(namespace, {}) return self._data[namespace].get(option, default) def unset(self, namespace, option): self._data.setdefault(namespace, {}) if option in self._data[namespace]: del self._data[namespace][option] def save(self): try: log.debug("Saving %s" % str(self._data)) with open(self._path, "wb") as f: pickle.dump(self._data, f) except (OSError, IOError) as e: log.error("Error saving storage file '%s': %s" % (self._path, e)) def load(self): try: with open(self._path, "rb") as f: self._data = pickle.load(f) except (OSError, IOError) as e: log.debug("Error loading storage file '%s': %s" % (self._path, e)) self._data = {} except EOFError: self._data = {} def clear(self): self._data.clear() try: os.unlink(self._path) except (OSError, IOError) as e: log.debug("Error removing storage file '%s': %s" % (self._path, e)) PK$2]żstorage/__init__.pynu[from tuned.storage.storage import Storage from tuned.storage.factory import Factory from tuned.storage.pickle_provider import PickleProvider PK$2]i%OO patterns.pynu[class Singleton(object): """ Singleton design pattern. """ _instance = None def __init__(self): if self.__class__ is Singleton: raise TypeError("Cannot instantiate directly.") @classmethod def get_instance(cls): """Get the class instance.""" if cls._instance is None: cls._instance = cls() return cls._instance PK$2]U 44daemon/controller.pynu[from tuned import exports import tuned.logs import tuned.exceptions from tuned.exceptions import TunedException import threading import tuned.consts as consts from tuned.utils.commands import commands __all__ = ["Controller"] log = tuned.logs.get() class TimerStore(object): def __init__(self): self._timers = dict() self._timers_lock = threading.Lock() def store_timer(self, token, timer): with self._timers_lock: self._timers[token] = timer def drop_timer(self, token): with self._timers_lock: try: timer = self._timers[token] timer.cancel() del self._timers[token] except: pass def cancel_all(self): with self._timers_lock: for timer in self._timers.values(): timer.cancel() self._timers.clear() class Controller(tuned.exports.interfaces.ExportableInterface): """ Controller's purpose is to keep the program running, start/stop the tuning, and export the controller interface (currently only over D-Bus). """ def __init__(self, daemon, global_config): super(Controller, self).__init__() self._daemon = daemon self._global_config = global_config self._terminate = threading.Event() self._cmd = commands() self._timer_store = TimerStore() def run(self): """ Controller main loop. The call is blocking. """ log.info("starting controller") res = self.start() daemon = self._global_config.get_bool(consts.CFG_DAEMON, consts.CFG_DEF_DAEMON) if not res and daemon: exports.start() if daemon: self._terminate.clear() # we have to pass some timeout, otherwise signals will not work while not self._cmd.wait(self._terminate, 1): exports.period_check() log.info("terminating controller") self.stop() def terminate(self): self._terminate.set() def sighup(self): if not self._daemon._sighup_processing.is_set(): self._daemon._sighup_processing.set() if not self.reload(): self._daemon._sighup_processing.clear() @exports.signal("sbs") def profile_changed(self, profile_name, result, errstr): pass # exports decorator checks the authorization (currently through polkit), caller is None if # no authorization was performed (i.e. the call should process as authorized), string # identifying caller (with DBus it's the caller bus name) if authorized and empty # string if not authorized, caller must be the last argument def _log_capture_abort(self, token): tuned.logs.log_capture_finish(token) self._timer_store.drop_timer(token) @exports.export("ii", "s") def log_capture_start(self, log_level, timeout, caller = None): if caller == "": return "" token = tuned.logs.log_capture_start(log_level) if token is None: return "" if timeout > 0: timer = threading.Timer(timeout, self._log_capture_abort, args = [token]) self._timer_store.store_timer(token, timer) timer.start() return "" if token is None else token @exports.export("s", "s") def log_capture_finish(self, token, caller = None): if caller == "": return "" res = tuned.logs.log_capture_finish(token) self._timer_store.drop_timer(token) return "" if res is None else res @exports.export("", "b") def start(self, caller = None): if caller == "": return False if self._global_config.get_bool(consts.CFG_DAEMON, consts.CFG_DEF_DAEMON): if self._daemon.is_running(): return True elif not self._daemon.is_enabled(): return False return self._daemon.start() def _stop(self, profile_switch = False): if not self._daemon.is_running(): res = True else: res = self._daemon.stop(profile_switch = profile_switch) self._timer_store.cancel_all() return res @exports.export("", "b") def stop(self, caller = None): if caller == "": return False return self._stop(profile_switch = False) @exports.export("", "b") def reload(self, caller = None): if caller == "": return False if self._daemon.is_running(): stop_ok = self._stop(profile_switch = True) if not stop_ok: return False try: self._daemon.reload_profile_config() except TunedException as e: log.error("Failed to reload TuneD: %s" % e) return False return self.start() def _switch_profile(self, profile_name, manual): was_running = self._daemon.is_running() msg = "OK" success = True reapply = False try: if was_running: self._daemon.stop(profile_switch = True) self._daemon.set_profile(profile_name, manual) except tuned.exceptions.TunedException as e: success = False msg = str(e) if was_running and self._daemon.profile.name == profile_name: log.error("Failed to reapply profile '%s'. Did it change on disk and break?" % profile_name) reapply = True else: log.error("Failed to apply profile '%s'" % profile_name) finally: if was_running: if reapply: log.warn("Applying previously applied (possibly out-dated) profile '%s'." % profile_name) elif not success: log.info("Applying previously applied profile.") self._daemon.start() return (success, msg) @exports.export("s", "(bs)") def switch_profile(self, profile_name, caller = None): if caller == "": return (False, "Unauthorized") if not self._cmd.is_valid_name(profile_name): return (False, "Invalid profile_name") return self._switch_profile(profile_name, True) @exports.export("", "(bs)") def auto_profile(self, caller = None): if caller == "": return (False, "Unauthorized") profile_name = self.recommend_profile() return self._switch_profile(profile_name, False) @exports.export("", "s") def active_profile(self, caller = None): if caller == "": return "" if self._daemon.profile is not None: return self._daemon.profile.name else: return "" @exports.export("", "(ss)") def profile_mode(self, caller = None): if caller == "": return "unknown", "Unauthorized" manual = self._daemon.manual if manual is None: # This means no profile is applied. Check the preset value. try: profile, manual = self._cmd.get_active_profile() if manual is None: manual = profile is not None except TunedException as e: mode = "unknown" error = str(e) return mode, error mode = consts.ACTIVE_PROFILE_MANUAL if manual else consts.ACTIVE_PROFILE_AUTO return mode, "" @exports.export("", "s") def post_loaded_profile(self, caller = None): if caller == "": return "" return self._daemon.post_loaded_profile or "" @exports.export("", "b") def disable(self, caller = None): if caller == "": return False if self._daemon.is_running(): self._daemon.stop() if self._daemon.is_enabled(): self._daemon.set_all_profiles(None, True, None, save_instantly=True) return True @exports.export("", "b") def is_running(self, caller = None): if caller == "": return False return self._daemon.is_running() @exports.export("", "as") def profiles(self, caller = None): if caller == "": return [] return self._daemon.profile_loader.profile_locator.get_known_names() @exports.export("", "a(ss)") def profiles2(self, caller = None): if caller == "": return [] return self._daemon.profile_loader.profile_locator.get_known_names_summary() @exports.export("s", "(bsss)") def profile_info(self, profile_name, caller = None): if caller == "" or not self._cmd.is_valid_name(profile_name): return (False, "", "", "") if profile_name is None or profile_name == "": profile_name = self.active_profile() return tuple(self._daemon.profile_loader.profile_locator.get_profile_attrs(profile_name, [consts.PROFILE_ATTR_SUMMARY, consts.PROFILE_ATTR_DESCRIPTION], [""])) @exports.export("", "s") def recommend_profile(self, caller = None): if caller == "": return "" return self._daemon.profile_recommender.recommend() @exports.export("", "b") def verify_profile(self, caller = None): if caller == "": return False return self._daemon.verify_profile(ignore_missing = False) @exports.export("", "b") def verify_profile_ignore_missing(self, caller = None): if caller == "": return False return self._daemon.verify_profile(ignore_missing = True) @exports.export("", "a{sa{ss}}") def get_all_plugins(self, caller = None): """Return dictionary with accesible plugins Return: dictionary -- {plugin_name: {parameter_name: default_value}} """ if caller == "": return {} plugins = {} for plugin_class in self._daemon.get_all_plugins(): plugin_name = plugin_class.__module__.split(".")[-1].split("_", 1)[1] conf_options = plugin_class._get_config_options() plugins[plugin_name] = {} for key, val in conf_options.items(): plugins[plugin_name][key] = str(val) return plugins @exports.export("s","s") def get_plugin_documentation(self, plugin_name, caller = None): """Return docstring of plugin's class""" if caller == "" or not self._cmd.is_valid_name(plugin_name): return "" return self._daemon.get_plugin_documentation(str(plugin_name)) @exports.export("s","a{ss}") def get_plugin_hints(self, plugin_name, caller = None): """Return dictionary with plugin's parameters and their hints Parameters: plugin_name -- name of plugin Return: dictionary -- {parameter_name: hint} """ if caller == "" or not self._cmd.is_valid_name(plugin_name): return {} return self._daemon.get_plugin_hints(str(plugin_name)) @exports.export("s", "b") def register_socket_signal_path(self, path, caller = None): """Allows to dynamically add sockets to send signals to Parameters: path -- path to socket to register for sending signals Return: bool -- True on success """ if caller == "" or not self._cmd.is_valid_name(path): return False if self._daemon._application and self._daemon._application._unix_socket_exporter: self._daemon._application._unix_socket_exporter.register_signal_path(path) return True return False # devices - devices to migrate from other instances, string of form "dev1,dev2,dev3,..." # or "cpulist:CPULIST", where CPULIST is e.g. "0-3,6,8-9" # instance_name - instance where to migrate devices @exports.export("ss", "(bs)") def instance_acquire_devices(self, devices, instance_name, caller = None): if caller == "": return (False, "Unauthorized") if not self._cmd.is_valid_name(devices): return (False, "Invalid devices") if not self._cmd.is_valid_name(instance_name): return (False, "Invalid instance_name") found = False for instance_target in self._daemon._unit_manager.instances: if instance_target.name == instance_name: log.debug("Found instance '%s'." % instance_target.name) found = True break if not found: rets = "Instance '%s' not found" % instance_name log.error(rets) return (False, rets) devs = set(self._cmd.devstr2devs(devices)) log.debug("Instance '%s' trying to acquire devices '%s'." % (instance_target.name, str(devs))) for instance in self._daemon._unit_manager.instances: devs_moving = instance.processed_devices & devs if len(devs_moving): devs -= devs_moving log.info("Moving devices '%s' from instance '%s' to instance '%s'." % (str(devs_moving), instance.name, instance_target.name)) if (instance.plugin.name != instance_target.plugin.name): rets = "Target instance '%s' is of type '%s', but devices '%s' are currently handled by " \ "instance '%s' which is of type '%s'." % (instance_target.name, instance_target.plugin.name, str(devs_moving), instance.name, instance.plugin.name) log.error(rets) return (False, rets) instance.plugin._remove_devices_nocheck(instance, devs_moving) instance_target.plugin._add_devices_nocheck(instance_target, devs_moving) if (len(devs)): rets = "Ignoring devices not handled by any instance '%s'." % str(devs) log.info(rets) return (False, rets) return (True, "OK") @exports.export("s", "(bsa(ss))") def get_instances(self, plugin_name, caller = None): """Return a list of active instances of a plugin or all active instances Parameters: plugin_name -- name of the plugin or an empty string Return: bool -- True on success string -- error message or "OK" list of string pairs -- [(instance_name, plugin_name)] """ if caller == "": return (False, "Unauthorized", []) if not self._cmd.is_valid_name(plugin_name): return (False, "Invalid plugin_name", []) if plugin_name != "" and plugin_name not in self.get_all_plugins().keys(): rets = "Plugin '%s' does not exist" % plugin_name log.error(rets) return (False, rets, []) instances = filter(lambda instance: instance.active, self._daemon._unit_manager.instances) if plugin_name != "": instances = filter(lambda instance: instance.plugin.name == plugin_name, instances) return (True, "OK", list(map(lambda instance: (instance.name, instance.plugin.name), instances))) @exports.export("s", "(bsas)") def instance_get_devices(self, instance_name, caller = None): """Return a list of devices assigned to an instance Parameters: instance_name -- name of the instance Return: bool -- True on success string -- error message or "OK" list of strings -- device names """ if caller == "": return (False, "Unauthorized", []) if not self._cmd.is_valid_name(instance_name): return (False, "Invalid instance_name", []) for instance in self._daemon._unit_manager.instances: if instance.name == instance_name: return (True, "OK", sorted(list(instance.processed_devices))) rets = "Instance '%s' not found" % instance_name log.error(rets) return (False, rets, []) PK$2]C$33daemon/daemon.pynu[import os import errno import threading import tuned.logs from tuned.exceptions import TunedException from tuned.profiles.exceptions import InvalidProfileException import tuned.consts as consts from tuned.utils.commands import commands from tuned import exports from tuned.utils.profile_recommender import ProfileRecommender import re log = tuned.logs.get() class Daemon(object): def __init__(self, unit_manager, profile_loader, profile_names=None, config=None, application=None): log.debug("initializing daemon") self._daemon = consts.CFG_DEF_DAEMON self._sleep_interval = int(consts.CFG_DEF_SLEEP_INTERVAL) self._update_interval = int(consts.CFG_DEF_UPDATE_INTERVAL) self._dynamic_tuning = consts.CFG_DEF_DYNAMIC_TUNING self._recommend_command = True self._rollback = consts.CFG_DEF_ROLLBACK if config is not None: self._daemon = config.get_bool(consts.CFG_DAEMON, consts.CFG_DEF_DAEMON) self._sleep_interval = int(config.get(consts.CFG_SLEEP_INTERVAL, consts.CFG_DEF_SLEEP_INTERVAL)) self._update_interval = int(config.get(consts.CFG_UPDATE_INTERVAL, consts.CFG_DEF_UPDATE_INTERVAL)) self._dynamic_tuning = config.get_bool(consts.CFG_DYNAMIC_TUNING, consts.CFG_DEF_DYNAMIC_TUNING) self._recommend_command = config.get_bool(consts.CFG_RECOMMEND_COMMAND, consts.CFG_DEF_RECOMMEND_COMMAND) self._rollback = config.get(consts.CFG_ROLLBACK, consts.CFG_DEF_ROLLBACK) self._application = application if self._sleep_interval <= 0: self._sleep_interval = int(consts.CFG_DEF_SLEEP_INTERVAL) if self._update_interval == 0: self._dynamic_tuning = False elif self._update_interval < self._sleep_interval: self._update_interval = self._sleep_interval self._sleep_cycles = self._update_interval // self._sleep_interval log.info("using sleep interval of %d second(s)" % self._sleep_interval) if self._dynamic_tuning: log.info("dynamic tuning is enabled (can be overridden by plugins)") log.info("using update interval of %d second(s) (%d times of the sleep interval)" % (self._sleep_cycles * self._sleep_interval, self._sleep_cycles)) self._profile_recommender = ProfileRecommender(is_hardcoded = not self._recommend_command) self._unit_manager = unit_manager self._profile_loader = profile_loader self._init_threads() self._cmd = commands() try: self._init_profile(profile_names) except TunedException as e: log.error("Cannot set initial profile. No tunings will be enabled: %s" % e) def _init_threads(self): self._thread = None self._terminate = threading.Event() # Flag which is set if terminating due to profile_switch self._terminate_profile_switch = threading.Event() # Flag which is set if there is no operation in progress self._not_used = threading.Event() # Flag which is set if SIGHUP is being processed self._sighup_processing = threading.Event() self._not_used.set() self._profile_applied = threading.Event() def reload_profile_config(self): """Read configuration files again and load profile according to them""" self._init_profile(None) def _init_profile(self, profile_names): manual = True post_loaded_profile = self._cmd.get_post_loaded_profile() if profile_names is None: (profile_names, manual) = self._get_startup_profile() if profile_names is None: msg = "No profile is preset, running in manual mode. " if post_loaded_profile: msg += "Only post-loaded profile will be enabled" else: msg += "No profile will be enabled." log.info(msg) # Passed through '-p' cmdline option elif profile_names == "": if post_loaded_profile: log.info("Only post-loaded profile will be enabled") else: log.info("No profile will be enabled.") self._profile = None self._manual = None self._active_profiles = [] self._post_loaded_profile = None self.set_all_profiles(profile_names, manual, post_loaded_profile) def _load_profiles(self, profile_names, manual): profile_names = profile_names or "" profile_list = profile_names.split() if self._post_loaded_profile: log.info("Using post-loaded profile '%s'" % self._post_loaded_profile) profile_list = profile_list + [self._post_loaded_profile] for profile in profile_list: if profile not in self.profile_loader.profile_locator.get_known_names(): errstr = "Requested profile '%s' doesn't exist." % profile self._notify_profile_changed(profile_names, False, errstr) raise TunedException(errstr) try: if profile_list: self._profile = self._profile_loader.load(profile_list) else: self._profile = None self._manual = manual self._active_profiles = profile_names.split() except InvalidProfileException as e: errstr = "Cannot load profile(s) '%s': %s" % (" ".join(profile_list), e) self._notify_profile_changed(profile_names, False, errstr) raise TunedException(errstr) def set_profile(self, profile_names, manual): if self.is_running(): errstr = "Cannot set profile while the daemon is running." self._notify_profile_changed(profile_names, False, errstr) raise TunedException(errstr) self._load_profiles(profile_names, manual) def _set_post_loaded_profile(self, profile_name): if not profile_name: self._post_loaded_profile = None elif len(profile_name.split()) > 1: errstr = "Whitespace is not allowed in profile names; only a single post-loaded profile is allowed." raise TunedException(errstr) else: self._post_loaded_profile = profile_name def set_all_profiles(self, active_profiles, manual, post_loaded_profile, save_instantly=False): if self.is_running(): errstr = "Cannot set profile while the daemon is running." self._notify_profile_changed(active_profiles, False, errstr) raise TunedException(errstr) self._set_post_loaded_profile(post_loaded_profile) self._load_profiles(active_profiles, manual) if save_instantly: self._save_active_profile(active_profiles, manual) self._save_post_loaded_profile(post_loaded_profile) @property def profile(self): return self._profile @property def manual(self): return self._manual @property def post_loaded_profile(self): # Return the profile name only if the profile is active. If # the profile is not active, then the value is meaningless. return self._post_loaded_profile if self._profile else None @property def profile_recommender(self): return self._profile_recommender @property def profile_loader(self): return self._profile_loader # send notification when profile is changed (everything is setup) or if error occured # result: True - OK, False - error occured def _notify_profile_changed(self, profile_names, result, errstr): if self._application is not None: exports.send_signal(consts.SIGNAL_PROFILE_CHANGED, profile_names, result, errstr) return errstr def _full_rollback_required(self): retcode, out = self._cmd.execute(["systemctl", "is-system-running"], no_errors = [0]) if retcode < 0: return False if out[:8] == "stopping": return False retcode, out = self._cmd.execute(["systemctl", "list-jobs"], no_errors = [0]) return re.search(r"\b(shutdown|reboot|halt|poweroff)\.target.*start", out) is None and not retcode def _thread_code(self): if self._profile is None: raise TunedException("Cannot start the daemon without setting a profile.") self._unit_manager.create(self._profile.units) self._save_active_profile(" ".join(self._active_profiles), self._manual) self._save_post_loaded_profile(self._post_loaded_profile) self._unit_manager.start_tuning() self._profile_applied.set() log.info("static tuning from profile '%s' applied" % self._profile.name) if self._daemon: exports.start() profile_names = " ".join(self._active_profiles) self._notify_profile_changed(profile_names, True, "OK") self._sighup_processing.clear() if self._daemon: # In python 2 interpreter with applied patch for rhbz#917709 we need to periodically # poll, otherwise the python will not have chance to update events / locks (due to GIL) # and e.g. DBus control will not work. The polling interval of 1 seconds (which is # the default) is still much better than 50 ms polling with unpatched interpreter. # For more details see TuneD rhbz#917587. _sleep_cnt = self._sleep_cycles while not self._cmd.wait(self._terminate, self._sleep_interval): if self._dynamic_tuning: _sleep_cnt -= 1 if _sleep_cnt <= 0: _sleep_cnt = self._sleep_cycles log.debug("updating monitors") self._unit_manager.update_monitors() log.debug("performing tunings") self._unit_manager.update_tuning() self._profile_applied.clear() # wait for others to complete their tasks, use timeout 3 x sleep_interval to prevent # deadlocks i = 0 while not self._cmd.wait(self._not_used, self._sleep_interval) and i < 3: i += 1 # if terminating due to profile switch if self._terminate_profile_switch.is_set(): rollback = consts.ROLLBACK_FULL else: # Assume only soft rollback is needed. Soft rollback means reverting all # non-persistent tunings applied by a plugin instance. In contrast to full # rollback, information about what to revert is kept in RAM (volatile # memory) -- TuneD data structures. # With systemd TuneD detects system shutdown and in such a case it doesn't # perform full cleanup. If the system is not shutting down, it means that TuneD # was explicitly stopped by the user and in such case do the full cleanup. On # systems without systemd, full cleanup is never performed. rollback = consts.ROLLBACK_SOFT if not self._full_rollback_required(): log.info("terminating TuneD due to system shutdown / reboot") elif self._rollback == "not_on_exit": # no rollback on TuneD exit whatsoever rollback = consts.ROLLBACK_NONE log.info("terminating TuneD and not rolling back any changes due to '%s' option in '%s'" % (consts.CFG_ROLLBACK, consts.GLOBAL_CONFIG_FILE)) else: if self._daemon: log.info("terminating TuneD, rolling back all changes") rollback = consts.ROLLBACK_FULL else: log.info("terminating TuneD in one-shot mode") if self._daemon: self._unit_manager.stop_tuning(rollback) self._unit_manager.destroy_all() def _save_active_profile(self, profile_names, manual): try: self._cmd.save_active_profile(profile_names, manual) except TunedException as e: log.error(str(e)) def _save_post_loaded_profile(self, profile_name): try: self._cmd.save_post_loaded_profile(profile_name) except TunedException as e: log.error(str(e)) def _get_recommended_profile(self): log.info("Running in automatic mode, checking what profile is recommended for your configuration.") profile = self._profile_recommender.recommend() log.info("Using '%s' profile" % profile) return profile def _get_startup_profile(self): profile, manual = self._cmd.get_active_profile() if manual is None: manual = profile is not None if not manual: profile = self._get_recommended_profile() return profile, manual def get_all_plugins(self): """Return all accessible plugin classes""" return self._unit_manager.plugins_repository.load_all_plugins() def get_plugin_documentation(self, plugin_name): """Return plugin class docstring""" try: plugin_class = self._unit_manager.plugins_repository.load_plugin( plugin_name ) except ImportError: return "" return plugin_class.__doc__ def get_plugin_hints(self, plugin_name): """Return plugin's parameters and their hints Parameters: plugin_name -- plugins name Return: dictionary -- {parameter_name: hint} """ try: plugin_class = self._unit_manager.plugins_repository.load_plugin( plugin_name ) except ImportError: return {} return plugin_class.get_config_options_hints() def is_enabled(self): return self._profile is not None def is_running(self): return self._thread is not None and self._thread.is_alive() def start(self): if self.is_running(): return False if self._profile is None: return False log.info("starting tuning") self._not_used.set() self._thread = threading.Thread(target=self._thread_code) self._terminate_profile_switch.clear() self._terminate.clear() self._thread.start() return True def verify_profile(self, ignore_missing): if not self.is_running(): log.error("TuneD is not running") return False if self._profile is None: log.error("no profile is set") return False if not self._profile_applied.is_set(): log.error("profile is not applied") return False # using daemon, the main loop mustn't exit before our completion self._not_used.clear() log.info("verifying profile(s): %s" % self._profile.name) ret = self._unit_manager.verify_tuning(ignore_missing) # main loop is allowed to exit self._not_used.set() return ret # profile_switch is helper telling plugins whether the stop is due to profile switch def stop(self, profile_switch = False): if not self.is_running(): return False log.info("stopping tuning") if profile_switch: self._terminate_profile_switch.set() self._terminate.set() self._thread.join() self._thread = None return True PK$2]daemon/application.pynu[from tuned import storage, units, monitors, plugins, profiles, exports, hardware from tuned.exceptions import TunedException import tuned.logs import tuned.version from . import controller from . import daemon import signal import os import sys import select import struct import tuned.consts as consts from tuned.utils.global_config import GlobalConfig log = tuned.logs.get() __all__ = ["Application"] class Application(object): def __init__(self, profile_name = None, config = None): # os.uname()[2] is for the python-2.7 compatibility, it's the release string # like e.g. '5.15.13-100.fc34.x86_64' log.info("TuneD: %s, kernel: %s" % (tuned.version.TUNED_VERSION_STR, os.uname()[2])) self._dbus_exporter = None self._unix_socket_exporter = None storage_provider = storage.PickleProvider() storage_factory = storage.Factory(storage_provider) self.config = GlobalConfig() if config is None else config if self.config.get_bool(consts.CFG_DYNAMIC_TUNING): log.info("dynamic tuning is enabled (can be overridden in plugins)") else: log.info("dynamic tuning is globally disabled") monitors_repository = monitors.Repository() udev_buffer_size = self.config.get_size("udev_buffer_size", consts.CFG_DEF_UDEV_BUFFER_SIZE) hardware_inventory = hardware.Inventory(buffer_size=udev_buffer_size) device_matcher = hardware.DeviceMatcher() device_matcher_udev = hardware.DeviceMatcherUdev() plugin_instance_factory = plugins.instance.Factory() self.variables = profiles.variables.Variables() plugins_repository = plugins.Repository(monitors_repository, storage_factory, hardware_inventory,\ device_matcher, device_matcher_udev, plugin_instance_factory, self.config, self.variables) def_instance_priority = int(self.config.get(consts.CFG_DEFAULT_INSTANCE_PRIORITY, consts.CFG_DEF_DEFAULT_INSTANCE_PRIORITY)) unit_manager = units.Manager( plugins_repository, monitors_repository, def_instance_priority, hardware_inventory, self.config) profile_factory = profiles.Factory() profile_merger = profiles.Merger() profile_locator = profiles.Locator(consts.LOAD_DIRECTORIES) profile_loader = profiles.Loader(profile_locator, profile_factory, profile_merger, self.config, self.variables) self._daemon = daemon.Daemon(unit_manager, profile_loader, profile_name, self.config, self) self._controller = controller.Controller(self._daemon, self.config) self._init_signals() self._pid_file = None def _handle_signal(self, signal_number, handler): def handler_wrapper(_signal_number, _frame): if signal_number == _signal_number: handler() signal.signal(signal_number, handler_wrapper) def _init_signals(self): self._handle_signal(signal.SIGHUP, self._controller.sighup) self._handle_signal(signal.SIGINT, self._controller.terminate) self._handle_signal(signal.SIGTERM, self._controller.terminate) def attach_to_dbus(self, bus_name, object_name, interface_name, namespace): if self._dbus_exporter is not None: raise TunedException("DBus interface is already initialized.") self._dbus_exporter = exports.dbus.DBusExporter(bus_name, interface_name, object_name, namespace) exports.register_exporter(self._dbus_exporter) def attach_to_unix_socket(self): if self._unix_socket_exporter is not None: raise TunedException("Unix socket interface is already initialized.") self._unix_socket_exporter = exports.unix_socket.UnixSocketExporter(self.config.get(consts.CFG_UNIX_SOCKET_PATH), self.config.get(consts.CFG_UNIX_SOCKET_SIGNAL_PATHS), self.config.get(consts.CFG_UNIX_SOCKET_OWNERSHIP), self.config.get_int(consts.CFG_UNIX_SOCKET_PERMISIONS), self.config.get_int(consts.CFG_UNIX_SOCKET_CONNECTIONS_BACKLOG)) exports.register_exporter(self._unix_socket_exporter) def register_controller(self): exports.register_object(self._controller) def _daemonize_parent(self, parent_in_fd, child_out_fd): """ Wait till the child signalizes that the initialization is complete by writing some uninteresting data into the pipe. """ os.close(child_out_fd) (read_ready, drop, drop) = select.select([parent_in_fd], [], [], consts.DAEMONIZE_PARENT_TIMEOUT) if len(read_ready) != 1: os.close(parent_in_fd) raise TunedException("Cannot daemonize, timeout when waiting for the child process.") response = os.read(parent_in_fd, 8) os.close(parent_in_fd) if len(response) == 0: raise TunedException("Cannot daemonize, no response from child process received.") try: val = struct.unpack("?", response)[0] except struct.error: raise TunedException("Cannot daemonize, invalid response from child process received.") if val != True: raise TunedException("Cannot daemonize, child process reports failure.") def write_pid_file(self, pid_file = consts.PID_FILE): self._pid_file = pid_file self._delete_pid_file() try: dir_name = os.path.dirname(self._pid_file) if not os.path.exists(dir_name): os.makedirs(dir_name) with os.fdopen(os.open(self._pid_file, os.O_CREAT|os.O_TRUNC|os.O_WRONLY , 0o644), "w") as f: f.write("%d" % os.getpid()) except (OSError,IOError) as error: log.critical("cannot write the PID to %s: %s" % (self._pid_file, str(error))) def _delete_pid_file(self): if os.path.exists(self._pid_file): try: os.unlink(self._pid_file) except OSError as error: log.warning("cannot remove existing PID file %s, %s" % (self._pid_file, str(error))) def _daemonize_child(self, pid_file, parent_in_fd, child_out_fd): """ Finishes daemonizing process, writes a PID file and signalizes to the parent that the initialization is complete. """ os.close(parent_in_fd) os.chdir("/") os.setsid() os.umask(0) try: pid = os.fork() if pid > 0: sys.exit(0) except OSError as error: log.critical("cannot daemonize, fork() error: %s" % str(error)) val = struct.pack("?", False) os.write(child_out_fd, val) os.close(child_out_fd) raise TunedException("Cannot daemonize, second fork() failed.") fd = open("/dev/null", "w+") os.dup2(fd.fileno(), sys.stdin.fileno()) os.dup2(fd.fileno(), sys.stdout.fileno()) os.dup2(fd.fileno(), sys.stderr.fileno()) self.write_pid_file(pid_file) log.debug("successfully daemonized") val = struct.pack("?", True) os.write(child_out_fd, val) os.close(child_out_fd) def daemonize(self, pid_file = consts.PID_FILE): """ Daemonizes the application. In case of failure, TunedException is raised in the parent process. If the operation is successfull, the main process is terminated and only child process returns from this method. """ parent_child_fds = os.pipe() try: child_pid = os.fork() except OSError as error: os.close(parent_child_fds[0]) os.close(parent_child_fds[1]) raise TunedException("Cannot daemonize, fork() failed.") try: if child_pid > 0: self._daemonize_parent(*parent_child_fds) sys.exit(0) else: self._daemonize_child(pid_file, *parent_child_fds) except: # pass exceptions only into parent process if child_pid > 0: raise else: sys.exit(1) @property def daemon(self): return self._daemon @property def controller(self): return self._controller def run(self, daemon): # override global config if ran from command line with daemon option (-d) if daemon: self.config.set(consts.CFG_DAEMON, True) if not self.config.get_bool(consts.CFG_DAEMON, consts.CFG_DEF_DAEMON): log.warn("Using one shot no daemon mode, most of the functionality will be not available, it can be changed in global config") result = self._controller.run() if self.config.get_bool(consts.CFG_DAEMON, consts.CFG_DEF_DAEMON): exports.stop() if self._pid_file is not None: self._delete_pid_file() return result PK$2]?˸0daemon/__pycache__/__init__.cpython-36.opt-1.pycnu[3 sPK$2]±**.daemon/__pycache__/daemon.cpython-36.opt-1.pycnu[3 DaemonNcCstjdtj|_ttj|_ttj|_ tj |_ d|_ tj |_|dk r|jtjtj|_t|jtjtj|_t|jtjtj|_ |jtjtj |_ |jtjtj|_ |jtjtj |_||_|jdkrttj|_|j dkrd|_ n|j |jkr|j|_ |j |j|_tjd|j|j rJtjdtjd|j|j|jft|j d|_||_||_|jt |_!y|j"|Wn2t#k r}ztj$d |WYdd}~XnXdS) Nzinitializing daemonTrFz$using sleep interval of %d second(s)z8dynamic tuning is enabled (can be overridden by plugins)zFusing update interval of %d second(s) (%d times of the sleep interval))Z is_hardcodedz:Cannot set initial profile. No tunings will be enabled: %s)%logdebugconstsZCFG_DEF_DAEMON_daemonintZCFG_DEF_SLEEP_INTERVAL_sleep_intervalZCFG_DEF_UPDATE_INTERVALZ_update_intervalZCFG_DEF_DYNAMIC_TUNING_dynamic_tuningZ_recommend_commandZCFG_DEF_ROLLBACK _rollbackZget_boolZ CFG_DAEMONgetZCFG_SLEEP_INTERVALZCFG_UPDATE_INTERVALZCFG_DYNAMIC_TUNINGZCFG_RECOMMEND_COMMANDZCFG_DEF_RECOMMEND_COMMAND CFG_ROLLBACK _application _sleep_cyclesinfor_profile_recommender _unit_manager_profile_loader _init_threadsr_cmd _init_profilererror)selfZ unit_managerprofile_loader profile_namesconfigZ applicationer!/usr/lib/python3.6/daemon.py__init__sF        zDaemon.__init__cCsFd|_tj|_tj|_tj|_tj|_|jjtj|_dS)N) _thread threadingZEvent _terminate_terminate_profile_switch _not_used_sighup_processingset_profile_applied)rr!r!r"r7s     zDaemon._init_threadscCs|jddS)zARead configuration files again and load profile according to themN)r)rr!r!r"reload_profile_configCszDaemon.reload_profile_configcCsd}|jj}|dkrP|j\}}|dkrrd}|r<|d7}n|d7}tj|n"|dkrr|rhtjdn tjdd|_d|_g|_d|_|j |||dS)NTz.No profile is preset, running in manual mode. z(Only post-loaded profile will be enabledzNo profile will be enabled.) rZget_post_loaded_profile_get_startup_profilerr_profile_manual_active_profiles_post_loaded_profileset_all_profiles)rrmanualpost_loaded_profilemsgr!r!r"rGs&      zDaemon._init_profilecCs|pd}|j}|jr2tjd|j||jg}x:|D]2}||jjjkr8d|}|j|d|t|q8Wy.|r|j j ||_ nd|_ ||_ |j|_ WnJtk r}z.ddj||f}|j|d|t|WYdd}~XnXdS)Nr-zUsing post-loaded profile '%s'z%Requested profile '%s' doesn't exist.FzCannot load profile(s) '%s': %s )splitr2rrrZprofile_locatorZget_known_names_notify_profile_changedrrloadr/r0r1rjoin)rrr4Z profile_listprofileerrstrr r!r!r"_load_profiles`s*    zDaemon._load_profilescCs2|jr"d}|j|d|t||j||dS)Nz/Cannot set profile while the daemon is running.F) is_runningr9rr>)rrr4r=r!r!r" set_profilezs zDaemon.set_profilecCs4|s d|_n$t|jdkr*d}t|n||_dS)NzYWhitespace is not allowed in profile names; only a single post-loaded profile is allowed.)r2lenr8r)r profile_namer=r!r!r"_set_post_loaded_profiles  zDaemon._set_post_loaded_profileFcCsV|jr"d}|j|d|t||j||j|||rR|j|||j|dS)Nz/Cannot set profile while the daemon is running.F)r?r9rrDr>_save_active_profile_save_post_loaded_profile)rZactive_profilesr4r5Zsave_instantlyr=r!r!r"r3s   zDaemon.set_all_profilescCs|jS)N)r/)rr!r!r"r<szDaemon.profilecCs|jS)N)r0)rr!r!r"r4sz Daemon.manualcCs|jr |jSdS)N)r/r2)rr!r!r"r5szDaemon.post_loaded_profilecCs|jS)N)r)rr!r!r"profile_recommenderszDaemon.profile_recommendercCs|jS)N)r)rr!r!r"rszDaemon.profile_loadercCs |jdk rtjtj||||S)N)rrZ send_signalr ZSIGNAL_PROFILE_CHANGED)rrresultr=r!r!r"r9s zDaemon._notify_profile_changedcCsj|jjddgdgd\}}|dkr&dS|dddkr:dS|jjddgdgd\}}tjd |dkoh| S) NZ systemctlzis-system-runningr)Z no_errorsFZstoppingz list-jobsz0\b(shutdown|reboot|halt|poweroff)\.target.*start)rZexecuteresearch)rZretcodeoutr!r!r"_full_rollback_requiredszDaemon._full_rollback_requiredcCs|jdkrtd|jj|jj|jdj|j|j|j |j |jj |j j tjd|jj|jrxtjdj|j}|j|dd|jj|jr|j}x\|jj|j|js|jr|d8}|dkr|j}tjd|jjtjd |jjqW|j jd}x.|jj|j |j rD|d krD|d7}qW|j!j"rZt#j$}njt#j%}|j&svtjd nN|j'd krt#j(}tjd t#j)t#j*fn$|jrtjdt#j$}n tjd|jr|jj+||jj,dS)Nz2Cannot start the daemon without setting a profile.r7z'static tuning from profile '%s' appliedTZOKrArzupdating monitorszperforming tuningsz1terminating TuneD due to system shutdown / rebootZ not_on_exitzMterminating TuneD and not rolling back any changes due to '%s' option in '%s'z+terminating TuneD, rolling back all changesz"terminating TuneD in one-shot mode)-r/rrZcreateZunitsrEr;r1r0rFr2Z start_tuningr+r*rrnamer rstartr9r)clearrrwaitr&r rr Zupdate_monitorsZ update_tuningr(r'is_setr Z ROLLBACK_FULLZ ROLLBACK_SOFTrMrZ ROLLBACK_NONErZGLOBAL_CONFIG_FILEZ stop_tuningZ destroy_all)rrZ _sleep_cntiZrollbackr!r!r" _thread_codesX          "        zDaemon._thread_codecCsHy|jj||Wn0tk rB}ztjt|WYdd}~XnXdS)N)rZsave_active_profilerrrstr)rrr4r r!r!r"rEszDaemon._save_active_profilecCsFy|jj|Wn0tk r@}ztjt|WYdd}~XnXdS)N)rZsave_post_loaded_profilerrrrV)rrCr r!r!r"rFsz Daemon._save_post_loaded_profilecCs&tjd|jj}tjd||S)NzWRunning in automatic mode, checking what profile is recommended for your configuration.zUsing '%s' profile)rrrZ recommend)rr<r!r!r"_get_recommended_profiles  zDaemon._get_recommended_profilecCs2|jj\}}|dkr|dk }|s*|j}||fS)N)rZget_active_profilerW)rr<r4r!r!r"r.s zDaemon._get_startup_profilecCs |jjjS)z$Return all accessible plugin classes)rplugins_repositoryZload_all_plugins)rr!r!r"get_all_plugins"szDaemon.get_all_pluginsc Cs.y|jjj|}Wntk r&dSX|jS)zReturn plugin class docstringr-)rrX load_plugin ImportError__doc__)r plugin_name plugin_classr!r!r"get_plugin_documentation&s  zDaemon.get_plugin_documentationc Cs0y|jjj|}Wntk r&iSX|jS)zReturn plugin's parameters and their hints Parameters: plugin_name -- plugins name Return: dictionary -- {parameter_name: hint} )rrXrZr[Zget_config_options_hints)rr]r^r!r!r"get_plugin_hints0s  zDaemon.get_plugin_hintscCs |jdk S)N)r/)rr!r!r" is_enabledAszDaemon.is_enabledcCs|jdk o|jjS)N)r$Zis_alive)rr!r!r"r?DszDaemon.is_runningcCs`|jr dS|jdkrdStjd|jjtj|jd|_ |j j |j j |j j dS)NFzstarting tuning)targetT)r?r/rrr(r*r%ZThreadrUr$r'rQr&rP)rr!r!r"rPGs      z Daemon.startcCs||jstjddS|jdkr.tjddS|jjsFtjddS|jjtjd|jj |j j |}|jj |S)NzTuneD is not runningFzno profile is setzprofile is not appliedzverifying profile(s): %s) r?rrr/r+rSr(rQrrOrZ verify_tuningr*)rZignore_missingretr!r!r"verify_profileVs        zDaemon.verify_profilecCsB|js dStjd|r$|jj|jj|jjd|_dS)NFzstopping tuningT)r?rrr'r*r&r$r;)rZprofile_switchr!r!r"stopls    z Daemon.stop)NNN)F)F) __name__ __module__ __qualname__r#rr,rr>r@rDr3propertyr<r4r5rGrr9rMrUrErFrWr.rYr_r`rar?rPrdrer!r!r!r"rs8 &         G r)oserrnor%Z tuned.logsZtunedZtuned.exceptionsrZtuned.profiles.exceptionsrZ tuned.constsr Ztuned.utils.commandsrrZtuned.utils.profile_recommenderrrJZlogsrrobjectrr!r!r!r"s       PK$2] NN3daemon/__pycache__/application.cpython-36.opt-1.pycnu[3 .handler_wrapper)signal)r'r,r+r-r()r+r,r)_handle_signal?szApplication._handle_signalcCs:|jtj|jj|jtj|jj|jtj|jjdS)N)r/r.SIGHUPr$ZsighupSIGINTZ terminateSIGTERM)r'r(r(r)r%EszApplication._init_signalscCs6|jdk rtdtjj|||||_tj|jdS)Nz&DBus interface is already initialized.)rr rZdbusZ DBusExporterregister_exporter)r'Zbus_nameZ object_nameZinterface_name namespacer(r(r)attach_to_dbusJs zApplication.attach_to_dbuscCsj|jdk rtdtjj|jjtj|jjtj |jjtj |jj tj |jj tj |_tj|jdS)Nz-Unix socket interface is already initialized.)rr rZ unix_socketZUnixSocketExporterrr!rZCFG_UNIX_SOCKET_PATHZCFG_UNIX_SOCKET_SIGNAL_PATHSZCFG_UNIX_SOCKET_OWNERSHIPZget_intZCFG_UNIX_SOCKET_PERMISIONSZ#CFG_UNIX_SOCKET_CONNECTIONS_BACKLOGr3)r'r(r(r)attach_to_unix_socketQs    z!Application.attach_to_unix_socketcCstj|jdS)N)rZregister_objectr$)r'r(r(r)register_controller\szApplication.register_controllerc Cstj|tj|gggtj\}}}t|dkrBtj|tdtj|d}tj|t|dkrltdytj d|d}Wntj k rtdYnX|dkrtd d S) z| Wait till the child signalizes that the initialization is complete by writing some uninteresting data into the pipe. r z=Cannot daemonize, timeout when waiting for the child process.rz:Cannot daemonize, no response from child process received.?z?Cannot daemonize, invalid response from child process received.Tz0Cannot daemonize, child process reports failure.N) rcloseselectrZDAEMONIZE_PARENT_TIMEOUTlenr readstructunpackerror)r' parent_in_fd child_out_fdZ read_readyZdropZresponsevalr(r(r)_daemonize_parent_s      zApplication._daemonize_parentcCs||_|jyltjj|j}tjj|s4tj|tjtj|jtj tj Btj Bdd}|j dtj WdQRXWn>ttfk r}ztjd|jt|fWYdd}~XnXdS)Niwz%dzcannot write the PID to %s: %s)r&_delete_pid_filerpathdirnameexistsmakedirsfdopenopenO_CREATO_TRUNCO_WRONLYwritegetpidOSErrorIOErrorrcriticalstr)r'pid_fileZdir_namefr@r(r(r)write_pid_filexs  ( zApplication.write_pid_filecCs^tjj|jrZytj|jWn:tk rX}ztjd|jt|fWYdd}~XnXdS)Nz&cannot remove existing PID file %s, %s) rrGrIr&unlinkrRrZwarningrU)r'r@r(r(r)rFs zApplication._delete_pid_filecCs*tj|tjdtjtjdytj}|dkrBtjdWn^tk r}zBt j dt |t j dd}tj||tj|tdWYdd}~XnXtdd }tj|jtjjtj|jtjjtj|jtjj|j|t jd t j dd }tj||tj|dS) zy Finishes daemonizing process, writes a PID file and signalizes to the parent that the initialization is complete. /rz"cannot daemonize, fork() error: %sr9Fz'Cannot daemonize, second fork() failed.Nz /dev/nullzw+zsuccessfully daemonizedT)rr:chdirsetsidumaskforksysexitrRrrTrUr>packrPr rLdup2filenostdinstdoutstderrrXdebug)r'rVrArBpidr@rCfdr(r(r)_daemonize_childs.           zApplication._daemonize_childcCstj}y tj}WnFtk rZ}z*tj|dtj|dtdWYdd}~XnXy2|dkr||j|tjdn|j |f|Wn"|dkrn tjdYnXdS)z Daemonizes the application. In case of failure, TunedException is raised in the parent process. If the operation is successfull, the main process is terminated and only child process returns from this method. rr z Cannot daemonize, fork() failed.N) rpiper^rRr:r rDr_r`rj)r'rVZparent_child_fdsZ child_pidr@r(r(r) daemonizes    zApplication.daemonizecCs|jS)N)r#)r'r(r(r)r szApplication.daemoncCs|jS)N)r$)r'r(r(r)r szApplication.controllercCsj|r|jjtjd|jjtjtjs0tjd|jj }|jjtjtjrTt j |j dk rf|j |S)NTzrUsing one shot no daemon mode, most of the functionality will be not available, it can be changed in global config)rsetrZ CFG_DAEMONrZCFG_DEF_DAEMONrwarnr$runrstopr&rF)r'r resultr(r(r)ros   zApplication.run)NN)__name__ __module__ __qualname__r*r/r%r5r6r7rDrZPID_FILErXrFrjrlpropertyr r ror(r(r(r)rs +  "  )rrrrrrrrZtuned.exceptionsr Z tuned.logsZ tuned.versionr r r.rr_r;r>Z tuned.constsrZtuned.utils.global_configr Zlogsr!r__all__objectrr(r(r(r)s$      PK$2]ds5s5,daemon/__pycache__/controller.cpython-36.pycnu[3 j4@sddlmZddlZddlZddlmZddlZddljZddlm Z dgZ ej j Z GdddeZGdddejjjZdS) )exportsN)TunedException)commands Controllerc@s,eZdZddZddZddZddZd S) TimerStorecCst|_tj|_dS)N)dict_timers threadingZLock _timers_lock)selfr /usr/lib/python3.6/controller.py__init__szTimerStore.__init__c Cs |j||j|<WdQRXdS)N)r r)r tokentimerr r r store_timerszTimerStore.store_timercCsB|j2y|j|}|j|j|=Wn YnXWdQRXdS)N)r rcancel)r rrr r r drop_timers  zTimerStore.drop_timerc Cs<|j,x|jjD] }|jqW|jjWdQRXdS)N)r rvaluesrclear)r rr r r cancel_alls zTimerStore.cancel_allN)__name__ __module__ __qualname__rrrrr r r r r s rcseZdZdZfddZddZddZdd Zej d d d Z d dZ ej dddUddZ ej dddVddZej dddWddZdXddZej dddYddZej dddZdd Zd!d"Zej dd#d[d$d%Zej dd#d\d&d'Zej ddd]d(d)Zej dd*d^d+d,Zej ddd_d-d.Zej ddd`d/d0Zej dddad1d2Zej dd3dbd4d5Zej dd6dcd7d8Zej dd9ddd:d;Zej dddedd?Zej dddgd@dAZ ej ddBdhdCdDZ!ej dddidEdFZ"ej ddGdjdHdIZ#ej dddkdJdKZ$ej dLd#dldMdNZ%ej ddOdmdPdQZ&ej ddRdndSdTZ'Z(S)orz Controller's purpose is to keep the program running, start/stop the tuning, and export the controller interface (currently only over D-Bus). cs8tt|j||_||_tj|_t|_ t |_ dS)N) superrr_daemon_global_configr ZEvent _terminater_cmdr _timer_store)r daemonZ global_config) __class__r r r+s  zController.__init__cCsxtjd|j}|jjtjtj}| r6|r6tj|rb|j j x|j j |j ds`tj qFWtjd|jdS)z1 Controller main loop. The call is blocking. zstarting controllerzterminating controllerN)loginfostartrget_boolconsts CFG_DAEMONCFG_DEF_DAEMONrrrrwaitZ period_checkstop)r resr r r r run3s     zController.runcCs|jjdS)N)rset)r r r r terminateFszController.terminatecCs0|jjjs,|jjj|js,|jjjdS)N)rZ_sighup_processingZis_setr.reloadr)r r r r sighupIs  zController.sighupZsbscCsdS)Nr )r profile_nameresultZerrstrr r r profile_changedOszController.profile_changedcCstjj||jj|dS)N)tunedlogslog_capture_finishrr)r rr r r _log_capture_abortXs zController._log_capture_abortZiisNcCsf|dkr dStjj|}|dkr$dS|dkrVtj||j|gd}|jj|||j|dkrbdS|S)Nr)args) r5r6log_capture_startr ZTimerr8rrr%)r Z log_levelZtimeoutcallerrrr r r r<\s zController.log_capture_startcCs4|dkr dStjj|}|jj||dkr0dS|S)Nr:)r5r6r7rr)r rr=r,r r r r7js   zController.log_capture_finishr:bcCsD|dkr dS|jjtjtjr:|jjr,dS|jjs:dS|jjS)Nr:FT) rr&r'r(r)r is_running is_enabledr%)r r=r r r r%rs  zController.startFcCs,|jjsd}n|jj|d}|jj|S)NT)profile_switch)rr?r+rr)r rAr,r r r _stop}s   zController._stopcCs|dkr dS|jddS)Nr:F)rA)rB)r r=r r r r+szController.stopcCsp|dkr dS|jjr*|jdd}|s*dSy|jjWn.tk rf}ztjd|dSd}~XnX|jS)Nr:FT)rAzFailed to reload TuneD: %s)rr?rBZreload_profile_configrr#errorr%)r r=Zstop_oker r r r0s  zController.reloadcCs|jj}d}d}d}zy$|r,|jjdd|jj||Wnftjjk r}zFd}t|}|r|jjj |krt j d|d}nt j d|WYdd}~XnXWd|r|rt j d|n|st j d|jjX||fS) NOKTF)rAz@Failed to reapply profile '%s'. Did it change on disk and break?zFailed to apply profile '%s'z>Applying previously applied (possibly out-dated) profile '%s'.z$Applying previously applied profile.)rr?r+Z set_profiler5 exceptionsrstrprofilenamer#rCwarnr$r%)r r2manualZ was_runningmsgsuccessZreapplyrDr r r _switch_profiles, $  zController._switch_profilez(bs)cCs(|dkr dS|jj|sdS|j|dS)Nr:F UnauthorizedInvalid profile_nameT)FrO)FrP)r is_valid_namerN)r r2r=r r r switch_profiles  zController.switch_profilecCs |dkr dS|j}|j|dS)Nr:FrO)FrO)recommend_profilerN)r r=r2r r r auto_profileszController.auto_profilecCs*|dkr dS|jjdk r"|jjjSdSdS)Nr:)rrHrI)r r=r r r active_profiles   zController.active_profilez(ss)cCs|dkr dS|jj}|dkrpy"|jj\}}|dkr<|dk }Wn0tk rn}zd}t|}||fSd}~XnX|rztjntj}|dfS)Nr:unknownrO)rVrO) rrKrZget_active_profilerrGr'ZACTIVE_PROFILE_MANUALZACTIVE_PROFILE_AUTO)r r=rKrHrDmoderCr r r profile_modes zController.profile_modecCs|dkr dS|jjpdS)Nr:)rpost_loaded_profile)r r=r r r rYszController.post_loaded_profilecCsB|dkr dS|jjr |jj|jjr>|jjddddddS)Nr:FT)Zsave_instantly)rr?r+r@Zset_all_profiles)r r=r r r disables    zController.disablecCs|dkr dS|jjS)Nr:F)rr?)r r=r r r r?szController.is_runningascCs|dkr gS|jjjjS)Nr:)rprofile_loaderprofile_locatorZget_known_names)r r=r r r profilesszController.profilesza(ss)cCs|dkr gS|jjjjS)Nr:)rr\r]Zget_known_names_summary)r r=r r r profiles2szController.profiles2z(bsss)cCsT|dks|jj| rdS|dks*|dkr2|j}t|jjjj|tj tj gdgS)Nr:F)Fr:r:r:) rrQrUtuplerr\r]Zget_profile_attrsr'ZPROFILE_ATTR_SUMMARYZPROFILE_ATTR_DESCRIPTION)r r2r=r r r profile_infos zController.profile_infocCs|dkr dS|jjjS)Nr:)rZprofile_recommenderZ recommend)r r=r r r rS szController.recommend_profilecCs|dkr dS|jjddS)Nr:F)ignore_missing)rverify_profile)r r=r r r rcszController.verify_profilecCs|dkr dS|jjddS)Nr:FT)rb)rrc)r r=r r r verify_profile_ignore_missingsz(Controller.verify_profile_ignore_missingz a{sa{ss}}cCsz|dkr iSi}xd|jjD]V}|jjddjddd}|j}i||<x$|jD]\}}t||||<qVWqW|S)zuReturn dictionary with accesible plugins Return: dictionary -- {plugin_name: {parameter_name: default_value}} r:.r"_)rget_all_pluginsrsplitZ_get_config_optionsitemsrG)r r=ZpluginsZ plugin_class plugin_nameZ conf_optionskeyvalr r r rhszController.get_all_pluginscCs*|dks|jj| rdS|jjt|S)z"Return docstring of plugin's classr:)rrQrget_plugin_documentationrG)r rkr=r r r rn.sz#Controller.get_plugin_documentationza{ss}cCs*|dks|jj| riS|jjt|S)zReturn dictionary with plugin's parameters and their hints Parameters: plugin_name -- name of plugin Return: dictionary -- {parameter_name: hint} r:)rrQrget_plugin_hintsrG)r rkr=r r r ro5s zController.get_plugin_hintscCsD|dks|jj| rdS|jjr@|jjjr@|jjjj|dSdS)zAllows to dynamically add sockets to send signals to Parameters: path -- path to socket to register for sending signals Return: bool -- True on success r:FT)rrQrZ _applicationZ_unix_socket_exporterZregister_signal_path)r pathr=r r r register_socket_signal_pathCs z&Controller.register_socket_signal_pathZssc Cs|dkr dS|jj|sdS|jj|s,dSd}x2|jjjD]$}|j|krsz*Controller.get_instances..cs |jjkS)N)ryrI)r})rkr r rsTrEcSs|j|jjfS)N)rIry)r}r r r rs) rrQrhkeysr#rCfilterrrtrulistmap)r rkr=r|rur )rkr get_instancess      zController.get_instancesz(bsas)cCsv|dkrddgfS|jj|s(ddgfSx0|jjjD]"}|j|kr4ddtt|jfSq4Wd|}t j |d|gfS)zReturn a list of devices assigned to an instance Parameters: instance_name -- name of the instance Return: bool -- True on success string -- error message or "OK" list of strings -- device names r:FrOzInvalid instance_nameTrEzInstance '%s' not found) rrQrrtrurIsortedrrwr#rC)r rzr=r}r|r r r instance_get_devicess      zController.instance_get_devices)N)N)N)F)N)N)N)N)N)N)N)N)N)N)N)N)N)N)N)N)N)N)N)N)N)N))rrr__doc__rr-r/r1rsignalr4r8Zexportr<r7r%rBr+r0rNrRrTrUrXrYrZr?r^r_rarSrcrdrhrnrorqr~rr __classcell__r r )r!r r%sv                                             '   )r5rZ tuned.logsZtuned.exceptionsrr Z tuned.constsr'Ztuned.utils.commandsr__all__r6getr#objectrZ interfacesZExportableInterfacerr r r r s     PK$2] NN-daemon/__pycache__/application.cpython-36.pycnu[3 .handler_wrapper)signal)r'r,r+r-r()r+r,r)_handle_signal?szApplication._handle_signalcCs:|jtj|jj|jtj|jj|jtj|jjdS)N)r/r.SIGHUPr$ZsighupSIGINTZ terminateSIGTERM)r'r(r(r)r%EszApplication._init_signalscCs6|jdk rtdtjj|||||_tj|jdS)Nz&DBus interface is already initialized.)rr rZdbusZ DBusExporterregister_exporter)r'Zbus_nameZ object_nameZinterface_name namespacer(r(r)attach_to_dbusJs zApplication.attach_to_dbuscCsj|jdk rtdtjj|jjtj|jjtj |jjtj |jj tj |jj tj |_tj|jdS)Nz-Unix socket interface is already initialized.)rr rZ unix_socketZUnixSocketExporterrr!rZCFG_UNIX_SOCKET_PATHZCFG_UNIX_SOCKET_SIGNAL_PATHSZCFG_UNIX_SOCKET_OWNERSHIPZget_intZCFG_UNIX_SOCKET_PERMISIONSZ#CFG_UNIX_SOCKET_CONNECTIONS_BACKLOGr3)r'r(r(r)attach_to_unix_socketQs    z!Application.attach_to_unix_socketcCstj|jdS)N)rZregister_objectr$)r'r(r(r)register_controller\szApplication.register_controllerc Cstj|tj|gggtj\}}}t|dkrBtj|tdtj|d}tj|t|dkrltdytj d|d}Wntj k rtdYnX|dkrtd d S) z| Wait till the child signalizes that the initialization is complete by writing some uninteresting data into the pipe. r z=Cannot daemonize, timeout when waiting for the child process.rz:Cannot daemonize, no response from child process received.?z?Cannot daemonize, invalid response from child process received.Tz0Cannot daemonize, child process reports failure.N) rcloseselectrZDAEMONIZE_PARENT_TIMEOUTlenr readstructunpackerror)r' parent_in_fd child_out_fdZ read_readyZdropZresponsevalr(r(r)_daemonize_parent_s      zApplication._daemonize_parentcCs||_|jyltjj|j}tjj|s4tj|tjtj|jtj tj Btj Bdd}|j dtj WdQRXWn>ttfk r}ztjd|jt|fWYdd}~XnXdS)Niwz%dzcannot write the PID to %s: %s)r&_delete_pid_filerpathdirnameexistsmakedirsfdopenopenO_CREATO_TRUNCO_WRONLYwritegetpidOSErrorIOErrorrcriticalstr)r'pid_fileZdir_namefr@r(r(r)write_pid_filexs  ( zApplication.write_pid_filecCs^tjj|jrZytj|jWn:tk rX}ztjd|jt|fWYdd}~XnXdS)Nz&cannot remove existing PID file %s, %s) rrGrIr&unlinkrRrZwarningrU)r'r@r(r(r)rFs zApplication._delete_pid_filecCs*tj|tjdtjtjdytj}|dkrBtjdWn^tk r}zBt j dt |t j dd}tj||tj|tdWYdd}~XnXtdd }tj|jtjjtj|jtjjtj|jtjj|j|t jd t j dd }tj||tj|dS) zy Finishes daemonizing process, writes a PID file and signalizes to the parent that the initialization is complete. /rz"cannot daemonize, fork() error: %sr9Fz'Cannot daemonize, second fork() failed.Nz /dev/nullzw+zsuccessfully daemonizedT)rr:chdirsetsidumaskforksysexitrRrrTrUr>packrPr rLdup2filenostdinstdoutstderrrXdebug)r'rVrArBpidr@rCfdr(r(r)_daemonize_childs.           zApplication._daemonize_childcCstj}y tj}WnFtk rZ}z*tj|dtj|dtdWYdd}~XnXy2|dkr||j|tjdn|j |f|Wn"|dkrn tjdYnXdS)z Daemonizes the application. In case of failure, TunedException is raised in the parent process. If the operation is successfull, the main process is terminated and only child process returns from this method. rr z Cannot daemonize, fork() failed.N) rpiper^rRr:r rDr_r`rj)r'rVZparent_child_fdsZ child_pidr@r(r(r) daemonizes    zApplication.daemonizecCs|jS)N)r#)r'r(r(r)r szApplication.daemoncCs|jS)N)r$)r'r(r(r)r szApplication.controllercCsj|r|jjtjd|jjtjtjs0tjd|jj }|jjtjtjrTt j |j dk rf|j |S)NTzrUsing one shot no daemon mode, most of the functionality will be not available, it can be changed in global config)rsetrZ CFG_DAEMONrZCFG_DEF_DAEMONrwarnr$runrstopr&rF)r'r resultr(r(r)ros   zApplication.run)NN)__name__ __module__ __qualname__r*r/r%r5r6r7rDrZPID_FILErXrFrjrlpropertyr r ror(r(r(r)rs +  "  )rrrrrrrrZtuned.exceptionsr Z tuned.logsZ tuned.versionr r r.rr_r;r>Z tuned.constsrZtuned.utils.global_configr Zlogsr!r__all__objectrr(r(r(r)s$      PK$2]±**(daemon/__pycache__/daemon.cpython-36.pycnu[3 DaemonNcCstjdtj|_ttj|_ttj|_ tj |_ d|_ tj |_|dk r|jtjtj|_t|jtjtj|_t|jtjtj|_ |jtjtj |_ |jtjtj|_ |jtjtj |_||_|jdkrttj|_|j dkrd|_ n|j |jkr|j|_ |j |j|_tjd|j|j rJtjdtjd|j|j|jft|j d|_||_||_|jt |_!y|j"|Wn2t#k r}ztj$d |WYdd}~XnXdS) Nzinitializing daemonTrFz$using sleep interval of %d second(s)z8dynamic tuning is enabled (can be overridden by plugins)zFusing update interval of %d second(s) (%d times of the sleep interval))Z is_hardcodedz:Cannot set initial profile. No tunings will be enabled: %s)%logdebugconstsZCFG_DEF_DAEMON_daemonintZCFG_DEF_SLEEP_INTERVAL_sleep_intervalZCFG_DEF_UPDATE_INTERVALZ_update_intervalZCFG_DEF_DYNAMIC_TUNING_dynamic_tuningZ_recommend_commandZCFG_DEF_ROLLBACK _rollbackZget_boolZ CFG_DAEMONgetZCFG_SLEEP_INTERVALZCFG_UPDATE_INTERVALZCFG_DYNAMIC_TUNINGZCFG_RECOMMEND_COMMANDZCFG_DEF_RECOMMEND_COMMAND CFG_ROLLBACK _application _sleep_cyclesinfor_profile_recommender _unit_manager_profile_loader _init_threadsr_cmd _init_profilererror)selfZ unit_managerprofile_loader profile_namesconfigZ applicationer!/usr/lib/python3.6/daemon.py__init__sF        zDaemon.__init__cCsFd|_tj|_tj|_tj|_tj|_|jjtj|_dS)N) _thread threadingZEvent _terminate_terminate_profile_switch _not_used_sighup_processingset_profile_applied)rr!r!r"r7s     zDaemon._init_threadscCs|jddS)zARead configuration files again and load profile according to themN)r)rr!r!r"reload_profile_configCszDaemon.reload_profile_configcCsd}|jj}|dkrP|j\}}|dkrrd}|r<|d7}n|d7}tj|n"|dkrr|rhtjdn tjdd|_d|_g|_d|_|j |||dS)NTz.No profile is preset, running in manual mode. z(Only post-loaded profile will be enabledzNo profile will be enabled.) rZget_post_loaded_profile_get_startup_profilerr_profile_manual_active_profiles_post_loaded_profileset_all_profiles)rrmanualpost_loaded_profilemsgr!r!r"rGs&      zDaemon._init_profilecCs|pd}|j}|jr2tjd|j||jg}x:|D]2}||jjjkr8d|}|j|d|t|q8Wy.|r|j j ||_ nd|_ ||_ |j|_ WnJtk r}z.ddj||f}|j|d|t|WYdd}~XnXdS)Nr-zUsing post-loaded profile '%s'z%Requested profile '%s' doesn't exist.FzCannot load profile(s) '%s': %s )splitr2rrrZprofile_locatorZget_known_names_notify_profile_changedrrloadr/r0r1rjoin)rrr4Z profile_listprofileerrstrr r!r!r"_load_profiles`s*    zDaemon._load_profilescCs2|jr"d}|j|d|t||j||dS)Nz/Cannot set profile while the daemon is running.F) is_runningr9rr>)rrr4r=r!r!r" set_profilezs zDaemon.set_profilecCs4|s d|_n$t|jdkr*d}t|n||_dS)NzYWhitespace is not allowed in profile names; only a single post-loaded profile is allowed.)r2lenr8r)r profile_namer=r!r!r"_set_post_loaded_profiles  zDaemon._set_post_loaded_profileFcCsV|jr"d}|j|d|t||j||j|||rR|j|||j|dS)Nz/Cannot set profile while the daemon is running.F)r?r9rrDr>_save_active_profile_save_post_loaded_profile)rZactive_profilesr4r5Zsave_instantlyr=r!r!r"r3s   zDaemon.set_all_profilescCs|jS)N)r/)rr!r!r"r<szDaemon.profilecCs|jS)N)r0)rr!r!r"r4sz Daemon.manualcCs|jr |jSdS)N)r/r2)rr!r!r"r5szDaemon.post_loaded_profilecCs|jS)N)r)rr!r!r"profile_recommenderszDaemon.profile_recommendercCs|jS)N)r)rr!r!r"rszDaemon.profile_loadercCs |jdk rtjtj||||S)N)rrZ send_signalr ZSIGNAL_PROFILE_CHANGED)rrresultr=r!r!r"r9s zDaemon._notify_profile_changedcCsj|jjddgdgd\}}|dkr&dS|dddkr:dS|jjddgdgd\}}tjd |dkoh| S) NZ systemctlzis-system-runningr)Z no_errorsFZstoppingz list-jobsz0\b(shutdown|reboot|halt|poweroff)\.target.*start)rZexecuteresearch)rZretcodeoutr!r!r"_full_rollback_requiredszDaemon._full_rollback_requiredcCs|jdkrtd|jj|jj|jdj|j|j|j |j |jj |j j tjd|jj|jrxtjdj|j}|j|dd|jj|jr|j}x\|jj|j|js|jr|d8}|dkr|j}tjd|jjtjd |jjqW|j jd}x.|jj|j |j rD|d krD|d7}qW|j!j"rZt#j$}njt#j%}|j&svtjd nN|j'd krt#j(}tjd t#j)t#j*fn$|jrtjdt#j$}n tjd|jr|jj+||jj,dS)Nz2Cannot start the daemon without setting a profile.r7z'static tuning from profile '%s' appliedTZOKrArzupdating monitorszperforming tuningsz1terminating TuneD due to system shutdown / rebootZ not_on_exitzMterminating TuneD and not rolling back any changes due to '%s' option in '%s'z+terminating TuneD, rolling back all changesz"terminating TuneD in one-shot mode)-r/rrZcreateZunitsrEr;r1r0rFr2Z start_tuningr+r*rrnamer rstartr9r)clearrrwaitr&r rr Zupdate_monitorsZ update_tuningr(r'is_setr Z ROLLBACK_FULLZ ROLLBACK_SOFTrMrZ ROLLBACK_NONErZGLOBAL_CONFIG_FILEZ stop_tuningZ destroy_all)rrZ _sleep_cntiZrollbackr!r!r" _thread_codesX          "        zDaemon._thread_codecCsHy|jj||Wn0tk rB}ztjt|WYdd}~XnXdS)N)rZsave_active_profilerrrstr)rrr4r r!r!r"rEszDaemon._save_active_profilecCsFy|jj|Wn0tk r@}ztjt|WYdd}~XnXdS)N)rZsave_post_loaded_profilerrrrV)rrCr r!r!r"rFsz Daemon._save_post_loaded_profilecCs&tjd|jj}tjd||S)NzWRunning in automatic mode, checking what profile is recommended for your configuration.zUsing '%s' profile)rrrZ recommend)rr<r!r!r"_get_recommended_profiles  zDaemon._get_recommended_profilecCs2|jj\}}|dkr|dk }|s*|j}||fS)N)rZget_active_profilerW)rr<r4r!r!r"r.s zDaemon._get_startup_profilecCs |jjjS)z$Return all accessible plugin classes)rplugins_repositoryZload_all_plugins)rr!r!r"get_all_plugins"szDaemon.get_all_pluginsc Cs.y|jjj|}Wntk r&dSX|jS)zReturn plugin class docstringr-)rrX load_plugin ImportError__doc__)r plugin_name plugin_classr!r!r"get_plugin_documentation&s  zDaemon.get_plugin_documentationc Cs0y|jjj|}Wntk r&iSX|jS)zReturn plugin's parameters and their hints Parameters: plugin_name -- plugins name Return: dictionary -- {parameter_name: hint} )rrXrZr[Zget_config_options_hints)rr]r^r!r!r"get_plugin_hints0s  zDaemon.get_plugin_hintscCs |jdk S)N)r/)rr!r!r" is_enabledAszDaemon.is_enabledcCs|jdk o|jjS)N)r$Zis_alive)rr!r!r"r?DszDaemon.is_runningcCs`|jr dS|jdkrdStjd|jjtj|jd|_ |j j |j j |j j dS)NFzstarting tuning)targetT)r?r/rrr(r*r%ZThreadrUr$r'rQr&rP)rr!r!r"rPGs      z Daemon.startcCs||jstjddS|jdkr.tjddS|jjsFtjddS|jjtjd|jj |j j |}|jj |S)NzTuneD is not runningFzno profile is setzprofile is not appliedzverifying profile(s): %s) r?rrr/r+rSr(rQrrOrZ verify_tuningr*)rZignore_missingretr!r!r"verify_profileVs        zDaemon.verify_profilecCsB|js dStjd|r$|jj|jj|jjd|_dS)NFzstopping tuningT)r?rrr'r*r&r$r;)rZprofile_switchr!r!r"stopls    z Daemon.stop)NNN)F)F) __name__ __module__ __qualname__r#rr,rr>r@rDr3propertyr<r4r5rGrr9rMrUrErFrWr.rYr_r`rar?rPrdrer!r!r!r"rs8 &         G r)oserrnor%Z tuned.logsZtunedZtuned.exceptionsrZtuned.profiles.exceptionsrZ tuned.constsr Ztuned.utils.commandsrrZtuned.utils.profile_recommenderrrJZlogsrrobjectrr!r!r!r"s       PK$2]ds5s52daemon/__pycache__/controller.cpython-36.opt-1.pycnu[3 j4@sddlmZddlZddlZddlmZddlZddljZddlm Z dgZ ej j Z GdddeZGdddejjjZdS) )exportsN)TunedException)commands Controllerc@s,eZdZddZddZddZddZd S) TimerStorecCst|_tj|_dS)N)dict_timers threadingZLock _timers_lock)selfr /usr/lib/python3.6/controller.py__init__szTimerStore.__init__c Cs |j||j|<WdQRXdS)N)r r)r tokentimerr r r store_timerszTimerStore.store_timercCsB|j2y|j|}|j|j|=Wn YnXWdQRXdS)N)r rcancel)r rrr r r drop_timers  zTimerStore.drop_timerc Cs<|j,x|jjD] }|jqW|jjWdQRXdS)N)r rvaluesrclear)r rr r r cancel_alls zTimerStore.cancel_allN)__name__ __module__ __qualname__rrrrr r r r r s rcseZdZdZfddZddZddZdd Zej d d d Z d dZ ej dddUddZ ej dddVddZej dddWddZdXddZej dddYddZej dddZdd Zd!d"Zej dd#d[d$d%Zej dd#d\d&d'Zej ddd]d(d)Zej dd*d^d+d,Zej ddd_d-d.Zej ddd`d/d0Zej dddad1d2Zej dd3dbd4d5Zej dd6dcd7d8Zej dd9ddd:d;Zej dddedd?Zej dddgd@dAZ ej ddBdhdCdDZ!ej dddidEdFZ"ej ddGdjdHdIZ#ej dddkdJdKZ$ej dLd#dldMdNZ%ej ddOdmdPdQZ&ej ddRdndSdTZ'Z(S)orz Controller's purpose is to keep the program running, start/stop the tuning, and export the controller interface (currently only over D-Bus). cs8tt|j||_||_tj|_t|_ t |_ dS)N) superrr_daemon_global_configr ZEvent _terminater_cmdr _timer_store)r daemonZ global_config) __class__r r r+s  zController.__init__cCsxtjd|j}|jjtjtj}| r6|r6tj|rb|j j x|j j |j ds`tj qFWtjd|jdS)z1 Controller main loop. The call is blocking. zstarting controllerzterminating controllerN)loginfostartrget_boolconsts CFG_DAEMONCFG_DEF_DAEMONrrrrwaitZ period_checkstop)r resr r r r run3s     zController.runcCs|jjdS)N)rset)r r r r terminateFszController.terminatecCs0|jjjs,|jjj|js,|jjjdS)N)rZ_sighup_processingZis_setr.reloadr)r r r r sighupIs  zController.sighupZsbscCsdS)Nr )r profile_nameresultZerrstrr r r profile_changedOszController.profile_changedcCstjj||jj|dS)N)tunedlogslog_capture_finishrr)r rr r r _log_capture_abortXs zController._log_capture_abortZiisNcCsf|dkr dStjj|}|dkr$dS|dkrVtj||j|gd}|jj|||j|dkrbdS|S)Nr)args) r5r6log_capture_startr ZTimerr8rrr%)r Z log_levelZtimeoutcallerrrr r r r<\s zController.log_capture_startcCs4|dkr dStjj|}|jj||dkr0dS|S)Nr:)r5r6r7rr)r rr=r,r r r r7js   zController.log_capture_finishr:bcCsD|dkr dS|jjtjtjr:|jjr,dS|jjs:dS|jjS)Nr:FT) rr&r'r(r)r is_running is_enabledr%)r r=r r r r%rs  zController.startFcCs,|jjsd}n|jj|d}|jj|S)NT)profile_switch)rr?r+rr)r rAr,r r r _stop}s   zController._stopcCs|dkr dS|jddS)Nr:F)rA)rB)r r=r r r r+szController.stopcCsp|dkr dS|jjr*|jdd}|s*dSy|jjWn.tk rf}ztjd|dSd}~XnX|jS)Nr:FT)rAzFailed to reload TuneD: %s)rr?rBZreload_profile_configrr#errorr%)r r=Zstop_oker r r r0s  zController.reloadcCs|jj}d}d}d}zy$|r,|jjdd|jj||Wnftjjk r}zFd}t|}|r|jjj |krt j d|d}nt j d|WYdd}~XnXWd|r|rt j d|n|st j d|jjX||fS) NOKTF)rAz@Failed to reapply profile '%s'. Did it change on disk and break?zFailed to apply profile '%s'z>Applying previously applied (possibly out-dated) profile '%s'.z$Applying previously applied profile.)rr?r+Z set_profiler5 exceptionsrstrprofilenamer#rCwarnr$r%)r r2manualZ was_runningmsgsuccessZreapplyrDr r r _switch_profiles, $  zController._switch_profilez(bs)cCs(|dkr dS|jj|sdS|j|dS)Nr:F UnauthorizedInvalid profile_nameT)FrO)FrP)r is_valid_namerN)r r2r=r r r switch_profiles  zController.switch_profilecCs |dkr dS|j}|j|dS)Nr:FrO)FrO)recommend_profilerN)r r=r2r r r auto_profileszController.auto_profilecCs*|dkr dS|jjdk r"|jjjSdSdS)Nr:)rrHrI)r r=r r r active_profiles   zController.active_profilez(ss)cCs|dkr dS|jj}|dkrpy"|jj\}}|dkr<|dk }Wn0tk rn}zd}t|}||fSd}~XnX|rztjntj}|dfS)Nr:unknownrO)rVrO) rrKrZget_active_profilerrGr'ZACTIVE_PROFILE_MANUALZACTIVE_PROFILE_AUTO)r r=rKrHrDmoderCr r r profile_modes zController.profile_modecCs|dkr dS|jjpdS)Nr:)rpost_loaded_profile)r r=r r r rYszController.post_loaded_profilecCsB|dkr dS|jjr |jj|jjr>|jjddddddS)Nr:FT)Zsave_instantly)rr?r+r@Zset_all_profiles)r r=r r r disables    zController.disablecCs|dkr dS|jjS)Nr:F)rr?)r r=r r r r?szController.is_runningascCs|dkr gS|jjjjS)Nr:)rprofile_loaderprofile_locatorZget_known_names)r r=r r r profilesszController.profilesza(ss)cCs|dkr gS|jjjjS)Nr:)rr\r]Zget_known_names_summary)r r=r r r profiles2szController.profiles2z(bsss)cCsT|dks|jj| rdS|dks*|dkr2|j}t|jjjj|tj tj gdgS)Nr:F)Fr:r:r:) rrQrUtuplerr\r]Zget_profile_attrsr'ZPROFILE_ATTR_SUMMARYZPROFILE_ATTR_DESCRIPTION)r r2r=r r r profile_infos zController.profile_infocCs|dkr dS|jjjS)Nr:)rZprofile_recommenderZ recommend)r r=r r r rS szController.recommend_profilecCs|dkr dS|jjddS)Nr:F)ignore_missing)rverify_profile)r r=r r r rcszController.verify_profilecCs|dkr dS|jjddS)Nr:FT)rb)rrc)r r=r r r verify_profile_ignore_missingsz(Controller.verify_profile_ignore_missingz a{sa{ss}}cCsz|dkr iSi}xd|jjD]V}|jjddjddd}|j}i||<x$|jD]\}}t||||<qVWqW|S)zuReturn dictionary with accesible plugins Return: dictionary -- {plugin_name: {parameter_name: default_value}} r:.r"_)rget_all_pluginsrsplitZ_get_config_optionsitemsrG)r r=ZpluginsZ plugin_class plugin_nameZ conf_optionskeyvalr r r rhszController.get_all_pluginscCs*|dks|jj| rdS|jjt|S)z"Return docstring of plugin's classr:)rrQrget_plugin_documentationrG)r rkr=r r r rn.sz#Controller.get_plugin_documentationza{ss}cCs*|dks|jj| riS|jjt|S)zReturn dictionary with plugin's parameters and their hints Parameters: plugin_name -- name of plugin Return: dictionary -- {parameter_name: hint} r:)rrQrget_plugin_hintsrG)r rkr=r r r ro5s zController.get_plugin_hintscCsD|dks|jj| rdS|jjr@|jjjr@|jjjj|dSdS)zAllows to dynamically add sockets to send signals to Parameters: path -- path to socket to register for sending signals Return: bool -- True on success r:FT)rrQrZ _applicationZ_unix_socket_exporterZregister_signal_path)r pathr=r r r register_socket_signal_pathCs z&Controller.register_socket_signal_pathZssc Cs|dkr dS|jj|sdS|jj|s,dSd}x2|jjjD]$}|j|krsz*Controller.get_instances..cs |jjkS)N)ryrI)r})rkr r rsTrEcSs|j|jjfS)N)rIry)r}r r r rs) rrQrhkeysr#rCfilterrrtrulistmap)r rkr=r|rur )rkr get_instancess      zController.get_instancesz(bsas)cCsv|dkrddgfS|jj|s(ddgfSx0|jjjD]"}|j|kr4ddtt|jfSq4Wd|}t j |d|gfS)zReturn a list of devices assigned to an instance Parameters: instance_name -- name of the instance Return: bool -- True on success string -- error message or "OK" list of strings -- device names r:FrOzInvalid instance_nameTrEzInstance '%s' not found) rrQrrtrurIsortedrrwr#rC)r rzr=r}r|r r r instance_get_devicess      zController.instance_get_devices)N)N)N)F)N)N)N)N)N)N)N)N)N)N)N)N)N)N)N)N)N)N)N)N)N)N))rrr__doc__rr-r/r1rsignalr4r8Zexportr<r7r%rBr+r0rNrRrTrUrXrYrZr?r^r_rarSrcrdrhrnrorqr~rr __classcell__r r )r!r r%sv                                             '   )r5rZ tuned.logsZtuned.exceptionsrr Z tuned.constsr'Ztuned.utils.commandsr__all__r6getr#objectrZ interfacesZExportableInterfacerr r r r s     PK$2]?˸*daemon/__pycache__/__init__.cpython-36.pycnu[3 sPK$2]JKKdaemon/__init__.pynu[from .application import * from .controller import * from .daemon import * PK$2]rplugins/instance/factory.pynu[from .instance import Instance class Factory(object): def create(self, *args, **kwargs): instance = Instance(*args, **kwargs) return instance PK$2]62!plugins/instance/instance.pynu[import tuned.consts as consts class Instance(object): """ """ def __init__(self, plugin, name, devices_expression, devices_udev_regex, script_pre, script_post, options): self._plugin = plugin self._name = name self._devices_expression = devices_expression self._devices_udev_regex = devices_udev_regex self._script_pre = script_pre self._script_post = script_post self._options = options self._active = True self._has_static_tuning = False self._has_dynamic_tuning = False self._assigned_devices = set() self._processed_devices = set() # properties @property def plugin(self): return self._plugin @property def name(self): return self._name @property def active(self): """The instance performs some tuning (otherwise it is suspended).""" return self._active @active.setter def active(self, value): self._active = value @property def devices_expression(self): return self._devices_expression @property def assigned_devices(self): return self._assigned_devices @property def processed_devices(self): return self._processed_devices @property def devices_udev_regex(self): return self._devices_udev_regex @property def script_pre(self): return self._script_pre @property def script_post(self): return self._script_post @property def options(self): return self._options @property def has_static_tuning(self): return self._has_static_tuning @property def has_dynamic_tuning(self): return self._has_dynamic_tuning # methods def apply_tuning(self): self._plugin.instance_apply_tuning(self) def verify_tuning(self, ignore_missing): return self._plugin.instance_verify_tuning(self, ignore_missing) def update_tuning(self): self._plugin.instance_update_tuning(self) def unapply_tuning(self, rollback = consts.ROLLBACK_SOFT): self._plugin.instance_unapply_tuning(self, rollback) def destroy(self): self.unapply_tuning() self._plugin.destroy_instance(self) PK$2]"r:plugins/instance/__pycache__/__init__.cpython-36.opt-1.pycnu[3 s PK$2]GY3plugins/instance/__pycache__/factory.cpython-36.pycnu[3 s PK$2]ޙ[B B 4plugins/instance/__pycache__/instance.cpython-36.pycnu[3 The instance performs some tuning (otherwise it is suspended).)r )rrrractive szInstance.activecCs ||_dS)N)r )rvaluerrrr%scCs|jS)N)r)rrrrr)szInstance.devices_expressioncCs|jS)N)r)rrrrassigned_devices-szInstance.assigned_devicescCs|jS)N)r)rrrrprocessed_devices1szInstance.processed_devicescCs|jS)N)r)rrrrr5szInstance.devices_udev_regexcCs|jS)N)r)rrrrr9szInstance.script_precCs|jS)N)r)rrrrr=szInstance.script_postcCs|jS)N)r )rrrrrAszInstance.optionscCs|jS)N)r )rrrrhas_static_tuningEszInstance.has_static_tuningcCs|jS)N)r )rrrrhas_dynamic_tuningIszInstance.has_dynamic_tuningcCs|jj|dS)N)rZinstance_apply_tuning)rrrr apply_tuningOszInstance.apply_tuningcCs|jj||S)N)rZinstance_verify_tuning)rZignore_missingrrr verify_tuningRszInstance.verify_tuningcCs|jj|dS)N)rZinstance_update_tuning)rrrr update_tuningUszInstance.update_tuningcCs|jj||dS)N)rZinstance_unapply_tuning)rZrollbackrrrunapply_tuningXszInstance.unapply_tuningcCs|j|jj|dS)N)r$rZdestroy_instance)rrrrdestroy[szInstance.destroyN)__name__ __module__ __qualname____doc__rpropertyrrrsetterrrrrrrrrr r!r"r#constsZ ROLLBACK_SOFTr$r%rrrrrs(            r)Z tuned.constsr,objectrrrrrs PK$2]ޙ[B B :plugins/instance/__pycache__/instance.cpython-36.opt-1.pycnu[3 The instance performs some tuning (otherwise it is suspended).)r )rrrractive szInstance.activecCs ||_dS)N)r )rvaluerrrr%scCs|jS)N)r)rrrrr)szInstance.devices_expressioncCs|jS)N)r)rrrrassigned_devices-szInstance.assigned_devicescCs|jS)N)r)rrrrprocessed_devices1szInstance.processed_devicescCs|jS)N)r)rrrrr5szInstance.devices_udev_regexcCs|jS)N)r)rrrrr9szInstance.script_precCs|jS)N)r)rrrrr=szInstance.script_postcCs|jS)N)r )rrrrrAszInstance.optionscCs|jS)N)r )rrrrhas_static_tuningEszInstance.has_static_tuningcCs|jS)N)r )rrrrhas_dynamic_tuningIszInstance.has_dynamic_tuningcCs|jj|dS)N)rZinstance_apply_tuning)rrrr apply_tuningOszInstance.apply_tuningcCs|jj||S)N)rZinstance_verify_tuning)rZignore_missingrrr verify_tuningRszInstance.verify_tuningcCs|jj|dS)N)rZinstance_update_tuning)rrrr update_tuningUszInstance.update_tuningcCs|jj||dS)N)rZinstance_unapply_tuning)rZrollbackrrrunapply_tuningXszInstance.unapply_tuningcCs|j|jj|dS)N)r$rZdestroy_instance)rrrrdestroy[szInstance.destroyN)__name__ __module__ __qualname____doc__rpropertyrrrsetterrrrrrrrrr r!r"r#constsZ ROLLBACK_SOFTr$r%rrrrrs(            r)Z tuned.constsr,objectrrrrrs PK$2]GY9plugins/instance/__pycache__/factory.cpython-36.opt-1.pycnu[3 s PK$2]"r4plugins/instance/__pycache__/__init__.cpython-36.pycnu[3 s PK$2]Lb"<<plugins/instance/__init__.pynu[from .instance import Instance from .factory import Factory PK$2]nʄplugins/repository.pynu[from tuned.utils.plugin_loader import PluginLoader import tuned.plugins.base import tuned.logs log = tuned.logs.get() __all__ = ["Repository"] class Repository(PluginLoader): def __init__(self, monitor_repository, storage_factory, hardware_inventory, device_matcher, device_matcher_udev, plugin_instance_factory, global_cfg, variables): super(Repository, self).__init__() self._plugins = set() self._monitor_repository = monitor_repository self._storage_factory = storage_factory self._hardware_inventory = hardware_inventory self._device_matcher = device_matcher self._device_matcher_udev = device_matcher_udev self._plugin_instance_factory = plugin_instance_factory self._global_cfg = global_cfg self._variables = variables @property def plugins(self): return self._plugins def _set_loader_parameters(self): self._namespace = "tuned.plugins" self._prefix = "plugin_" self._interface = tuned.plugins.base.Plugin def create(self, plugin_name): log.debug("creating plugin %s" % plugin_name) plugin_cls = self.load_plugin(plugin_name) plugin_instance = plugin_cls(self._monitor_repository, self._storage_factory, self._hardware_inventory, self._device_matcher,\ self._device_matcher_udev, self._plugin_instance_factory, self._global_cfg, self._variables) self._plugins.add(plugin_instance) return plugin_instance def delete(self, plugin): assert isinstance(plugin, self._interface) log.debug("removing plugin %s" % plugin) plugin.cleanup() self._plugins.remove(plugin) PK$2]Aplugins/plugin_usb.pynu[from . import base from .decorators import * import tuned.logs from tuned.utils.commands import commands import glob import errno log = tuned.logs.get() class USBPlugin(base.Plugin): """ `usb`:: Sets autosuspend timeout of USB devices to the value specified by the [option]`autosuspend` option in seconds. If the [option]`devices` option is specified, the [option]`autosuspend` option applies to only the USB devices specified, otherwise it applies to all USB devices. + The value `0` means that autosuspend is disabled. + .To turn off USB autosuspend for USB devices `1-1` and `1-2` ==== ---- [usb] devices=1-1,1-2 autosuspend=0 ---- ==== """ def _init_devices(self): self._devices_supported = True self._free_devices = set() self._assigned_devices = set() for device in self._hardware_inventory.get_devices("usb").match_property("DEVTYPE", "usb_device"): self._free_devices.add(device.sys_name) self._cmd = commands() def _get_device_objects(self, devices): return [self._hardware_inventory.get_device("usb", x) for x in devices] @classmethod def _get_config_options(self): return { "autosuspend" : None, } def _instance_init(self, instance): instance._has_static_tuning = True instance._has_dynamic_tuning = False def _instance_cleanup(self, instance): pass def _autosuspend_sysfile(self, device): return "/sys/bus/usb/devices/%s/power/autosuspend" % device @command_set("autosuspend", per_device=True) def _set_autosuspend(self, value, device, sim, remove): enable = self._option_bool(value) if enable is None: return None val = "1" if enable else "0" if not sim: sys_file = self._autosuspend_sysfile(device) self._cmd.write_to_file(sys_file, val, \ no_error = [errno.ENOENT] if remove else False) return val @command_get("autosuspend") def _get_autosuspend(self, device, ignore_missing=False): sys_file = self._autosuspend_sysfile(device) return self._cmd.read_file(sys_file, no_error=ignore_missing).strip() PK$2]`BBplugins/plugin_disk.pynu[import errno from . import hotplug from .decorators import * import tuned.logs import tuned.consts as consts from tuned.utils.commands import commands import os import re log = tuned.logs.get() class DiskPlugin(hotplug.Plugin): """ `disk`:: Plug-in for tuning various block device options. This plug-in can also dynamically change the advanced power management and spindown timeout setting for a drive according to the current drive utilization. The dynamic tuning is controlled by the [option]`dynamic` and the global [option]`dynamic_tuning` option in `tuned-main.conf`. + The disk plug-in operates on all supported block devices unless a comma separated list of [option]`devices` is passed to it. + .Operate only on the sda block device ==== ---- [disk] # Comma separated list of devices, all devices if commented out. devices=sda ---- ==== + The [option]`elevator` option sets the Linux I/O scheduler. + .Use the bfq I/O scheduler on xvda block device ==== ---- [disk] device=xvda elevator=bfq ---- ==== + The [option]`scheduler_quantum` option only applies to the CFQ I/O scheduler. It defines the number of I/O requests that CFQ sends to one device at one time, essentially limiting queue depth. The default value is 8 requests. The device being used may support greater queue depth, but increasing the value of quantum will also increase latency, especially for large sequential write work loads. + The [option]`apm` option sets the Advanced Power Management feature on drives that support it. It corresponds to using the `-B` option of the `hdparm` utility. The [option]`spindown` option puts the drive into idle (low-power) mode, and also sets the standby (spindown) timeout for the drive. It corresponds to using `-S` option of the `hdparm` utility. + .Use a medium-agressive power management with spindown ==== ---- [disk] apm=128 spindown=6 ---- ==== + The [option]`readahead` option controls how much extra data the operating system reads from disk when performing sequential I/O operations. Increasing the `readahead` value might improve performance in application environments where sequential reading of large files takes place. The default unit for readahead is KiB. This can be adjusted to sectors by specifying the suffix 's'. If the suffix is specified, there must be at least one space between the number and suffix (for example, `readahead=8192 s`). + .Set the `readahead` to 4MB unless already set to a higher value ==== ---- [disk] readahead=>4096 ---- ==== The disk readahead value can be multiplied by the constant specified by the [option]`readahead_multiply` option. """ def __init__(self, *args, **kwargs): super(DiskPlugin, self).__init__(*args, **kwargs) self._power_levels = [254, 225, 195, 165, 145, 125, 105, 85, 70, 55, 30, 20] self._spindown_levels = [0, 250, 230, 210, 190, 170, 150, 130, 110, 90, 70, 60] self._levels = len(self._power_levels) self._level_steps = 6 self._load_smallest = 0.01 self._cmd = commands() def _init_devices(self): super(DiskPlugin, self)._init_devices() self._devices_supported = True self._use_hdparm = True self._free_devices = set() self._hdparm_apm_device_support = dict() for device in self._hardware_inventory.get_devices("block"): if self._device_is_supported(device): self._free_devices.add(device.sys_name) self._assigned_devices = set() def _get_device_objects(self, devices): return [self._hardware_inventory.get_device("block", x) for x in devices] def _is_hdparm_apm_supported(self, device): if not self._use_hdparm: return False if device in self._hdparm_apm_device_support: return self._hdparm_apm_device_support[device] (rc, out, err_msg) = self._cmd.execute(["hdparm", "-C", "/dev/%s" % device], \ no_errors = [errno.ENOENT], return_err=True) if rc == -errno.ENOENT: log.warn("hdparm command not found, ignoring for other devices") self._use_hdparm = False return False elif rc: log.info("Device '%s' not supported by hdparm" % device) log.debug("(rc: %s, msg: '%s')" % (rc, err_msg)) self._hdparm_apm_device_support[device] = False return False elif "unknown" in out: log.info("Driver for device '%s' does not support apm command" % device) self._hdparm_apm_device_support[device] = False return False self._hdparm_apm_device_support[device] = True return True @classmethod def _device_is_supported(cls, device): return device.device_type == "disk" and \ device.attributes.get("removable", None) == b"0" and \ (device.parent is None or \ device.parent.subsystem in ["scsi", "virtio", "xen", "nvme"]) def _hardware_events_init(self): self._hardware_inventory.subscribe(self, "block", self._hardware_events_callback) def _hardware_events_cleanup(self): self._hardware_inventory.unsubscribe(self) def _hardware_events_callback(self, event, device): if self._device_is_supported(device) or event == "remove": super(DiskPlugin, self)._hardware_events_callback(event, device) def _added_device_apply_tuning(self, instance, device_name): if instance._load_monitor is not None: instance._load_monitor.add_device(device_name) super(DiskPlugin, self)._added_device_apply_tuning(instance, device_name) def _removed_device_unapply_tuning(self, instance, device_name): if instance._load_monitor is not None: instance._load_monitor.remove_device(device_name) super(DiskPlugin, self)._removed_device_unapply_tuning(instance, device_name) @classmethod def _get_config_options(cls): return { "dynamic" : True, # FIXME: do we want this default? "elevator" : None, "apm" : None, "spindown" : None, "readahead" : None, "readahead_multiply" : None, "scheduler_quantum" : None, } @classmethod def _get_config_options_used_by_dynamic(cls): return [ "apm", "spindown", ] def _instance_init(self, instance): instance._has_static_tuning = True self._apm_errcnt = 0 self._spindown_errcnt = 0 if self._option_bool(instance.options["dynamic"]): instance._has_dynamic_tuning = True instance._load_monitor = \ self._monitors_repository.create( "disk", instance.assigned_devices) instance._device_idle = {} instance._stats = {} instance._idle = {} instance._spindown_change_delayed = {} else: instance._has_dynamic_tuning = False instance._load_monitor = None def _instance_cleanup(self, instance): if instance._load_monitor is not None: self._monitors_repository.delete(instance._load_monitor) instance._load_monitor = None def _update_errcnt(self, rc, spindown): if spindown: s = "spindown" cnt = self._spindown_errcnt else: s = "apm" cnt = self._apm_errcnt if cnt >= consts.ERROR_THRESHOLD: return if rc == 0: cnt = 0 elif rc == -errno.ENOENT: self._spindown_errcnt = self._apm_errcnt = consts.ERROR_THRESHOLD + 1 log.warn("hdparm command not found, ignoring future set_apm / set_spindown commands") return else: cnt += 1 if cnt == consts.ERROR_THRESHOLD: log.info("disabling set_%s command: too many consecutive errors" % s) if spindown: self._spindown_errcnt = cnt else: self._apm_errcnt = cnt def _change_spindown(self, instance, device, new_spindown_level): log.debug("changing spindown to %d" % new_spindown_level) (rc, out) = self._cmd.execute(["hdparm", "-S%d" % new_spindown_level, "/dev/%s" % device], no_errors = [errno.ENOENT]) self._update_errcnt(rc, True) instance._spindown_change_delayed[device] = False def _drive_spinning(self, device): (rc, out) = self._cmd.execute(["hdparm", "-C", "/dev/%s" % device], no_errors = [errno.ENOENT]) return not "standby" in out and not "sleeping" in out def _instance_update_dynamic(self, instance, device): if not self._is_hdparm_apm_supported(device): return load = instance._load_monitor.get_device_load(device) if load is None: return if not device in instance._stats: self._init_stats_and_idle(instance, device) self._update_stats(instance, device, load) self._update_idle(instance, device) stats = instance._stats[device] idle = instance._idle[device] # level change decision if idle["level"] + 1 < self._levels and idle["read"] >= self._level_steps and idle["write"] >= self._level_steps: level_change = 1 elif idle["level"] > 0 and (idle["read"] == 0 or idle["write"] == 0): level_change = -1 else: level_change = 0 # change level if decided if level_change != 0: idle["level"] += level_change new_power_level = self._power_levels[idle["level"]] new_spindown_level = self._spindown_levels[idle["level"]] log.debug("tuning level changed to %d" % idle["level"]) if self._spindown_errcnt < consts.ERROR_THRESHOLD: if not self._drive_spinning(device) and level_change > 0: log.debug("delaying spindown change to %d, drive has already spun down" % new_spindown_level) instance._spindown_change_delayed[device] = True else: self._change_spindown(instance, device, new_spindown_level) if self._apm_errcnt < consts.ERROR_THRESHOLD: log.debug("changing APM_level to %d" % new_power_level) (rc, out) = self._cmd.execute(["hdparm", "-B%d" % new_power_level, "/dev/%s" % device], no_errors = [errno.ENOENT]) self._update_errcnt(rc, False) elif instance._spindown_change_delayed[device] and self._drive_spinning(device): new_spindown_level = self._spindown_levels[idle["level"]] self._change_spindown(instance, device, new_spindown_level) log.debug("%s load: read %0.2f, write %0.2f" % (device, stats["read"], stats["write"])) log.debug("%s idle: read %d, write %d, level %d" % (device, idle["read"], idle["write"], idle["level"])) def _init_stats_and_idle(self, instance, device): instance._stats[device] = { "new": 11 * [0], "old": 11 * [0], "max": 11 * [1] } instance._idle[device] = { "level": 0, "read": 0, "write": 0 } instance._spindown_change_delayed[device] = False def _update_stats(self, instance, device, new_load): instance._stats[device]["old"] = old_load = instance._stats[device]["new"] instance._stats[device]["new"] = new_load # load difference diff = [new_old[0] - new_old[1] for new_old in zip(new_load, old_load)] instance._stats[device]["diff"] = diff # adapt maximum expected load if the difference is higher old_max_load = instance._stats[device]["max"] max_load = [max(pair) for pair in zip(old_max_load, diff)] instance._stats[device]["max"] = max_load # read/write ratio instance._stats[device]["read"] = float(diff[1]) / float(max_load[1]) instance._stats[device]["write"] = float(diff[5]) / float(max_load[5]) def _update_idle(self, instance, device): # increase counter if there is no load, otherwise reset the counter for operation in ["read", "write"]: if instance._stats[device][operation] < self._load_smallest: instance._idle[device][operation] += 1 else: instance._idle[device][operation] = 0 def _instance_apply_dynamic(self, instance, device): # At the moment we support dynamic tuning just for devices compatible with hdparm apm commands # If in future will be added new functionality not connected to this command, # it is needed to change it here if not self._is_hdparm_apm_supported(device): log.info("There is no dynamic tuning available for device '%s' at time" % device) else: super(DiskPlugin, self)._instance_apply_dynamic(instance, device) def _instance_unapply_dynamic(self, instance, device): pass def _sysfs_path(self, device, suffix, prefix = "/sys/block/"): if "/" in device: dev = os.path.join(prefix, device.replace("/", "!"), suffix) if os.path.exists(dev): return dev return os.path.join(prefix, device, suffix) def _elevator_file(self, device): return self._sysfs_path(device, "queue/scheduler") @command_set("elevator", per_device=True) def _set_elevator(self, value, device, sim, remove): sys_file = self._elevator_file(device) if not sim: self._cmd.write_to_file(sys_file, value, \ no_error = [errno.ENOENT] if remove else False) return value @command_get("elevator") def _get_elevator(self, device, ignore_missing=False): sys_file = self._elevator_file(device) # example of scheduler file content: # noop deadline [cfq] return self._cmd.get_active_option(self._cmd.read_file(sys_file, no_error=ignore_missing)) @command_set("apm", per_device=True) def _set_apm(self, value, device, sim, remove): if not self._is_hdparm_apm_supported(device): if not sim: log.info("apm option is not supported for device '%s'" % device) return None else: return str(value) if self._apm_errcnt < consts.ERROR_THRESHOLD: if not sim: (rc, out) = self._cmd.execute(["hdparm", "-B", str(value), "/dev/" + device], no_errors = [errno.ENOENT]) self._update_errcnt(rc, False) return str(value) else: return None @command_get("apm") def _get_apm(self, device, ignore_missing=False): if not self._is_hdparm_apm_supported(device): if not ignore_missing: log.info("apm option is not supported for device '%s'" % device) return None value = None err = False (rc, out) = self._cmd.execute(["hdparm", "-B", "/dev/" + device], no_errors = [errno.ENOENT]) if rc == -errno.ENOENT: return None elif rc != 0: err = True else: m = re.match(r".*=\s*(\d+).*", out, re.S) if m: try: value = int(m.group(1)) except ValueError: err = True if err: log.error("could not get current APM settings for device '%s'" % device) return value @command_set("spindown", per_device=True) def _set_spindown(self, value, device, sim, remove): if not self._is_hdparm_apm_supported(device): if not sim: log.info("spindown option is not supported for device '%s'" % device) return None else: return str(value) if self._spindown_errcnt < consts.ERROR_THRESHOLD: if not sim: (rc, out) = self._cmd.execute(["hdparm", "-S", str(value), "/dev/" + device], no_errors = [errno.ENOENT]) self._update_errcnt(rc, True) return str(value) else: return None @command_get("spindown") def _get_spindown(self, device, ignore_missing=False): if not self._is_hdparm_apm_supported(device): if not ignore_missing: log.info("spindown option is not supported for device '%s'" % device) return None # There's no way how to get current/old spindown value, hardcoding vendor specific 253 return 253 def _readahead_file(self, device): return self._sysfs_path(device, "queue/read_ahead_kb") def _parse_ra(self, value): val = str(value).split(None, 1) try: v = int(val[0]) except ValueError: return None if len(val) > 1 and val[1][0] == "s": # v *= 512 / 1024 v /= 2 return v @command_set("readahead", per_device=True) def _set_readahead(self, value, device, sim, remove): sys_file = self._readahead_file(device) val = self._parse_ra(value) if val is None: log.error("Invalid readahead value '%s' for device '%s'" % (value, device)) else: if not sim: self._cmd.write_to_file(sys_file, "%d" % val, \ no_error = [errno.ENOENT] if remove else False) return val @command_get("readahead") def _get_readahead(self, device, ignore_missing=False): sys_file = self._readahead_file(device) value = self._cmd.read_file(sys_file, no_error=ignore_missing).strip() if len(value) == 0: return None return int(value) @command_custom("readahead_multiply", per_device=True) def _multiply_readahead(self, enabling, multiplier, device, verify, ignore_missing): if verify: return None storage_key = self._storage_key( command_name = "readahead_multiply", device_name = device) if enabling: old_readahead = self._get_readahead(device) if old_readahead is None: return new_readahead = int(float(multiplier) * old_readahead) self._storage.set(storage_key, old_readahead) self._set_readahead(new_readahead, device, False) else: old_readahead = self._storage.get(storage_key) if old_readahead is None: return self._set_readahead(old_readahead, device, False) self._storage.unset(storage_key) def _scheduler_quantum_file(self, device): return self._sysfs_path(device, "queue/iosched/quantum") @command_set("scheduler_quantum", per_device=True) def _set_scheduler_quantum(self, value, device, sim, remove): sys_file = self._scheduler_quantum_file(device) if not sim: self._cmd.write_to_file(sys_file, "%d" % int(value), \ no_error = [errno.ENOENT] if remove else False) return value @command_get("scheduler_quantum") def _get_scheduler_quantum(self, device, ignore_missing=False): sys_file = self._scheduler_quantum_file(device) value = self._cmd.read_file(sys_file, no_error=ignore_missing).strip() if len(value) == 0: if not ignore_missing: log.info("disk_scheduler_quantum option is not supported for device '%s'" % device) return None return int(value) PK$2]㇦~ plugins/plugin_audio.pynu[from . import hotplug from .decorators import * import tuned.logs from tuned.utils.commands import commands import os import errno import struct import glob log = tuned.logs.get() cmd = commands() class AudioPlugin(hotplug.Plugin): """ `audio`:: Sets audio cards power saving options. The plug-in sets the auto suspend timeout for audio codecs to the value specified by the [option]`timeout` option. + Currently, the `snd_hda_intel` and `snd_ac97_codec` codecs are supported and the [option]`timeout` value is in seconds. To disable auto suspend for these codecs, set the [option]`timeout` value to `0`. To enforce the controller reset, set the option [option]`reset_controller` to `true`. Note that power management is supported per module. Hence, the kernel module names are used as device names. + .Set the timeout value to 10s and enforce the controller reset ==== ---- [audio] timeout=10 reset_controller=true ---- ==== """ def _init_devices(self): self._devices_supported = True self._assigned_devices = set() self._free_devices = set() for device in self._hardware_inventory.get_devices("sound").match_sys_name("card*"): module_name = self._device_module_name(device) if module_name in ["snd_hda_intel", "snd_ac97_codec"]: self._free_devices.add(module_name) def _instance_init(self, instance): instance._has_static_tuning = True instance._has_dynamic_tuning = False def _instance_cleanup(self, instance): pass def _device_module_name(self, device): try: return device.parent.driver except: return None @classmethod def _get_config_options(cls): return { "timeout": 0, "reset_controller": False, } def _timeout_path(self, device): return "/sys/module/%s/parameters/power_save" % device def _reset_controller_path(self, device): return "/sys/module/%s/parameters/power_save_controller" % device @command_set("timeout", per_device = True) def _set_timeout(self, value, device, sim, remove): try: timeout = int(value) except ValueError: log.error("timeout value '%s' is not integer" % value) return None if timeout >= 0: sys_file = self._timeout_path(device) if not sim: cmd.write_to_file(sys_file, "%d" % timeout, \ no_error = [errno.ENOENT] if remove else False) return timeout else: return None @command_get("timeout") def _get_timeout(self, device, ignore_missing=False): sys_file = self._timeout_path(device) value = cmd.read_file(sys_file, no_error=ignore_missing) if len(value) > 0: return value return None @command_set("reset_controller", per_device = True) def _set_reset_controller(self, value, device, sim, remove): v = cmd.get_bool(value) sys_file = self._reset_controller_path(device) if os.path.exists(sys_file): if not sim: cmd.write_to_file(sys_file, v, \ no_error = [errno.ENOENT] if remove else False) return v return None @command_get("reset_controller") def _get_reset_controller(self, device, ignore_missing=False): sys_file = self._reset_controller_path(device) if os.path.exists(sys_file): value = cmd.read_file(sys_file) if len(value) > 0: return cmd.get_bool(value) return None PK$2]< plugins/plugin_sysfs.pynu[from . import base import glob import re import os.path from .decorators import * import tuned.logs import tuned.consts as consts from subprocess import * from tuned.utils.commands import commands log = tuned.logs.get() class SysfsPlugin(base.Plugin): """ `sysfs`:: Sets various `sysfs` settings specified by the plug-in options. + The syntax is `_name_=_value_`, where `_name_` is the `sysfs` path to use and `_value_` is the value to write. The `sysfs` path supports the shell-style wildcard characters (see `man 7 glob` for additional detail). + Use this plugin in case you need to change some settings that are not covered by other plug-ins. Prefer specific plug-ins if they cover the required settings. + .Ignore corrected errors and associated scans that cause latency spikes ==== ---- [sysfs] /sys/devices/system/machinecheck/machinecheck*/ignore_ce=1 ---- ==== """ # TODO: resolve possible conflicts with sysctl settings from other plugins def __init__(self, *args, **kwargs): super(SysfsPlugin, self).__init__(*args, **kwargs) self._has_dynamic_options = True self._cmd = commands() def _instance_init(self, instance): instance._has_dynamic_tuning = False instance._has_static_tuning = True instance._sysfs = dict([(os.path.normpath(key_value[0]), key_value[1]) for key_value in list(instance.options.items())]) instance._sysfs_original = {} def _instance_cleanup(self, instance): pass def _instance_apply_static(self, instance): for key, value in list(instance._sysfs.items()): v = self._variables.expand(value) for f in glob.iglob(key): if self._check_sysfs(f): instance._sysfs_original[f] = self._read_sysfs(f) self._write_sysfs(f, v) else: log.error("rejecting write to '%s' (not inside /sys)" % f) def _instance_verify_static(self, instance, ignore_missing, devices): ret = True for key, value in list(instance._sysfs.items()): v = self._variables.expand(value) for f in glob.iglob(key): if self._check_sysfs(f): curr_val = self._read_sysfs(f) if self._verify_value(f, v, curr_val, ignore_missing) == False: ret = False return ret def _instance_unapply_static(self, instance, rollback = consts.ROLLBACK_SOFT): for key, value in list(instance._sysfs_original.items()): self._write_sysfs(key, value) def _check_sysfs(self, sysfs_file): return re.match(r"^/sys/.*", sysfs_file) def _read_sysfs(self, sysfs_file): data = self._cmd.read_file(sysfs_file).strip() if len(data) > 0: return self._cmd.get_active_option(data, False) else: return None def _write_sysfs(self, sysfs_file, value): return self._cmd.write_to_file(sysfs_file, value) PK$2]>j} plugins/plugin_mounts.pynu[import tuned.consts as consts from . import base from .decorators import * from subprocess import Popen,PIPE import tuned.logs from tuned.utils.commands import commands import glob log = tuned.logs.get() cmd = commands() class MountsPlugin(base.Plugin): """ `mounts`:: Enables or disables barriers for mounts according to the value of the [option]`disable_barriers` option. The [option]`disable_barriers` option has an optional value `force` which disables barriers even on mountpoints with write back caches. Note that only extended file systems (ext) are supported by this plug-in. """ @classmethod def _generate_mountpoint_topology(cls): """ Gets the information about disks, partitions and mountpoints. Stores information about used filesystem and creates a list of all underlying devices (in case of LVM) for each mountpoint. """ mountpoint_topology = {} current_disk = None stdout, stderr = Popen(["lsblk", "-rno", \ "TYPE,RM,KNAME,FSTYPE,MOUNTPOINT"], \ stdout=PIPE, stderr=PIPE, close_fds=True, \ universal_newlines = True).communicate() for columns in [line.split() for line in stdout.splitlines()]: if len(columns) < 3: continue device_type, device_removable, device_name = columns[:3] filesystem = columns[3] if len(columns) > 3 else None mountpoint = columns[4] if len(columns) > 4 else None if device_type == "disk": current_disk = device_name continue # skip removable, skip nonpartitions if device_removable == "1" or device_type not in ["part", "lvm"]: continue if mountpoint is None or mountpoint == "[SWAP]": continue mountpoint_topology.setdefault(mountpoint, {"disks": set(), "device_name": device_name, "filesystem": filesystem}) mountpoint_topology[mountpoint]["disks"].add(current_disk) cls._mountpoint_topology = mountpoint_topology def _init_devices(self): self._generate_mountpoint_topology() self._devices_supported = True self._free_devices = set(self._mountpoint_topology.keys()) self._assigned_devices = set() @classmethod def _get_config_options(self): return { "disable_barriers": None, } def _instance_init(self, instance): instance._has_dynamic_tuning = False instance._has_static_tuning = True def _instance_cleanup(self, instance): pass def _get_device_cache_type(self, device): """ Get device cache type. This will work only for devices on SCSI kernel subsystem. """ source_filenames = glob.glob("/sys/block/%s/device/scsi_disk/*/cache_type" % device) for source_filename in source_filenames: return cmd.read_file(source_filename).strip() return None def _mountpoint_has_writeback_cache(self, mountpoint): """ Checks if the device has 'write back' cache. If the cache type cannot be determined, asume some other cache. """ for device in self._mountpoint_topology[mountpoint]["disks"]: if self._get_device_cache_type(device) == "write back": return True return False def _mountpoint_has_barriers(self, mountpoint): """ Checks if a given mountpoint is mounted with barriers enabled or disabled. """ with open("/proc/mounts") as mounts_file: for line in mounts_file: # device mountpoint filesystem options dump check columns = line.split() if columns[0][0] != "/": continue if columns[1] == mountpoint: option_list = columns[3] break else: return None options = option_list.split(",") for option in options: (name, sep, value) = option.partition("=") # nobarrier barrier=0 if name == "nobarrier" or (name == "barrier" and value == "0"): return False # barrier barrier=1 elif name == "barrier": return True else: # default return True def _remount_partition(self, partition, options): """ Remounts partition. """ remount_command = ["/usr/bin/mount", partition, "-o", "remount,%s" % options] cmd.execute(remount_command) @command_custom("disable_barriers", per_device=True) def _disable_barriers(self, start, value, mountpoint, verify, ignore_missing): storage_key = self._storage_key( command_name = "disable_barriers", device_name = mountpoint) force = str(value).lower() == "force" value = force or self._option_bool(value) if start: if not value: return None reject_reason = None if not self._mountpoint_topology[mountpoint]["filesystem"].startswith("ext"): reject_reason = "filesystem not supported" elif not force and self._mountpoint_has_writeback_cache(mountpoint): reject_reason = "device uses write back cache" else: original_value = self._mountpoint_has_barriers(mountpoint) if original_value is None: reject_reason = "unknown current setting" elif original_value == False: if verify: log.info(consts.STR_VERIFY_PROFILE_OK % mountpoint) return True else: reject_reason = "barriers already disabled" elif verify: log.error(consts.STR_VERIFY_PROFILE_FAIL % mountpoint) return False if reject_reason is not None: log.info("not disabling barriers on '%s' (%s)" % (mountpoint, reject_reason)) return None self._storage.set(storage_key, original_value) log.info("disabling barriers on '%s'" % mountpoint) self._remount_partition(mountpoint, "barrier=0") else: if verify: return None original_value = self._storage.get(storage_key) if original_value is None: return None log.info("enabling barriers on '%s'" % mountpoint) self._remount_partition(mountpoint, "barrier=1") self._storage.unset(storage_key) return None PK$2]Ba$ plugins/plugin_irqbalance.pynu[from . import base from .decorators import command_custom from tuned import consts import tuned.logs import errno import perf import re log = tuned.logs.get() class IrqbalancePlugin(base.Plugin): """ `irqbalance`:: Plug-in for irqbalance settings management. The plug-in configures CPUs which should be skipped when rebalancing IRQs in `/etc/sysconfig/irqbalance`. It then restarts irqbalance if and only if it was previously running. + The banned/skipped CPUs are specified as a CPU list via the [option]`banned_cpus` option. + .Skip CPUs 2,4 and 9-13 when rebalancing IRQs ==== ---- [irqbalance] banned_cpus=2,4,9-13 ---- ==== """ def __init__(self, *args, **kwargs): super(IrqbalancePlugin, self).__init__(*args, **kwargs) self._cpus = perf.cpu_map() def _instance_init(self, instance): instance._has_dynamic_tuning = False instance._has_static_tuning = True def _instance_cleanup(self, instance): pass @classmethod def _get_config_options(cls): return { "banned_cpus": None, } def _read_irqbalance_sysconfig(self): try: with open(consts.IRQBALANCE_SYSCONFIG_FILE, "r") as f: return f.read() except IOError as e: if e.errno == errno.ENOENT: log.warn("irqbalance sysconfig file is missing. Is irqbalance installed?") else: log.error("Failed to read irqbalance sysconfig file: %s" % e) return None def _write_irqbalance_sysconfig(self, content): try: with open(consts.IRQBALANCE_SYSCONFIG_FILE, "w") as f: f.write(content) return True except IOError as e: log.error("Failed to write irqbalance sysconfig file: %s" % e) return False def _write_banned_cpus(self, sysconfig, banned_cpumask): return sysconfig + "IRQBALANCE_BANNED_CPUS=%s\n" % banned_cpumask def _clear_banned_cpus(self, sysconfig): lines = [] for line in sysconfig.split("\n"): if not re.match(r"\s*IRQBALANCE_BANNED_CPUS=", line): lines.append(line) return "\n".join(lines) def _restart_irqbalance(self): # Exit code 5 means unit not found (see 'EXIT_NOTINSTALLED' in # systemd.exec(5)) retcode, out = self._cmd.execute( ["systemctl", "try-restart", "irqbalance"], no_errors=[5]) if retcode != 0: log.warn("Failed to restart irqbalance. Is it installed?") def _set_banned_cpus(self, banned_cpumask): content = self._read_irqbalance_sysconfig() if content is None: return content = self._clear_banned_cpus(content) content = self._write_banned_cpus(content, banned_cpumask) if self._write_irqbalance_sysconfig(content): self._restart_irqbalance() def _restore_banned_cpus(self): content = self._read_irqbalance_sysconfig() if content is None: return content = self._clear_banned_cpus(content) if self._write_irqbalance_sysconfig(content): self._restart_irqbalance() @command_custom("banned_cpus", per_device=False) def _banned_cpus(self, enabling, value, verify, ignore_missing): banned_cpumask = None if value is not None: banned = set(self._cmd.cpulist_unpack(value)) present = set(self._cpus) if banned.issubset(present): banned_cpumask = self._cmd.cpulist2hex(list(banned)) else: str_cpus = ",".join([str(x) for x in self._cpus]) log.error("Invalid banned_cpus specified, '%s' does not match available cores '%s'" % (value, str_cpus)) if (enabling or verify) and banned_cpumask is None: return None if verify: # Verification is currently not supported return None elif enabling: self._set_banned_cpus(banned_cpumask) else: self._restore_banned_cpus() PK$2]3y plugins/plugin_vm.pynu[from . import base from .decorators import * import tuned.logs import os import errno import struct import glob from tuned.utils.commands import commands log = tuned.logs.get() cmd = commands() class VMPlugin(base.Plugin): """ `vm`:: Enables or disables transparent huge pages depending on value of the [option]`transparent_hugepages` option. The option can have one of three possible values `always`, `madvise` and `never`. + .Disable transparent hugepages ==== ---- [vm] transparent_hugepages=never ---- ==== + The [option]`transparent_hugepage.defrag` option specifies the defragmentation policy. Possible values for this option are `always`, `defer`, `defer+madvise`, `madvise` and `never`. For a detailed explanation of these values refer to link:https://www.kernel.org/doc/Documentation/vm/transhuge.txt[Transparent Hugepage Support]. """ @classmethod def _get_config_options(self): return { "transparent_hugepages" : None, "transparent_hugepage" : None, "transparent_hugepage.defrag" : None, } def _instance_init(self, instance): instance._has_static_tuning = True instance._has_dynamic_tuning = False def _instance_cleanup(self, instance): pass @classmethod def _thp_path(self): path = "/sys/kernel/mm/transparent_hugepage" if not os.path.exists(path): # RHEL-6 support path = "/sys/kernel/mm/redhat_transparent_hugepage" return path @command_set("transparent_hugepages") def _set_transparent_hugepages(self, value, sim, remove): if value not in ["always", "never", "madvise"]: if not sim: log.warn("Incorrect 'transparent_hugepages' value '%s'." % str(value)) return None cmdline = cmd.read_file("/proc/cmdline", no_error = True) if cmdline.find("transparent_hugepage=") > 0: if not sim: log.info("transparent_hugepage is already set in kernel boot cmdline, ignoring value from profile") return None sys_file = os.path.join(self._thp_path(), "enabled") if os.path.exists(sys_file): if not sim: cmd.write_to_file(sys_file, value, \ no_error = [errno.ENOENT] if remove else False) return value else: if not sim: log.warn("Option 'transparent_hugepages' is not supported on current hardware.") return None # just an alias to transparent_hugepages @command_set("transparent_hugepage") def _set_transparent_hugepage(self, value, sim, remove): self._set_transparent_hugepages(value, sim, remove) @command_get("transparent_hugepages") def _get_transparent_hugepages(self): sys_file = os.path.join(self._thp_path(), "enabled") if os.path.exists(sys_file): return cmd.get_active_option(cmd.read_file(sys_file)) else: return None # just an alias to transparent_hugepages @command_get("transparent_hugepage") def _get_transparent_hugepage(self): return self._get_transparent_hugepages() @command_set("transparent_hugepage.defrag") def _set_transparent_hugepage_defrag(self, value, sim, remove): sys_file = os.path.join(self._thp_path(), "defrag") if os.path.exists(sys_file): if not sim: cmd.write_to_file(sys_file, value, \ no_error = [errno.ENOENT] if remove else False) return value else: if not sim: log.warn("Option 'transparent_hugepage.defrag' is not supported on current hardware.") return None @command_get("transparent_hugepage.defrag") def _get_transparent_hugepage_defrag(self): sys_file = os.path.join(self._thp_path(), "defrag") if os.path.exists(sys_file): return cmd.get_active_option(cmd.read_file(sys_file)) else: return None PK$2]l  plugins/plugin_acpi.pynu[from . import base from .decorators import * import os import errno import tuned.logs from tuned.consts import ACPI_DIR log = tuned.logs.get() class ACPIPlugin(base.Plugin): """ `acpi`:: Configures the ACPI driver. + The only currently supported option is [option]`platform_profile`, which sets the ACPI platform profile sysfs attribute, a generic power/performance preference API for other drivers. Multiple profiles can be specified, separated by `|`. The first available profile is selected. + -- .Selecting a platform profile ==== ---- [acpi] platform_profile=balanced|low-power ---- Using this option, *TuneD* will try to set the platform profile to `balanced`. If that fails, it will try to set it to `low-power`. ==== -- """ def __init__(self, *args, **kwargs): super(ACPIPlugin, self).__init__(*args, **kwargs) @classmethod def _get_config_options(cls): return {"platform_profile": None} def _instance_init(self, instance): instance._has_static_tuning = True instance._has_dynamic_tuning = False def _instance_cleanup(self, instance): pass @classmethod def _platform_profile_choices_path(cls): return os.path.join(ACPI_DIR, "platform_profile_choices") @classmethod def _platform_profile_path(cls): return os.path.join(ACPI_DIR, "platform_profile") @command_set("platform_profile") def _set_platform_profile(self, profiles, sim, remove): if not os.path.isfile(self._platform_profile_path()): log.debug("ACPI platform_profile is not supported on this system") return None profiles = [profile.strip() for profile in profiles.split('|')] avail_profiles = set(self._cmd.read_file(self._platform_profile_choices_path()).split()) for profile in profiles: if profile in avail_profiles: if not sim: log.info("Setting platform_profile to '%s'" % profile) self._cmd.write_to_file(self._platform_profile_path(), profile, \ no_error=[errno.ENOENT] if remove else False) return profile log.warn("Requested platform_profile '%s' unavailable" % profile) log.error("Failed to set platform_profile. Is the value in the profile correct?") return None @command_get("platform_profile") def _get_platform_profile(self, ignore_missing=False): if not os.path.isfile(self._platform_profile_path()): log.debug("ACPI platform_profile is not supported on this system") return None return self._cmd.read_file(self._platform_profile_path()).strip() PK$2]xZZplugins/plugin_net.pynu[import errno from . import hotplug from .decorators import * import tuned.logs from tuned.utils.nettool import ethcard from tuned.utils.commands import commands import os import re log = tuned.logs.get() WOL_VALUES = "pumbagsd" class NetTuningPlugin(hotplug.Plugin): """ `net`:: Configures network driver, hardware and Netfilter settings. Dynamic change of the interface speed according to the interface utilization is also supported. The dynamic tuning is controlled by the [option]`dynamic` and the global [option]`dynamic_tuning` option in `tuned-main.conf`. + The [option]`wake_on_lan` option sets wake-on-lan to the specified value as when using the `ethtool` utility. + .Set Wake-on-LAN for device eth0 on MagicPacket(TM) ==== ---- [net] devices=eth0 wake_on_lan=g ---- ==== + The [option]`coalesce` option allows changing coalescing settings for the specified network devices. The syntax is: + [subs="+quotes,+macros"] ---- coalesce=__param1__ __value1__ __param2__ __value2__ ... __paramN__ __valueN__ ---- Note that not all the coalescing parameters are supported by all network cards. For the list of coalescing parameters of your network device, use `ethtool -c device`. + .Setting coalescing parameters rx/tx-usecs for all network devices ==== ---- [net] coalesce=rx-usecs 3 tx-usecs 16 ---- ==== + The [option]`features` option allows changing the offload parameters and other features for the specified network devices. To query the features of your network device, use `ethtool -k device`. The syntax of the option is the same as the [option]`coalesce` option. + .Turn off TX checksumming, generic segmentation and receive offload ==== ---- [net] features=tx off gso off gro off ---- ==== The [option]`pause` option allows changing the pause parameters for the specified network devices. To query the pause parameters of your network device, use `ethtool -a device`. The syntax of the option is the same as the [option]`coalesce` option. + .Disable autonegotiation ==== ---- [net] pause=autoneg off ---- ==== + The [option]`ring` option allows changing the rx/tx ring parameters for the specified network devices. To query the ring parameters of your network device, use `ethtool -g device`. The syntax of the option is the same as the [option]`coalesce` option. + .Change the number of ring entries for the Rx/Tx rings to 1024/512 respectively ===== ----- [net] ring=rx 1024 tx 512 ----- ===== + The [option]`channels` option allows changing the numbers of channels for the specified network device. A channel is an IRQ and the set of queues that can trigger that IRQ. To query the channels parameters of your network device, use `ethtool -l device`. The syntax of the option is the same as the [option]`coalesce` option. + .Set the number of multi-purpose channels to 16 ===== ----- [net] channels=combined 16 ----- ===== + A network device either supports rx/tx or combined queue mode. The [option]`channels` option automatically adjusts the parameters based on the mode supported by the device as long as a valid configuration is requested. + The [option]`nf_conntrack_hashsize` option sets the size of the hash table which stores lists of conntrack entries by writing to `/sys/module/nf_conntrack/parameters/hashsize`. + .Adjust the size of the conntrack hash table ==== ---- [net] nf_conntrack_hashsize=131072 ---- ==== + The [option]`txqueuelen` option allows changing txqueuelen (the length of the transmit queue). It uses `ip` utility that is in package iproute recommended for TuneD, so the package needs to be installed for its correct functionality. To query the txqueuelen parameters of your network device use `ip link show` and the current value is shown after the qlen column. + .Adjust the length of the transmit queue ==== ---- [net] txqueuelen=5000 ---- ==== + The [option]`mtu` option allows changing MTU (Maximum Transmission Unit). It uses `ip` utility that is in package iproute recommended for TuneD, so the package needs to be installed for its correct functionality. To query the MTU parameters of your network device use `ip link show` and the current value is shown after the MTU column. + .Adjust the size of the MTU ==== ---- [net] mtu=9000 ---- ==== """ def __init__(self, *args, **kwargs): super(NetTuningPlugin, self).__init__(*args, **kwargs) self._load_smallest = 0.05 self._level_steps = 6 self._cmd = commands() self._re_ip_link_show = {} self._use_ip = True def _init_devices(self): self._devices_supported = True self._free_devices = set() self._assigned_devices = set() re_not_virtual = re.compile('(?!.*/virtual/.*)') for device in self._hardware_inventory.get_devices("net"): if re_not_virtual.match(device.device_path): self._free_devices.add(device.sys_name) log.debug("devices: %s" % str(self._free_devices)); def _get_device_objects(self, devices): return [self._hardware_inventory.get_device("net", x) for x in devices] def _instance_init(self, instance): instance._has_static_tuning = True if self._option_bool(instance.options["dynamic"]): instance._has_dynamic_tuning = True instance._load_monitor = self._monitors_repository.create("net", instance.assigned_devices) instance._idle = {} instance._stats = {} else: instance._has_dynamic_tuning = False instance._load_monitor = None instance._idle = None instance._stats = None def _instance_cleanup(self, instance): if instance._load_monitor is not None: self._monitors_repository.delete(instance._load_monitor) instance._load_monitor = None def _instance_apply_dynamic(self, instance, device): self._instance_update_dynamic(instance, device) def _instance_update_dynamic(self, instance, device): load = [int(value) for value in instance._load_monitor.get_device_load(device)] if load is None: return if not device in instance._stats: self._init_stats_and_idle(instance, device) self._update_stats(instance, device, load) self._update_idle(instance, device) stats = instance._stats[device] idle = instance._idle[device] if idle["level"] == 0 and idle["read"] >= self._level_steps and idle["write"] >= self._level_steps: idle["level"] = 1 log.info("%s: setting 100Mbps" % device) ethcard(device).set_speed(100) elif idle["level"] == 1 and (idle["read"] == 0 or idle["write"] == 0): idle["level"] = 0 log.info("%s: setting max speed" % device) ethcard(device).set_max_speed() log.debug("%s load: read %0.2f, write %0.2f" % (device, stats["read"], stats["write"])) log.debug("%s idle: read %d, write %d, level %d" % (device, idle["read"], idle["write"], idle["level"])) @classmethod def _get_config_options_coalesce(cls): return { "adaptive-rx": None, "adaptive-tx": None, "rx-usecs": None, "rx-frames": None, "rx-usecs-irq": None, "rx-frames-irq": None, "tx-usecs": None, "tx-frames": None, "tx-usecs-irq": None, "tx-frames-irq": None, "stats-block-usecs": None, "pkt-rate-low": None, "rx-usecs-low": None, "rx-frames-low": None, "tx-usecs-low": None, "tx-frames-low": None, "pkt-rate-high": None, "rx-usecs-high": None, "rx-frames-high": None, "tx-usecs-high": None, "tx-frames-high": None, "sample-interval": None } @classmethod def _get_config_options_pause(cls): return { "autoneg": None, "rx": None, "tx": None } @classmethod def _get_config_options_ring(cls): return { "rx": None, "rx-mini": None, "rx-jumbo": None, "tx": None } @classmethod def _get_config_options_channels(cls): return { "rx": None, "tx": None, "other": None, "combined": None } @classmethod def _get_config_options(cls): return { "dynamic": True, "wake_on_lan": None, "nf_conntrack_hashsize": None, "features": None, "coalesce": None, "pause": None, "ring": None, "channels": None, "txqueuelen": None, "mtu": None, } def _init_stats_and_idle(self, instance, device): max_speed = self._calc_speed(ethcard(device).get_max_speed()) instance._stats[device] = { "new": 4 * [0], "max": 2 * [max_speed, 1] } instance._idle[device] = { "level": 0, "read": 0, "write": 0 } def _update_stats(self, instance, device, new_load): # put new to old instance._stats[device]["old"] = old_load = instance._stats[device]["new"] instance._stats[device]["new"] = new_load # load difference diff = [new_old[0] - new_old[1] for new_old in zip(new_load, old_load)] instance._stats[device]["diff"] = diff # adapt maximum expected load if the difference is higer old_max_load = instance._stats[device]["max"] max_load = [max(pair) for pair in zip(old_max_load, diff)] instance._stats[device]["max"] = max_load # read/write ratio instance._stats[device]["read"] = float(diff[0]) / float(max_load[0]) instance._stats[device]["write"] = float(diff[2]) / float(max_load[2]) def _update_idle(self, instance, device): # increase counter if there is no load, otherwise reset the counter for operation in ["read", "write"]: if instance._stats[device][operation] < self._load_smallest: instance._idle[device][operation] += 1 else: instance._idle[device][operation] = 0 def _instance_unapply_dynamic(self, instance, device): if device in instance._idle and instance._idle[device]["level"] > 0: instance._idle[device]["level"] = 0 log.info("%s: setting max speed" % device) ethcard(device).set_max_speed() def _calc_speed(self, speed): # 0.6 is just a magical constant (empirical value): Typical workload on netcard won't exceed # that and if it does, then the code is smart enough to adapt it. # 1024 * 1024 as for MB -> B # speed / 8 Mb -> MB return (int) (0.6 * 1024 * 1024 * speed / 8) # parse features/coalesce config parameters (those defined in profile configuration) # context is for error message def _parse_config_parameters(self, value, context): # expand config variables value = self._variables.expand(value) # split supporting various dellimeters v = str(re.sub(r"(:\s*)|(\s+)|(\s*;\s*)|(\s*,\s*)", " ", value)).split() lv = len(v) if lv % 2 != 0: log.error("invalid %s parameter: '%s'" % (context, str(value))) return None if lv == 0: return dict() # convert flat list to dict return dict(list(zip(v[::2], v[1::2]))) # parse features/coalesce device parameters (those returned by ethtool) def _parse_device_parameters(self, value): # substitute "Adaptive RX: val1 TX: val2" to 'adaptive-rx: val1' and # 'adaptive-tx: val2' and workaround for ethtool inconsistencies # (rhbz#1225375) value = self._cmd.multiple_re_replace({ "Adaptive RX:": "adaptive-rx:", "\\s+TX:": "\nadaptive-tx:", "rx-frame-low:": "rx-frames-low:", "rx-frame-high:": "rx-frames-high:", "tx-frame-low:": "tx-frames-low:", "tx-frame-high:": "tx-frames-high:", "large-receive-offload:": "lro:", "rx-checksumming:": "rx:", "tx-checksumming:": "tx:", "scatter-gather:": "sg:", "tcp-segmentation-offload:": "tso:", "udp-fragmentation-offload:": "ufo:", "generic-segmentation-offload:": "gso:", "generic-receive-offload:": "gro:", "rx-vlan-offload:": "rxvlan:", "tx-vlan-offload:": "txvlan:", "ntuple-filters:": "ntuple:", "receive-hashing:": "rxhash:", }, value) # remove empty lines, remove fixed parameters (those with "[fixed]") vl = [v for v in value.split('\n') if len(str(v)) > 0 and not re.search(r"\[fixed\]$", str(v))] if len(vl) < 2: return None # skip first line (device name), split to key/value, # remove pairs which are not key/value return dict([u for u in [re.split(r":\s*", str(v)) for v in vl[1:]] if len(u) == 2]) @classmethod def _nf_conntrack_hashsize_path(self): return "/sys/module/nf_conntrack/parameters/hashsize" @command_set("wake_on_lan", per_device=True) def _set_wake_on_lan(self, value, device, sim, remove): if value is None: return None # see man ethtool for possible wol values, 0 added as an alias for 'd' value = re.sub(r"0", "d", str(value)); if not re.match(r"^[" + WOL_VALUES + r"]+$", value): log.warn("Incorrect 'wake_on_lan' value.") return None if not sim: self._cmd.execute(["ethtool", "-s", device, "wol", value]) return value @command_get("wake_on_lan") def _get_wake_on_lan(self, device, ignore_missing=False): value = None try: m = re.match(r".*Wake-on:\s*([" + WOL_VALUES + "]+).*", self._cmd.execute(["ethtool", device])[1], re.S) if m: value = m.group(1) except IOError: pass return value @command_set("nf_conntrack_hashsize") def _set_nf_conntrack_hashsize(self, value, sim, remove): if value is None: return None hashsize = int(value) if hashsize >= 0: if not sim: self._cmd.write_to_file(self._nf_conntrack_hashsize_path(), hashsize, \ no_error = [errno.ENOENT] if remove else False) return hashsize else: return None @command_get("nf_conntrack_hashsize") def _get_nf_conntrack_hashsize(self): value = self._cmd.read_file(self._nf_conntrack_hashsize_path()) if len(value) > 0: return int(value) return None def _call_ip_link(self, args=[]): if not self._use_ip: return None args = ["ip", "link"] + args (rc, out, err_msg) = self._cmd.execute(args, no_errors=[errno.ENOENT], return_err=True) if rc == -errno.ENOENT: log.warn("ip command not found, ignoring for other devices") self._use_ip = False return None elif rc: log.info("Problem calling ip command") log.debug("(rc: %s, msg: '%s')" % (rc, err_msg)) return None return out def _ip_link_show(self, device=None): args = ["show"] if device: args.append(device) return self._call_ip_link(args) @command_set("txqueuelen", per_device=True) def _set_txqueuelen(self, value, device, sim, remove): if value is None: return None try: int(value) except ValueError: log.warn("txqueuelen value '%s' is not integer" % value) return None if not sim: # there is inconsistency in "ip", where "txqueuelen" is set as it, but is shown as "qlen" res = self._call_ip_link(["set", "dev", device, "txqueuelen", value]) if res is None: log.warn("Cannot set txqueuelen for device '%s'" % device) return None return value def _get_re_ip_link_show(self, arg): """ Return regex for int arg value from "ip link show" command """ if arg not in self._re_ip_link_show: self._re_ip_link_show[arg] = re.compile(r".*\s+%s\s+(\d+)" % arg) return self._re_ip_link_show[arg] @command_get("txqueuelen") def _get_txqueuelen(self, device, ignore_missing=False): out = self._ip_link_show(device) if out is None: if not ignore_missing: log.info("Cannot get 'ip link show' result for txqueuelen value for device '%s'" % device) return None res = self._get_re_ip_link_show("qlen").search(out) if res is None: # We can theoretically get device without qlen (http://linux-ip.net/gl/ip-cref/ip-cref-node17.html) if not ignore_missing: log.info("Cannot get txqueuelen value from 'ip link show' result for device '%s'" % device) return None return res.group(1) @command_set("mtu", per_device=True) def _set_mtu(self, value, device, sim, remove): if value is None: return None try: int(value) except ValueError: log.warn("mtu value '%s' is not integer" % value) return None if not sim: res = self._call_ip_link(["set", "dev", device, "mtu", value]) if res is None: log.warn("Cannot set mtu for device '%s'" % device) return None return value @command_get("mtu") def _get_mtu(self, device, ignore_missing=False): out = self._ip_link_show(device) if out is None: if not ignore_missing: log.info("Cannot get 'ip link show' result for mtu value for device '%s'" % device) return None res = self._get_re_ip_link_show("mtu").search(out) if res is None: # mtu value should be always present, but it's better to have a test if not ignore_missing: log.info("Cannot get mtu value from 'ip link show' result for device '%s'" % device) return None return res.group(1) # d is dict: {parameter: value} def _check_parameters(self, context, d): if context == "features": return True params = set(d.keys()) supported_getter = { "coalesce": self._get_config_options_coalesce, \ "pause": self._get_config_options_pause, \ "ring": self._get_config_options_ring, \ "channels": self._get_config_options_channels } supported = set(supported_getter[context]().keys()) if not params.issubset(supported): log.error("unknown %s parameter(s): %s" % (context, str(params - supported))) return False return True # parse output of ethtool -a def _parse_pause_parameters(self, s): s = self._cmd.multiple_re_replace(\ {"Autonegotiate": "autoneg", "RX": "rx", "TX": "tx"}, s) l = s.split("\n")[1:] l = [x for x in l if x != '' and not re.search(r"\[fixed\]", x)] return dict([x for x in [re.split(r":\s*", x) for x in l] if len(x) == 2]) # parse output of ethtool -g def _parse_ring_parameters(self, s): a = re.split(r"^Current hardware settings:$", s, flags=re.MULTILINE) s = a[1] s = self._cmd.multiple_re_replace(\ {"RX": "rx", "RX Mini": "rx-mini", "RX Jumbo": "rx-jumbo", "TX": "tx"}, s) l = s.split("\n") l = [x for x in l if x != ''] l = [x for x in [re.split(r":\s*", x) for x in l] if len(x) == 2] return dict(l) # parse output of ethtool -l def _parse_channels_parameters(self, s): a = re.split(r"^Current hardware settings:$", s, flags=re.MULTILINE) s = a[1] s = self._cmd.multiple_re_replace(\ {"RX": "rx", "TX": "tx", "Other": "other", "Combined": "combined"}, s) l = s.split("\n") l = [x for x in l if x != ''] l = [x for x in [re.split(r":\s*", x) for x in l] if len(x) == 2] return dict(l) def _replace_channels_parameters(self, context, params_list, dev_params): mod_params_list = [] if "combined" in params_list: mod_params_list.extend(["rx", params_list[1], "tx", params_list[1]]) else: cnt = str(max(int(params_list[1]), int(params_list[3]))) mod_params_list.extend(["combined", cnt]) return dict(list(zip(mod_params_list[::2], mod_params_list[1::2]))) def _check_device_support(self, context, parameters, device, dev_params): """Filter unsupported parameters and log warnings about it Positional parameters: context -- context of change parameters -- parameters to change device -- name of device on which should be parameters set dev_params -- dictionary of currently known parameters of device """ supported_parameters = set(dev_params.keys()) parameters_to_change = set(parameters.keys()) # if parameters_to_change contains unsupported parameter(s) then remove # it/them unsupported_parameters = (parameters_to_change - supported_parameters) for param in unsupported_parameters: log.warning("%s parameter %s is not supported by device %s" % ( context, param, device, )) parameters.pop(param, None) def _get_device_parameters(self, context, device): context2opt = { "coalesce": "-c", "features": "-k", "pause": "-a", "ring": "-g", \ "channels": "-l"} opt = context2opt[context] ret, value = self._cmd.execute(["ethtool", opt, device]) if ret != 0 or len(value) == 0: return None context2parser = { "coalesce": self._parse_device_parameters, \ "features": self._parse_device_parameters, \ "pause": self._parse_pause_parameters, \ "ring": self._parse_ring_parameters, \ "channels": self._parse_channels_parameters } parser = context2parser[context] d = parser(value) if context == "coalesce" and not self._check_parameters(context, d): return None return d def _set_device_parameters(self, context, value, device, sim, dev_params = None): if value is None or len(value) == 0: return None d = self._parse_config_parameters(value, context) if d is None or not self._check_parameters(context, d): return {} # check if device supports parameters and filter out unsupported ones if dev_params: self._check_device_support(context, d, device, dev_params) # replace the channel parameters based on the device support if context == "channels" and str(dev_params[next(iter(d))]) in ["n/a", "0"]: d = self._replace_channels_parameters(context, self._cmd.dict2list(d), dev_params) if not sim and len(d) != 0: log.debug("setting %s: %s" % (context, str(d))) context2opt = { "coalesce": "-C", "features": "-K", "pause": "-A", "ring": "-G", \ "channels": "-L"} opt = context2opt[context] # ignore ethtool return code 80, it means parameter is already set self._cmd.execute(["ethtool", opt, device] + self._cmd.dict2list(d), no_errors = [80]) return d def _custom_parameters(self, context, start, value, device, verify): storage_key = self._storage_key( command_name = context, device_name = device) if start: params_current = self._get_device_parameters(context, device) if params_current is None or len(params_current) == 0: return False params_set = self._set_device_parameters(context, value, device, verify, dev_params = params_current) # if none of parameters passed checks then the command completely # failed if params_set is None or len(params_set) == 0: return False relevant_params_current = [(param, value) for param, value in params_current.items() if param in params_set] relevant_params_current = dict(relevant_params_current) if verify: res = (self._cmd.dict2list(params_set) == self._cmd.dict2list(relevant_params_current)) self._log_verification_result(context, res, params_set, relevant_params_current, device = device) return res # saved are only those parameters which passed checks self._storage.set(storage_key, " ".join( self._cmd.dict2list(relevant_params_current))) else: original_value = self._storage.get(storage_key) # in storage are only those parameters which were already tested # so skip check for supported parameters self._set_device_parameters(context, original_value, device, False) return None @command_custom("features", per_device = True) def _features(self, start, value, device, verify, ignore_missing): return self._custom_parameters("features", start, value, device, verify) @command_custom("coalesce", per_device = True) def _coalesce(self, start, value, device, verify, ignore_missing): return self._custom_parameters("coalesce", start, value, device, verify) @command_custom("pause", per_device = True) def _pause(self, start, value, device, verify, ignore_missing): return self._custom_parameters("pause", start, value, device, verify) @command_custom("ring", per_device = True) def _ring(self, start, value, device, verify, ignore_missing): return self._custom_parameters("ring", start, value, device, verify) @command_custom("channels", per_device = True) def _channels(self, start, value, device, verify, ignore_missing): return self._custom_parameters("channels", start, value, device, verify) PK$2]4@44plugins/plugin_systemd.pynu[from . import base from .decorators import * import tuned.logs from . import exceptions from tuned.utils.commands import commands import tuned.consts as consts import os import re log = tuned.logs.get() class SystemdPlugin(base.Plugin): """ `systemd`:: Plug-in for tuning systemd options. + The [option]`cpu_affinity` option allows setting CPUAffinity in `/etc/systemd/system.conf`. This configures the CPU affinity for the service manager as well as the default CPU affinity for all forked off processes. The option takes a comma-separated list of CPUs with optional CPU ranges specified by the minus sign (`-`). + .Set the CPUAffinity for `systemd` to `0 1 2 3` ==== ---- [systemd] cpu_affinity=0-3 ---- ==== + NOTE: These tunings are unloaded only on profile change followed by a reboot. """ def __init__(self, *args, **kwargs): if not os.path.isfile(consts.SYSTEMD_SYSTEM_CONF_FILE): raise exceptions.NotSupportedPluginException("Required systemd '%s' configuration file not found, disabling plugin." % consts.SYSTEMD_SYSTEM_CONF_FILE) super(SystemdPlugin, self).__init__(*args, **kwargs) self._cmd = commands() def _instance_init(self, instance): instance._has_dynamic_tuning = False instance._has_static_tuning = True def _instance_cleanup(self, instance): pass @classmethod def _get_config_options(cls): return { "cpu_affinity": None, } def _get_keyval(self, conf, key): if conf is not None: mo = re.search(r"^\s*" + key + r"\s*=\s*(.*)$", conf, flags = re.MULTILINE) if mo is not None and mo.lastindex == 1: return mo.group(1) return None # add/replace key with the value def _add_keyval(self, conf, key, val): (conf_new, nsubs) = re.subn(r"^(\s*" + key + r"\s*=).*$", r"\g<1>" + str(val), conf, flags = re.MULTILINE) if nsubs < 1: try: if conf[-1] != "\n": conf += "\n" except IndexError: pass conf += key + "=" + str(val) + "\n" return conf return conf_new def _del_key(self, conf, key): return re.sub(r"^\s*" + key + r"\s*=.*\n", "", conf, flags = re.MULTILINE) def _read_systemd_system_conf(self): systemd_system_conf = self._cmd.read_file(consts.SYSTEMD_SYSTEM_CONF_FILE, err_ret = None) if systemd_system_conf is None: log.error("error reading systemd configuration file") return None return systemd_system_conf def _write_systemd_system_conf(self, conf): tmpfile = consts.SYSTEMD_SYSTEM_CONF_FILE + consts.TMP_FILE_SUFFIX if not self._cmd.write_to_file(tmpfile, conf): log.error("error writing systemd configuration file") self._cmd.unlink(tmpfile, no_error = True) return False # Atomic replace, this doesn't work on Windows (AFAIK there is no way on Windows how to do this # atomically), but it's unlikely this code will run there if not self._cmd.rename(tmpfile, consts.SYSTEMD_SYSTEM_CONF_FILE): log.error("error replacing systemd configuration file '%s'" % consts.SYSTEMD_SYSTEM_CONF_FILE) self._cmd.unlink(tmpfile, no_error = True) return False return True def _get_storage_filename(self): return os.path.join(consts.PERSISTENT_STORAGE_DIR, self.name) def _remove_systemd_tuning(self): conf = self._read_systemd_system_conf() if (conf is not None): fname = self._get_storage_filename() cpu_affinity_saved = self._cmd.read_file(fname, err_ret = None, no_error = True) self._cmd.unlink(fname) if cpu_affinity_saved is None: conf = self._del_key(conf, consts.SYSTEMD_CPUAFFINITY_VAR) else: conf = self._add_keyval(conf, consts.SYSTEMD_CPUAFFINITY_VAR, cpu_affinity_saved) self._write_systemd_system_conf(conf) def _instance_unapply_static(self, instance, rollback = consts.ROLLBACK_SOFT): if rollback == consts.ROLLBACK_FULL: log.info("removing '%s' systemd tuning previously added by TuneD" % consts.SYSTEMD_CPUAFFINITY_VAR) self._remove_systemd_tuning() log.console("you may need to manualy run 'dracut -f' to update the systemd configuration in initrd image") # convert cpulist from systemd syntax to TuneD syntax and unpack it def _cpulist_convert_unpack(self, cpulist): if cpulist is None: return "" return " ".join(str(v) for v in self._cmd.cpulist_unpack(re.sub(r"\s+", r",", re.sub(r",\s+", r",", cpulist)))) @command_custom("cpu_affinity", per_device = False) def _cmdline(self, enabling, value, verify, ignore_missing): conf_affinity = None conf_affinity_unpacked = None v = self._cmd.unescape(self._variables.expand(self._cmd.unquote(value))) v_unpacked = " ".join(str(v) for v in self._cmd.cpulist_unpack(v)) conf = self._read_systemd_system_conf() if conf is not None: conf_affinity = self._get_keyval(conf, consts.SYSTEMD_CPUAFFINITY_VAR) conf_affinity_unpacked = self._cpulist_convert_unpack(conf_affinity) if verify: return self._verify_value("cpu_affinity", v_unpacked, conf_affinity_unpacked, ignore_missing) if enabling: fname = self._get_storage_filename() cpu_affinity_saved = self._cmd.read_file(fname, err_ret = None, no_error = True) if conf_affinity is not None and cpu_affinity_saved is None and v_unpacked != conf_affinity_unpacked: self._cmd.write_to_file(fname, conf_affinity, makedir = True) log.info("setting '%s' to '%s' in the '%s'" % (consts.SYSTEMD_CPUAFFINITY_VAR, v_unpacked, consts.SYSTEMD_SYSTEM_CONF_FILE)) self._write_systemd_system_conf(self._add_keyval(conf, consts.SYSTEMD_CPUAFFINITY_VAR, v_unpacked)) PK$2]W+WWplugins/base.pynu[import re import tuned.consts as consts import tuned.profiles.variables import tuned.logs import collections from tuned.utils.commands import commands import os from subprocess import Popen, PIPE log = tuned.logs.get() class Plugin(object): """ Base class for all plugins. Plugins change various system settings in order to get desired performance or power saving. Plugins use Monitor objects to get information from the running system. Intentionally a lot of logic is included in the plugin to increase plugin flexibility. """ def __init__(self, monitors_repository, storage_factory, hardware_inventory, device_matcher, device_matcher_udev, instance_factory, global_cfg, variables): """Plugin constructor.""" self._storage = storage_factory.create(self.__class__.__name__) self._monitors_repository = monitors_repository self._hardware_inventory = hardware_inventory self._device_matcher = device_matcher self._device_matcher_udev = device_matcher_udev self._instance_factory = instance_factory self._instances = collections.OrderedDict() self._init_commands() self._global_cfg = global_cfg self._variables = variables self._has_dynamic_options = False self._devices_inited = False self._options_used_by_dynamic = self._get_config_options_used_by_dynamic() self._cmd = commands() def cleanup(self): self.destroy_instances() def init_devices(self): if not self._devices_inited: self._init_devices() self._devices_inited = True @property def name(self): return self.__class__.__module__.split(".")[-1].split("_", 1)[1] # # Plugin configuration manipulation and helpers. # @classmethod def _get_config_options(self): """Default configuration options for the plugin.""" return {} @classmethod def get_config_options_hints(cls): """Explanation of each config option function""" return {} @classmethod def _get_config_options_used_by_dynamic(self): """List of config options used by dynamic tuning. Their previous values will be automatically saved and restored.""" return [] def _get_effective_options(self, options): """Merge provided options with plugin default options.""" # TODO: _has_dynamic_options is a hack effective = self._get_config_options().copy() for key in options: if key in effective or self._has_dynamic_options: effective[key] = options[key] else: log.warn("Unknown option '%s' for plugin '%s'." % (key, self.__class__.__name__)) return effective def _option_bool(self, value): if type(value) is bool: return value value = str(value).lower() return value == "true" or value == "1" # # Interface for manipulation with instances of the plugin. # def create_instance(self, name, devices_expression, devices_udev_regex, script_pre, script_post, options): """Create new instance of the plugin and seize the devices.""" if name in self._instances: raise Exception("Plugin instance with name '%s' already exists." % name) effective_options = self._get_effective_options(options) instance = self._instance_factory.create(self, name, devices_expression, devices_udev_regex, \ script_pre, script_post, effective_options) self._instances[name] = instance return instance def destroy_instance(self, instance): """Destroy existing instance.""" if instance._plugin != self: raise Exception("Plugin instance '%s' does not belong to this plugin '%s'." % (instance, self)) if instance.name not in self._instances: raise Exception("Plugin instance '%s' was already destroyed." % instance) instance = self._instances[instance.name] self._destroy_instance(instance) del self._instances[instance.name] def initialize_instance(self, instance): """Initialize an instance.""" log.debug("initializing instance %s (%s)" % (instance.name, self.name)) self._instance_init(instance) def destroy_instances(self): """Destroy all instances.""" for instance in list(self._instances.values()): log.debug("destroying instance %s (%s)" % (instance.name, self.name)) self._destroy_instance(instance) self._instances.clear() def _destroy_instance(self, instance): self.release_devices(instance) self._instance_cleanup(instance) def _instance_init(self, instance): raise NotImplementedError() def _instance_cleanup(self, instance): raise NotImplementedError() # # Devices handling # def _init_devices(self): self._devices_supported = False self._assigned_devices = set() self._free_devices = set() def _get_device_objects(self, devices): """Override this in a subclass to transform a list of device names (e.g. ['sda']) to a list of pyudev.Device objects, if your plugin supports it""" return None def _get_matching_devices(self, instance, devices): if instance.devices_udev_regex is None: return set(self._device_matcher.match_list(instance.devices_expression, devices)) else: udev_devices = self._get_device_objects(devices) if udev_devices is None: log.error("Plugin '%s' does not support the 'devices_udev_regex' option", self.name) return set() udev_devices = self._device_matcher_udev.match_list(instance.devices_udev_regex, udev_devices) return set([x.sys_name for x in udev_devices]) def assign_free_devices(self, instance): if not self._devices_supported: return log.debug("assigning devices to instance %s" % instance.name) to_assign = self._get_matching_devices(instance, self._free_devices) instance.active = len(to_assign) > 0 if not instance.active: log.warn("instance %s: no matching devices available" % instance.name) else: name = instance.name if instance.name != self.name: name += " (%s)" % self.name log.info("instance %s: assigning devices %s" % (name, ", ".join(to_assign))) instance.assigned_devices.update(to_assign) # cannot use |= self._assigned_devices |= to_assign self._free_devices -= to_assign def release_devices(self, instance): if not self._devices_supported: return to_release = (instance.processed_devices \ | instance.assigned_devices) \ & self._assigned_devices instance.active = False instance.processed_devices.clear() instance.assigned_devices.clear() self._assigned_devices -= to_release self._free_devices |= to_release # # Tuning activation and deactivation. # def _run_for_each_device(self, instance, callback, devices): if not self._devices_supported: devices = [None, ] for device in devices: callback(instance, device) def _instance_pre_static(self, instance, enabling): pass def _instance_post_static(self, instance, enabling): pass def _call_device_script(self, instance, script, op, devices, rollback = consts.ROLLBACK_SOFT): if script is None: return None if len(devices) == 0: log.warn("Instance '%s': no device to call script '%s' for." % (instance.name, script)) return None if not script.startswith("/"): log.error("Relative paths cannot be used in script_pre or script_post. " \ + "Use ${i:PROFILE_DIR}.") return False dir_name = os.path.dirname(script) ret = True for dev in devices: environ = os.environ environ.update(self._variables.get_env()) arguments = [op] if rollback == consts.ROLLBACK_FULL: arguments.append("full_rollback") arguments.append(dev) log.info("calling script '%s' with arguments '%s'" % (script, str(arguments))) log.debug("using environment '%s'" % str(list(environ.items()))) try: proc = Popen([script] + arguments, \ stdout=PIPE, stderr=PIPE, \ close_fds=True, env=environ, \ cwd = dir_name, universal_newlines = True) out, err = proc.communicate() if proc.returncode: log.error("script '%s' error: %d, '%s'" % (script, proc.returncode, err[:-1])) ret = False except (OSError,IOError) as e: log.error("script '%s' error: %s" % (script, e)) ret = False return ret def instance_apply_tuning(self, instance): """ Apply static and dynamic tuning if the plugin instance is active. """ if not instance.active: return if instance.has_static_tuning: self._call_device_script(instance, instance.script_pre, "apply", instance.assigned_devices) self._instance_pre_static(instance, True) self._instance_apply_static(instance) self._instance_post_static(instance, True) self._call_device_script(instance, instance.script_post, "apply", instance.assigned_devices) if instance.has_dynamic_tuning and self._global_cfg.get(consts.CFG_DYNAMIC_TUNING, consts.CFG_DEF_DYNAMIC_TUNING): self._run_for_each_device(instance, self._instance_apply_dynamic, instance.assigned_devices) instance.processed_devices.update(instance.assigned_devices) instance.assigned_devices.clear() def instance_verify_tuning(self, instance, ignore_missing): """ Verify static tuning if the plugin instance is active. """ if not instance.active: return None if len(instance.assigned_devices) != 0: log.error("BUG: Some devices have not been tuned: %s" % ", ".join(instance.assigned_devices)) devices = instance.processed_devices.copy() if instance.has_static_tuning: if self._call_device_script(instance, instance.script_pre, "verify", devices) == False: return False if self._instance_verify_static(instance, ignore_missing, devices) == False: return False if self._call_device_script(instance, instance.script_post, "verify", devices) == False: return False return True else: return None def instance_update_tuning(self, instance): """ Apply dynamic tuning if the plugin instance is active. """ if not instance.active: return if instance.has_dynamic_tuning and self._global_cfg.get(consts.CFG_DYNAMIC_TUNING, consts.CFG_DEF_DYNAMIC_TUNING): self._run_for_each_device(instance, self._instance_update_dynamic, instance.processed_devices.copy()) def instance_unapply_tuning(self, instance, rollback = consts.ROLLBACK_SOFT): """ Remove all tunings applied by the plugin instance. """ if rollback == consts.ROLLBACK_NONE: return if instance.has_dynamic_tuning and self._global_cfg.get(consts.CFG_DYNAMIC_TUNING, consts.CFG_DEF_DYNAMIC_TUNING): self._run_for_each_device(instance, self._instance_unapply_dynamic, instance.processed_devices) if instance.has_static_tuning: self._call_device_script(instance, instance.script_post, "unapply", instance.processed_devices, rollback = rollback) self._instance_pre_static(instance, False) self._instance_unapply_static(instance, rollback) self._instance_post_static(instance, False) self._call_device_script(instance, instance.script_pre, "unapply", instance.processed_devices, rollback = rollback) def _instance_apply_static(self, instance): self._execute_all_non_device_commands(instance) self._execute_all_device_commands(instance, instance.assigned_devices) def _instance_verify_static(self, instance, ignore_missing, devices): ret = True if self._verify_all_non_device_commands(instance, ignore_missing) == False: ret = False if self._verify_all_device_commands(instance, devices, ignore_missing) == False: ret = False return ret def _instance_unapply_static(self, instance, rollback = consts.ROLLBACK_SOFT): self._cleanup_all_device_commands(instance, instance.processed_devices) self._cleanup_all_non_device_commands(instance) def _instance_apply_dynamic(self, instance, device): for option in [opt for opt in self._options_used_by_dynamic if self._storage_get(instance, self._commands[opt], device) is None]: self._check_and_save_value(instance, self._commands[option], device) self._instance_update_dynamic(instance, device) def _instance_unapply_dynamic(self, instance, device): raise NotImplementedError() def _instance_update_dynamic(self, instance, device): raise NotImplementedError() # # Registration of commands for static plugins. # def _init_commands(self): """ Initialize commands. """ self._commands = collections.OrderedDict() self._autoregister_commands() self._check_commands() def _autoregister_commands(self): """ Register all commands marked using @command_set, @command_get, and @command_custom decorators. """ for member_name in self.__class__.__dict__: if member_name.startswith("__"): continue member = getattr(self, member_name) if not hasattr(member, "_command"): continue command_name = member._command["name"] info = self._commands.get(command_name, {"name": command_name}) if "set" in member._command: info["custom"] = None info["set"] = member info["per_device"] = member._command["per_device"] info["priority"] = member._command["priority"] elif "get" in member._command: info["get"] = member elif "custom" in member._command: info["custom"] = member info["per_device"] = member._command["per_device"] info["priority"] = member._command["priority"] self._commands[command_name] = info # sort commands by priority self._commands = collections.OrderedDict(sorted(iter(self._commands.items()), key=lambda name_info: name_info[1]["priority"])) def _check_commands(self): """ Check if all commands are defined correctly. """ for command_name, command in list(self._commands.items()): # do not check custom commands if command.get("custom", False): continue # automatic commands should have 'get' and 'set' functions if "get" not in command or "set" not in command: raise TypeError("Plugin command '%s' is not defined correctly" % command_name) # # Operations with persistent storage for status data. # def _storage_key(self, instance_name = None, command_name = None, device_name = None): class_name = type(self).__name__ instance_name = "" if instance_name is None else instance_name command_name = "" if command_name is None else command_name device_name = "" if device_name is None else device_name return "%s/%s/%s/%s" % (class_name, instance_name, command_name, device_name) def _storage_set(self, instance, command, value, device_name=None): key = self._storage_key(instance.name, command["name"], device_name) self._storage.set(key, value) def _storage_get(self, instance, command, device_name=None): key = self._storage_key(instance.name, command["name"], device_name) return self._storage.get(key) def _storage_unset(self, instance, command, device_name=None): key = self._storage_key(instance.name, command["name"], device_name) return self._storage.unset(key) # # Command execution, verification, and cleanup. # def _execute_all_non_device_commands(self, instance): for command in [command for command in list(self._commands.values()) if not command["per_device"]]: new_value = self._variables.expand(instance.options.get(command["name"], None)) if new_value is not None: self._execute_non_device_command(instance, command, new_value) def _execute_all_device_commands(self, instance, devices): for command in [command for command in list(self._commands.values()) if command["per_device"]]: new_value = self._variables.expand(instance.options.get(command["name"], None)) if new_value is None: continue for device in devices: self._execute_device_command(instance, command, device, new_value) def _verify_all_non_device_commands(self, instance, ignore_missing): ret = True for command in [command for command in list(self._commands.values()) if not command["per_device"]]: new_value = self._variables.expand(instance.options.get(command["name"], None)) if new_value is not None: if self._verify_non_device_command(instance, command, new_value, ignore_missing) == False: ret = False return ret def _verify_all_device_commands(self, instance, devices, ignore_missing): ret = True for command in [command for command in list(self._commands.values()) if command["per_device"]]: new_value = instance.options.get(command["name"], None) if new_value is None: continue for device in devices: if self._verify_device_command(instance, command, device, new_value, ignore_missing) == False: ret = False return ret def _process_assignment_modifiers(self, new_value, current_value): if new_value is not None: nws = str(new_value) if len(nws) <= 1: return new_value op = nws[:1] val = nws[1:] if current_value is None: return val if op in ["<", ">"] else new_value try: if op == ">": if int(val) > int(current_value): return val else: return None elif op == "<": if int(val) < int(current_value): return val else: return None except ValueError: log.warn("cannot compare new value '%s' with current value '%s' by operator '%s', using '%s' directly as new value" % (val, current_value, op, new_value)) return new_value def _get_current_value(self, command, device = None, ignore_missing=False): if device is not None: return command["get"](device, ignore_missing=ignore_missing) else: return command["get"]() def _check_and_save_value(self, instance, command, device = None, new_value = None): current_value = self._get_current_value(command, device) new_value = self._process_assignment_modifiers(new_value, current_value) if new_value is not None and current_value is not None: self._storage_set(instance, command, current_value, device) return new_value def _execute_device_command(self, instance, command, device, new_value): if command["custom"] is not None: command["custom"](True, new_value, device, False, False) else: new_value = self._check_and_save_value(instance, command, device, new_value) if new_value is not None: command["set"](new_value, device, sim = False, remove = False) def _execute_non_device_command(self, instance, command, new_value): if command["custom"] is not None: command["custom"](True, new_value, False, False) else: new_value = self._check_and_save_value(instance, command, None, new_value) if new_value is not None: command["set"](new_value, sim = False, remove = False) def _norm_value(self, value): v = self._cmd.unquote(str(value)) if re.match(r'\s*(0+,?)+([\da-fA-F]*,?)*\s*$', v): return re.sub(r'^\s*(0+,?)+', "", v) return v def _verify_value(self, name, new_value, current_value, ignore_missing, device = None): if new_value is None: return None ret = False if current_value is None and ignore_missing: if device is None: log.info(consts.STR_VERIFY_PROFILE_VALUE_MISSING % name) else: log.info(consts.STR_VERIFY_PROFILE_DEVICE_VALUE_MISSING % (device, name)) return True if current_value is not None: current_value = self._norm_value(current_value) new_value = self._norm_value(new_value) try: ret = int(new_value) == int(current_value) except ValueError: try: ret = int(new_value, 16) == int(current_value, 16) except ValueError: ret = str(new_value) == str(current_value) if not ret: vals = str(new_value).split('|') for val in vals: val = val.strip() ret = val == current_value if ret: break self._log_verification_result(name, ret, new_value, current_value, device = device) return ret def _log_verification_result(self, name, success, new_value, current_value, device = None): if success: if device is None: log.info(consts.STR_VERIFY_PROFILE_VALUE_OK % (name, str(current_value).strip())) else: log.info(consts.STR_VERIFY_PROFILE_DEVICE_VALUE_OK % (device, name, str(current_value).strip())) return True else: if device is None: log.error(consts.STR_VERIFY_PROFILE_VALUE_FAIL % (name, str(current_value).strip(), str(new_value).strip())) else: log.error(consts.STR_VERIFY_PROFILE_DEVICE_VALUE_FAIL % (device, name, str(current_value).strip(), str(new_value).strip())) return False def _verify_device_command(self, instance, command, device, new_value, ignore_missing): if command["custom"] is not None: return command["custom"](True, new_value, device, True, ignore_missing) current_value = self._get_current_value(command, device, ignore_missing=ignore_missing) new_value = self._process_assignment_modifiers(new_value, current_value) if new_value is None: return None new_value = command["set"](new_value, device, True, False) return self._verify_value(command["name"], new_value, current_value, ignore_missing, device) def _verify_non_device_command(self, instance, command, new_value, ignore_missing): if command["custom"] is not None: return command["custom"](True, new_value, True, ignore_missing) current_value = self._get_current_value(command) new_value = self._process_assignment_modifiers(new_value, current_value) if new_value is None: return None new_value = command["set"](new_value, True, False) return self._verify_value(command["name"], new_value, current_value, ignore_missing) def _cleanup_all_non_device_commands(self, instance): for command in reversed([command for command in list(self._commands.values()) if not command["per_device"]]): if (instance.options.get(command["name"], None) is not None) or (command["name"] in self._options_used_by_dynamic): self._cleanup_non_device_command(instance, command) def _cleanup_all_device_commands(self, instance, devices, remove = False): for command in reversed([command for command in list(self._commands.values()) if command["per_device"]]): if (instance.options.get(command["name"], None) is not None) or (command["name"] in self._options_used_by_dynamic): for device in devices: self._cleanup_device_command(instance, command, device, remove) def _cleanup_device_command(self, instance, command, device, remove = False): if command["custom"] is not None: command["custom"](False, None, device, False, False) else: old_value = self._storage_get(instance, command, device) if old_value is not None: command["set"](old_value, device, sim = False, remove = remove) self._storage_unset(instance, command, device) def _cleanup_non_device_command(self, instance, command): if command["custom"] is not None: command["custom"](False, None, False, False) else: old_value = self._storage_get(instance, command) if old_value is not None: command["set"](old_value, sim = False, remove = False) self._storage_unset(instance, command) PK$2]SśAA.plugins/__pycache__/plugin_disk.cpython-36.pycnu[3 jB@sjddlZddlmZddlTddlZddljZddlm Z ddl Z ddl Z ej j ZGdddejZdS)N)hotplug)*)commandscseZdZdZfddZfddZddZdd Zed d Z d d Z ddZ fddZ fddZ fddZeddZeddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zfd,d-Zd.d/ZdZd1d2Zd3d4Zed5d6d7d8d9Ze d5d[d;d<Z!ed=d6d7d>d?Z"e d=d\d@dAZ#edBd6d7dCdDZ$e dBd]dEdFZ%dGdHZ&dIdJZ'edKd6d7dLdMZ(e dKd^dNdOZ)e*dPd6d7dQdRZ+dSdTZ,edUd6d7dVdWZ-e dUd_dXdYZ.Z/S)` DiskPlugina `disk`:: Plug-in for tuning various block device options. This plug-in can also dynamically change the advanced power management and spindown timeout setting for a drive according to the current drive utilization. The dynamic tuning is controlled by the [option]`dynamic` and the global [option]`dynamic_tuning` option in `tuned-main.conf`. + The disk plug-in operates on all supported block devices unless a comma separated list of [option]`devices` is passed to it. + .Operate only on the sda block device ==== ---- [disk] # Comma separated list of devices, all devices if commented out. devices=sda ---- ==== + The [option]`elevator` option sets the Linux I/O scheduler. + .Use the bfq I/O scheduler on xvda block device ==== ---- [disk] device=xvda elevator=bfq ---- ==== + The [option]`scheduler_quantum` option only applies to the CFQ I/O scheduler. It defines the number of I/O requests that CFQ sends to one device at one time, essentially limiting queue depth. The default value is 8 requests. The device being used may support greater queue depth, but increasing the value of quantum will also increase latency, especially for large sequential write work loads. + The [option]`apm` option sets the Advanced Power Management feature on drives that support it. It corresponds to using the `-B` option of the `hdparm` utility. The [option]`spindown` option puts the drive into idle (low-power) mode, and also sets the standby (spindown) timeout for the drive. It corresponds to using `-S` option of the `hdparm` utility. + .Use a medium-agressive power management with spindown ==== ---- [disk] apm=128 spindown=6 ---- ==== + The [option]`readahead` option controls how much extra data the operating system reads from disk when performing sequential I/O operations. Increasing the `readahead` value might improve performance in application environments where sequential reading of large files takes place. The default unit for readahead is KiB. This can be adjusted to sectors by specifying the suffix 's'. If the suffix is specified, there must be at least one space between the number and suffix (for example, `readahead=8192 s`). + .Set the `readahead` to 4MB unless already set to a higher value ==== ---- [disk] readahead=>4096 ---- ==== The disk readahead value can be multiplied by the constant specified by the [option]`readahead_multiply` option. c srtt|j||ddddddddd d d d g |_d dddddddddd dg |_t|j|_d|_d|_t |_ dS)N}iUF7rnZ<g{Gz?) superr__init__ _power_levels_spindown_levelslen_levels _level_steps_load_smallestr_cmd)selfargskwargs) __class__!/usr/lib/python3.6/plugin_disk.pyrXs zDiskPlugin.__init__csdtt|jd|_d|_t|_t|_x,|j j dD]}|j |r8|jj |j q8Wt|_dS)NTblock)rr _init_devicesZ_devices_supported _use_hdparmsetZ _free_devicesdict_hdparm_apm_device_support_hardware_inventoryZ get_devices_device_is_supportedaddZsys_nameZ_assigned_devices)r'device)r*r+r,r.bs zDiskPlugin._init_devicescsfdd|DS)Ncsg|]}jjd|qS)r-)r3Z get_device).0x)r'r+r, nsz2DiskPlugin._get_device_objects..r+)r'Zdevicesr+)r'r,_get_device_objectsmszDiskPlugin._get_device_objectscCs|js dS||jkr|j|S|jjddd|gtjgdd\}}}|tj krdtjdd|_dS|rtjd|tj d ||fd|j|<dSd |krtjd |d|j|<dSd|j|<dS) NFhdparmz-Cz/dev/%sT) no_errorsZ return_errz4hdparm command not found, ignoring for other devicesz#Device '%s' not supported by hdparmz(rc: %s, msg: '%s')unknownz3Driver for device '%s' does not support apm command) r/r2r&executeerrnoENOENTlogwarninfodebug)r'r6rcoutZerr_msgr+r+r,_is_hdparm_apm_supportedps*       z#DiskPlugin._is_hdparm_apm_supportedcCs2|jdko0|jjdddko0|jdkp0|jjdkS) NdiskZ removable0scsivirtioxennvme)rJrKrLrM)Z device_typeZ attributesgetparentZ subsystem)clsr6r+r+r,r4s  zDiskPlugin._device_is_supportedcCs|jj|d|jdS)Nr-)r3Z subscribe_hardware_events_callback)r'r+r+r,_hardware_events_initsz DiskPlugin._hardware_events_initcCs|jj|dS)N)r3Z unsubscribe)r'r+r+r,_hardware_events_cleanupsz#DiskPlugin._hardware_events_cleanupcs(|j|s|dkr$tt|j||dS)Nremove)r4rrrQ)r'Zeventr6)r*r+r,rQsz$DiskPlugin._hardware_events_callbackcs,|jdk r|jj|tt|j||dS)N) _load_monitorZ add_devicerr_added_device_apply_tuning)r'instance device_name)r*r+r,rVs  z%DiskPlugin._added_device_apply_tuningcs,|jdk r|jj|tt|j||dS)N)rUZ remove_devicerr_removed_device_unapply_tuning)r'rWrX)r*r+r,rYs  z)DiskPlugin._removed_device_unapply_tuningcCsddddddddS)NT)dynamicelevatorapmspindown readaheadreadahead_multiplyscheduler_quantumr+)rPr+r+r,_get_config_optionsszDiskPlugin._get_config_optionscCsddgS)Nr\r]r+)rPr+r+r,#_get_config_options_used_by_dynamicsz.DiskPlugin._get_config_options_used_by_dynamiccCsdd|_d|_d|_|j|jdrTd|_|jjd|j|_ i|_ i|_ i|_ i|_ n d|_d|_ dS)NTrrZrHF)Z_has_static_tuning _apm_errcnt_spindown_errcntZ _option_boolZoptionsZ_has_dynamic_tuning_monitors_repositoryZcreateZassigned_devicesrUZ _device_idle_stats_idle_spindown_change_delayed)r'rWr+r+r,_instance_inits zDiskPlugin._instance_initcCs"|jdk r|jj|jd|_dS)N)rUredelete)r'rWr+r+r,_instance_cleanups zDiskPlugin._instance_cleanupcCs|rd}|j}n d}|j}|tjkr(dS|dkr6d}nL|tj krbtjd|_|_tjddS|d7}|tjkrtjd||r||_n||_dS)Nr]r\rrzIhdparm command not found, ignoring future set_apm / set_spindown commandsz5disabling set_%s command: too many consecutive errors) rdrcconstsERROR_THRESHOLDr?r@rArBrC)r'rEr]sZcntr+r+r,_update_errcnts&    zDiskPlugin._update_errcntcCsNtjd||jjdd|d|gtjgd\}}|j|dd|j|<dS)Nzchanging spindown to %dr;z-S%dz/dev/%s)r<TF)rArDr&r>r?r@rorh)r'rWr6new_spindown_levelrErFr+r+r,_change_spindowns& zDiskPlugin._change_spindowncCs2|jjddd|gtjgd\}}d|ko0d|kS)Nr;z-Cz/dev/%s)r<ZstandbyZsleeping)r&r>r?r@)r'r6rErFr+r+r,_drive_spinnings"zDiskPlugin._drive_spinningc Cs(|j|sdS|jj|}|dkr&dS||jkr<|j|||j||||j|||j|}|j|}|dd|jkr|d|j kr|d|j krd}n.|ddkr|ddks|ddkrd}nd}|dkr|d|7<|j |d}|j |d}t j d|d|jtjkrb|j| rT|dkrTt j d|d|j|<n|j||||jtjkrt j d ||jjd d |d |gtjgd \} } |j| dn4|j|r|j|r|j |d}|j|||t j d||d|dft j d||d|d|dfdS)Nlevelrreadwriterztuning level changed to %dz;delaying spindown change to %d, drive has already spun downTzchanging APM_level to %dr;z-B%dz/dev/%s)r<Fz %s load: read %0.2f, write %0.2fz$%s idle: read %d, write %d, level %d)rGrUZget_device_loadrf_init_stats_and_idle _update_stats _update_idlergr#r$r r!rArDrdrlrmrrrhrqrcr&r>r?r@ro) r'rWr6loadZstatsZidleZ level_changeZnew_power_levelrprErFr+r+r,_instance_update_dynamicsF       .$  &z#DiskPlugin._instance_update_dynamiccCsDddgddgddgd|j|<dddd|j|<d|j|<dS)N rr)newoldmax)rsrtruF)rfrgrh)r'rWr6r+r+r,rw!s$zDiskPlugin._init_stats_and_idlecCs|j|d|j|d<}||j|d<ddt||D}||j|d<|j|d}ddt||D}||j|d<t|dt|d|j|d <t|d t|d |j|d <dS) Nr}r~cSsg|]}|d|dqS)rrr+)r7Znew_oldr+r+r,r9+sz,DiskPlugin._update_stats..diffrcSsg|] }t|qSr+)r)r7Zpairr+r+r,r90srrtru)rfzipfloat)r'rWr6Znew_loadZold_loadrZ old_max_loadZmax_loadr+r+r,rx&s"zDiskPlugin._update_statscCsLxFdD]>}|j|||jkr6|j||d7<qd|j||<qWdS)Nrtrurr)rtru)rfr%rg)r'rWr6Z operationr+r+r,ry7s zDiskPlugin._update_idlecs0|j|stjd|ntt|j||dS)Nzr?r@ro)r'rr6rrTrErFr+r+r,_set_apmds  ( zDiskPlugin._set_apmc Cs|j|s |stjd|dSd}d}|jjddd|gtjgd\}}|tj krZdS|dkrhd}n@tjd |tj }|ryt |j d }Wnt k rd}YnX|rtj d ||S) Nz+apm option is not supported for device '%s'Fr;z-Bz/dev/)r<rTz .*=\s*(\d+).*rz2could not get current APM settings for device '%s')rGrArCr&r>r?r@rematchSintgroup ValueErrorerror)r'r6rrerrrErFmr+r+r,_get_apmts( "  zDiskPlugin._get_apmr]cCs||j|s(|s tjd|dSt|S|jtjkrt|sl|jjddt|d|gt j gd\}}|j |dt|SdSdS)Nz0spindown option is not supported for device '%s'r;z-Sz/dev/)r<T) rGrArCrrdrlrmr&r>r?r@ro)r'rr6rrTrErFr+r+r, _set_spindowns  ( zDiskPlugin._set_spindowncCs$|j|s |stjd|dSdS)Nz0spindown option is not supported for device '%s')rGrArC)r'r6rr+r+r, _get_spindowns  zDiskPlugin._get_spindowncCs |j|dS)Nzqueue/read_ahead_kb)r)r'r6r+r+r,_readahead_fileszDiskPlugin._readahead_filec Cs^t|jdd}yt|d}Wntk r4dSXt|dkrZ|dddkrZ|d}|S)Nrrrn)rsplitrrr")r'rvalvr+r+r, _parse_raszDiskPlugin._parse_rar^cCsZ|j|}|j|}|dkr0tjd||fn&|sV|jj|d||rNtjgndd|S)Nz,Invalid readahead value '%s' for device '%s'z%dF)r)rrrArr&rr?r@)r'rr6rrTrrr+r+r,_set_readaheads  zDiskPlugin._set_readaheadcCs6|j|}|jj||dj}t|dkr.dSt|S)N)rr)rr&rstripr"r)r'r6rrrr+r+r,_get_readaheads   zDiskPlugin._get_readaheadr_c Cs|rdS|jd|d}|r^|j|}|dkr0dStt||}|jj|||j||dn2|jj|}|dkrvdS|j||d|jj|dS)Nr_)Z command_namerXF) Z _storage_keyrrrZ_storager0rrNZunset) r'ZenablingZ multiplierr6ZverifyrZ storage_keyZ old_readaheadZ new_readaheadr+r+r,_multiply_readaheads"  zDiskPlugin._multiply_readaheadcCs |j|dS)Nzqueue/iosched/quantum)r)r'r6r+r+r,_scheduler_quantum_filesz"DiskPlugin._scheduler_quantum_filer`cCs8|j|}|s4|jj|dt||r,tjgndd|S)Nz%dF)r)rr&rrr?r@)r'rr6rrTrr+r+r,_set_scheduler_quantums  z!DiskPlugin._set_scheduler_quantumcCsH|j|}|jj||dj}t|dkr@|sdisk_scheduler_quantum option is not supported for device '%s')rr&rrr"rArCr)r'r6rrrr+r+r,_get_scheduler_quantums  z!DiskPlugin._get_scheduler_quantum)r)F)F)F)F)F)0__name__ __module__ __qualname____doc__rr.r:rG classmethodr4rRrSrQrVrYrarbrirkrorqrrr{rwrxryrrrrZ command_setrZ command_getrrrrrrrrrZcommand_customrrrr __classcell__r+r+)r*r,r sZJ      2        r)r?rZ decoratorsZ tuned.logsZtunedZ tuned.constsrlZtuned.utils.commandsrrrZlogsrNrAZPluginrr+r+r+r,s    PK$2]6plugins/__pycache__/plugin_mounts.cpython-36.opt-1.pycnu[3 $sz>MountsPlugin._generate_mountpoint_topology..Zdisk1partlvmz[SWAP])disks device_name filesystemr)rr) rrZ communicate splitlineslen setdefaultsetadd_mountpoint_topology) clsZmountpoint_topologyZ current_diskr r columnsZ device_typeZdevice_removablerr mountpointr r r_generate_mountpoint_topologys, z*MountsPlugin._generate_mountpoint_topologycCs*|jd|_t|jj|_t|_dS)NT)r"Z_devices_supportedrrkeysZ _free_devicesZ_assigned_devices)selfr r r _init_devices;szMountsPlugin._init_devicescCsddiS)Ndisable_barriersr )r$r r r_get_config_optionsAsz MountsPlugin._get_config_optionscCsd|_d|_dS)NFT)Z_has_dynamic_tuningZ_has_static_tuning)r$instancer r r_instance_initGszMountsPlugin._instance_initcCsdS)Nr )r$r(r r r_instance_cleanupKszMountsPlugin._instance_cleanupcCs,tjd|}x|D]}tj|jSWdS)zV Get device cache type. This will work only for devices on SCSI kernel subsystem. z+/sys/block/%s/device/scsi_disk/*/cache_typeN)globcmdZ read_filestrip)r$deviceZsource_filenamesZsource_filenamer r r_get_device_cache_typeNs z#MountsPlugin._get_device_cache_typecCs.x(|j|dD]}|j|dkrdSqWdS)zr Checks if the device has 'write back' cache. If the cache type cannot be determined, asume some other cache. rz write backTF)rr/)r$r!r.r r r_mountpoint_has_writeback_cacheWsz,MountsPlugin._mountpoint_has_writeback_cachec CstdH}x@|D]4}|j}|dddkr.q|d|kr|d}PqWdSWdQRX|jd}xH|D]<}|jd\}} } |d ks|d kr| d krd S|d krfd SqfWd SdS)zP Checks if a given mountpoint is mounted with barriers enabled or disabled. z /proc/mountsr/rrN,=Z nobarrierZbarrier0FT)openr partition) r$r!Z mounts_filerr Z option_listoptionsZoptionnamesepvaluer r r_mountpoint_has_barriers`s"     z%MountsPlugin._mountpoint_has_barrierscCsd|dd|g}tj|dS)z Remounts partition. z/usr/bin/mountz-oz remount,%sN)r,Zexecute)r$r6r7Zremount_commandr r r_remount_partition}szMountsPlugin._remount_partitionr&T)Z per_devicec CsZ|jd|d}t|jdk}|p*|j|}|r |s:dSd}|j|djdsXd}nl| rn|j|rnd}nV|j|} | dkrd}n>| d kr|rtj t j |d Sd }n|rtj t j |d S|dk rtj d ||fdS|jj|| tj d ||j|dnJ|rdS|jj|} | dkr0dStj d||j|d|jj|dS)Nr&)Z command_namerforcerZextzfilesystem not supportedzdevice uses write back cachezunknown current settingFTzbarriers already disabledz#not disabling barriers on '%s' (%s)zdisabling barriers on '%s'z barrier=0zenabling barriers on '%s'z barrier=1)Z _storage_keystrlowerZ _option_boolr startswithr0r;loginfoconstsZSTR_VERIFY_PROFILE_OKerrorZSTR_VERIFY_PROFILE_FAILZ_storagerr<getZunset) r$startr:r!ZverifyZignore_missingZ storage_keyr=Z reject_reasonoriginal_valuer r r_disable_barrierssN     zMountsPlugin._disable_barriersN)__name__ __module__ __qualname____doc__ classmethodr"r%r'r)r*r/r0r;r<Zcommand_customrHr r r rr s  $   r)Z tuned.constsrCrZ decorators subprocessrrZ tuned.logsZtunedZtuned.utils.commandsrr+ZlogsrErAr,ZPluginrr r r rs    PK$2]6 -plugins/__pycache__/plugin_usb.cpython-36.pycnu[3 *sz1USBPlugin._get_device_objects..r)r Zdevicesr)r r_get_device_objects)szUSBPlugin._get_device_objectscCsddiS)N autosuspendr)r rrr_get_config_options,szUSBPlugin._get_config_optionscCsd|_d|_dS)NTF)Z_has_static_tuningZ_has_dynamic_tuning)r instancerrr_instance_init2szUSBPlugin._instance_initcCsdS)Nr)r rrrr_instance_cleanup6szUSBPlugin._instance_cleanupcCsd|S)Nz)/sys/bus/usb/devices/%s/power/autosuspendr)r r rrr_autosuspend_sysfile9szUSBPlugin._autosuspend_sysfilerT)Z per_devicecCsR|j|}|dkrdS|rdnd}|sN|j|}|jj|||rFtjgndd|S)N10F)no_error)Z _option_boolrr Z write_to_fileerrnoENOENT)r valuer Zsimremoveenablevalsys_filerrr_set_autosuspend<s    zUSBPlugin._set_autosuspendFcCs|j|}|jj||djS)N)r)rr Z read_filestrip)r r Zignore_missingr$rrr_get_autosuspendIs zUSBPlugin._get_autosuspendN)F)__name__ __module__ __qualname____doc__rr classmethodrrrrZ command_setr%Z command_getr'rrrrr s   r)rZ decoratorsZ tuned.logsZtunedZtuned.utils.commandsrZglobrZlogsgetlogZPluginrrrrrs   PK$2]0plugins/__pycache__/plugin_mounts.cpython-36.pycnu[3 $sz>MountsPlugin._generate_mountpoint_topology..Zdisk1partlvmz[SWAP])disks device_name filesystemr)rr) rrZ communicate splitlineslen setdefaultsetadd_mountpoint_topology) clsZmountpoint_topologyZ current_diskr r columnsZ device_typeZdevice_removablerr mountpointr r r_generate_mountpoint_topologys, z*MountsPlugin._generate_mountpoint_topologycCs*|jd|_t|jj|_t|_dS)NT)r"Z_devices_supportedrrkeysZ _free_devicesZ_assigned_devices)selfr r r _init_devices;szMountsPlugin._init_devicescCsddiS)Ndisable_barriersr )r$r r r_get_config_optionsAsz MountsPlugin._get_config_optionscCsd|_d|_dS)NFT)Z_has_dynamic_tuningZ_has_static_tuning)r$instancer r r_instance_initGszMountsPlugin._instance_initcCsdS)Nr )r$r(r r r_instance_cleanupKszMountsPlugin._instance_cleanupcCs,tjd|}x|D]}tj|jSWdS)zV Get device cache type. This will work only for devices on SCSI kernel subsystem. z+/sys/block/%s/device/scsi_disk/*/cache_typeN)globcmdZ read_filestrip)r$deviceZsource_filenamesZsource_filenamer r r_get_device_cache_typeNs z#MountsPlugin._get_device_cache_typecCs.x(|j|dD]}|j|dkrdSqWdS)zr Checks if the device has 'write back' cache. If the cache type cannot be determined, asume some other cache. rz write backTF)rr/)r$r!r.r r r_mountpoint_has_writeback_cacheWsz,MountsPlugin._mountpoint_has_writeback_cachec CstdH}x@|D]4}|j}|dddkr.q|d|kr|d}PqWdSWdQRX|jd}xH|D]<}|jd\}} } |d ks|d kr| d krd S|d krfd SqfWd SdS)zP Checks if a given mountpoint is mounted with barriers enabled or disabled. z /proc/mountsr/rrN,=Z nobarrierZbarrier0FT)openr partition) r$r!Z mounts_filerr Z option_listoptionsZoptionnamesepvaluer r r_mountpoint_has_barriers`s"     z%MountsPlugin._mountpoint_has_barrierscCsd|dd|g}tj|dS)z Remounts partition. z/usr/bin/mountz-oz remount,%sN)r,Zexecute)r$r6r7Zremount_commandr r r_remount_partition}szMountsPlugin._remount_partitionr&T)Z per_devicec CsZ|jd|d}t|jdk}|p*|j|}|r |s:dSd}|j|djdsXd}nl| rn|j|rnd}nV|j|} | dkrd}n>| d kr|rtj t j |d Sd }n|rtj t j |d S|dk rtj d ||fdS|jj|| tj d ||j|dnJ|rdS|jj|} | dkr0dStj d||j|d|jj|dS)Nr&)Z command_namerforcerZextzfilesystem not supportedzdevice uses write back cachezunknown current settingFTzbarriers already disabledz#not disabling barriers on '%s' (%s)zdisabling barriers on '%s'z barrier=0zenabling barriers on '%s'z barrier=1)Z _storage_keystrlowerZ _option_boolr startswithr0r;loginfoconstsZSTR_VERIFY_PROFILE_OKerrorZSTR_VERIFY_PROFILE_FAILZ_storagerr<getZunset) r$startr:r!ZverifyZignore_missingZ storage_keyr=Z reject_reasonoriginal_valuer r r_disable_barrierssN     zMountsPlugin._disable_barriersN)__name__ __module__ __qualname____doc__ classmethodr"r%r'r)r*r/r0r;r<Zcommand_customrHr r r rr s  $   r)Z tuned.constsrCrZ decorators subprocessrrZ tuned.logsZtunedZtuned.utils.commandsrr+ZlogsrErAr,ZPluginrr r r rs    PK$2]X7X77plugins/__pycache__/plugin_service.cpython-36.opt-1.pycnu[3 szSysVHandler.disablecCsBtjdd|g\}}|dkr>|jdt|ddddkSdS)Nr*z--listrz%s:rr+)rrrstr)r rr rrr r r r(AszSysVHandler.is_enabledN)rrrrr$r(r r r r r):sr)c@s$eZdZddZddZddZdS) SysVRCHandlercCstjdd||dgdS)Nz sysv-rc-confz--levelr+)rr)r rr r r r rFszSysVRCHandler.enablecCstjdd||dgdS)Nz sysv-rc-confz--levelr,)rr)r rr r r r r$IszSysVRCHandler.disablecCsBtjdd|g\}}|dkr>|jdt|ddddkSdS)Nz sysv-rc-confz--listrz%s:rr-r+)rrrr.)r rr rrr r r r(LszSysVRCHandler.is_enabledN)rrrrr$r(r r r r r/Esr/c@sDeZdZddZddZddZddZd d Zd d Zd dZ dS) OpenRCHandlercCs&tjddg\}}|dkr"|jSdS)Nz rc-statusz-rr)rrstrip)r rrr r r rQszOpenRCHandler.runlevel_getcCstjd|dgdS)Nz rc-servicer)rr)r rr r r rUszOpenRCHandler.startcCstjd|dgdS)Nz rc-servicer")rr)r rr r r r"XszOpenRCHandler.stopcCstjdd||gdS)Nz rc-updateadd)rr)r rr r r r r[szOpenRCHandler.enablecCstjdd||gdS)Nz rc-updatedel)rr)r rr r r r r$^szOpenRCHandler.disablecCs"tjd|dgdgd\}}|dkS)Nz rc-servicer%r)r&)rr)r rrrr r r r'aszOpenRCHandler.is_runningcCs2tjdd|g\}}ttjdtj|d|S)Nz rc-updateZshowz\b)rrboolresearchescape)r rr rrr r r r(eszOpenRCHandler.is_enabledN) rrrrrr"rr$r'r(r r r r r0Psr0c@s\eZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ dS)SystemdHandlercCsdS)Nr )r r r r rkszSystemdHandler.runlevel_getcCstjdd|gdS)N systemctlZrestart)rr)r rr r r rnszSystemdHandler.startcCstjdd|gdS)Nr:r")rr)r rr r r r"qszSystemdHandler.stopcCstjdd|gdS)Nr:r)rr)r rr r r r rtszSystemdHandler.enablecCstjdd|gdS)Nr:r$)rr)r rr r r r r$wszSystemdHandler.disablecCs"tjdd|gdgd\}}|dkS)Nr:z is-activer)r&)rr)r rrrr r r r'zszSystemdHandler.is_runningcCs>tjdd|gdgd\}}|j}|dkr.dS|dkr:dSdS) Nr:z is-enabledr)r&ZenabledTZdisabledF)rrr1)r rr rrr%r r r r(~szSystemdHandler.is_enabledcCstjd||ftjj|s0tjd|dStj|}ytj|tj Wn2t k r~}ztjd||fdSd}~XnXt j |||j dS)NzCinstalling service configuration overlay file '%s' for service '%s'z)Unable to find service configuration '%s'z#Unable to create directory '%s': %s)loginfoospathexistserrorconstsSERVICE_SYSTEMD_CFG_PATHmakedirsZDEF_SERVICE_CFG_DIR_MODEOSErrorrcopyr)r rr dirpather r r rs   zSystemdHandler.cfg_installc Csntjd||ftj|}d|tjj|f}tj||j ytj |Wnt t fk rhYnXdS)NzEuninstalling service configuration overlay file '%s' for service '%s'z%s/%s) r;r<rArBr=r>basenamerunlinkrrmdirFileNotFoundErrorrD)r rr rFr>r r r rs  zSystemdHandler.cfg_uninstallcCs|dkr dSdtj|tjj|f}tjj|sHtjd||fdStjj|sjtjd||fdStj |}tj |}||kS)Nz%s/%sz.Unable to find service '%s' configuration '%s'Fz0Service '%s' configuration not installed in '%s') rArBr=r>rHr?r;r@rZ sha256sum)r rr r>Z sha256sum1Z sha256sum2r r r rs    zSystemdHandler.cfg_verifyN) rrrrrr"rr$r'r(rrrr r r r r8is r8csneZdZdZfddZddZddZdd Zd d Zd d Z ddZ ddZ ddZ e jfddZZS) ServicePlugina1 `service`:: Plug-in for handling sysvinit, sysv-rc, openrc and systemd services. + The syntax is as follows: + [subs="+quotes,+macros"] ---- [service] service.__service_name__=__commands__[,file:__file__] ---- + Supported service-handling `_commands_` are `start`, `stop`, `enable` and `disable`. The optional `file:__file__` directive installs an overlay configuration file `__file__`. Multiple commands must be comma (`,`) or semicolon (`;`) separated. If the directives conflict, the last one is used. + The service plugin supports configuration overlays only for systemd. In other init systems, this directive is ignored. The configuration overlay files are copied to `/etc/systemd/system/__service_name__.service.d/` directories. Upon profile unloading, the directory is removed if it is empty. + With systemd, the `start` command is implemented by `restart` in order to allow loading of the service configuration file overlay. + NOTE: With non-systemd init systems, the plug-in operates on the current runlevel only. + .Start and enable the `sendmail` service with an overlay file ==== ---- [service] service.sendmail=start,enable,file:${i:PROFILE_DIR}/tuned-sendmail.conf ---- The internal variable `${i:PROFILE_DIR}` points to the directory from which the profile is loaded. ==== cs&tt|j||d|_|j|_dS)NT)superrLrZ_has_dynamic_options_detect_init_system _init_handler)r argskwargs) __class__r r rszServicePlugin.__init__cCstj|dgd\}}|dkS)Nr)r&)rr)r Zcommandrrr r r _check_cmdszServicePlugin._check_cmdcCs|jddgrtjdtS|jdgr:tjdtS|jddgrXtjdtS|jd dgrvtjd tStjd dS) Nr:r%zdetected systemdr*zdetected generic sysvinitz update-rc.dz-hzdetected sysv-rcz rc-updatezdetected openrcz8Unable to detect your init system, disabling the plugin.) rSr;debugr8r)r/r0 exceptionsZNotSupportedPluginException)r r r r rNs     z!ServicePlugin._detect_init_systemcCstjd|}t}x~|D]v}|dkr,d|_q|dkrsz0ServicePlugin._instance_init..)Z_has_dynamic_tuningZ_has_static_tuning collections OrderedDictZoptionsitems _services_services_original)r instancer )r r _instance_inits zServicePlugin._instance_initcCsdS)Nr )r rfr r r _instance_cleanup szServicePlugin._instance_cleanupcCsT|r|jj|n|dk r&|jj||r:|jj||n|dk rP|jj||dS)N)rOrr"rr$)r rrrr r r r _process_service s zServicePlugin._process_servicecCs|jj}|dkr tjddSx|jjD]}|jj|d|}|jj|d}t|||dj ||j |d<|dj r|jj |d|dj |j |d|dj |dj|q,WdS)NzCannot detect runlevelrr)rOrr;r@rdrcr(r'rr rerrirr)r rfr r!r(r'r r r _instance_apply_statics   z$ServicePlugin._instance_apply_staticc CsH|jj}|dkr&tjtjddSd}x|jjD]}|jj|d|dj }|r~tj tj d|d|dj fnR|dk rtjtjd|d|dj fd}n"tj tj d|d|dj f|jj |d|}|jj|d} |jd |d|dj| |dkrd}|jd |d|dj||dkr8d}q8W|S) Nzcannot detect runlevelFTrrz'service '%s' configuration '%s' matchesz'service '%s' configuration '%s' differszservice '%s' configuration '%s'z %s runningz %s enabled)rOrr;r@rAZSTR_VERIFY_PROFILE_FAILrdrcrr r<ZSTR_VERIFY_PROFILE_OKZ STR_VERIFY_PROFILE_VALUE_MISSINGr(r'Z _verify_valuerr) r rfZignore_missingZdevicesr retr!Zret_cfg_verifyr(r'r r r _instance_verify_static$s( $""$"z%ServicePlugin._instance_verify_staticcCsLxFt|jjD]4\}}|jr.|jj||j|j||j|j|j qWdS)N) listrercr rOrrirrr )r rfZrollbackrr_r r r _instance_unapply_static<sz&ServicePlugin._instance_unapply_static)rrr__doc__rrSrNrZrgrhrirjrlrAZ ROLLBACK_SOFTrn __classcell__r r )rRr rLs(   rL)r9rraZ tuned.constsrAZ decoratorsr=r5Z tuned.logsZtunedZtuned.utils.commandsrZlogsgetr;rrrr r)r/r0r8ZPluginrLr r r r s"      BPK$2]zU3plugins/__pycache__/plugin_scheduler.cpython-36.pycnu[3 Jsz*SchedulerUtils.__init__..css|]}tt||fVqdS)N)r(r))r*r,rrrr-Ls)dict_dict_schedcfg2schedconstitems_dict_schedcfg2numvalues_dict_num2schedconst)r rrrrHszSchedulerUtils.__init__cCs |jj|S)N)r1get)r str_schedulerrrrsched_cfg_to_numNszSchedulerUtils.sched_cfg_to_numcCs |jj|S)N)r3r4)r r rrrsched_num_to_constRsz!SchedulerUtils.sched_num_to_constcCs tj|S)N)r)sched_getscheduler)r pidrrr get_schedulerUszSchedulerUtils.get_schedulercCstj||tj|dS)N)r)sched_setscheduler sched_param)r r9schedpriorrr set_schedulerXszSchedulerUtils.set_schedulercCs tj|S)N)r)sched_getaffinity)r r9rrr get_affinity[szSchedulerUtils.get_affinitycCstj||dS)N)r)sched_setaffinity)r r9r rrr set_affinity^szSchedulerUtils.set_affinitycCs tj|jS)N)r)sched_getparamsched_priority)r r9rrr get_priorityaszSchedulerUtils.get_prioritycCs tj|S)N)r)sched_get_priority_min)r r=rrrget_priority_mindszSchedulerUtils.get_priority_mincCs tj|S)N)r)sched_get_priority_max)r r=rrrget_priority_maxgszSchedulerUtils.get_priority_maxN)rrr__doc__r/rr6r7r:r?rArCrFrHrJrrrrr;s rc@sPeZdZdZddZddZddZdd Zd d Zd d Z ddZ ddZ dS)SchedulerUtilsSchedutilszE Class encapsulating scheduler implementation in schedutils module cCs8tdd|jjD|_tdd|jjD|_dS)Ncss |]\}}|tt|fVqdS)N)r( schedutils)r*r+r,rrrr-psz4SchedulerUtilsSchedutils.__init__..css|]}tt||fVqdS)N)r(rM)r*r,rrrr-rs)r.r/r0r1r2r3)r rrrrnsz!SchedulerUtilsSchedutils.__init__cCs tj|S)N)rMr:)r r9rrrr:tsz&SchedulerUtilsSchedutils.get_schedulercCstj|||dS)N)rMr?)r r9r=r>rrrr?wsz&SchedulerUtilsSchedutils.set_schedulercCs tj|S)N)rMrA)r r9rrrrAzsz%SchedulerUtilsSchedutils.get_affinitycCstj||dS)N)rMrC)r r9r rrrrC}sz%SchedulerUtilsSchedutils.set_affinitycCs tj|S)N)rMrF)r r9rrrrFsz%SchedulerUtilsSchedutils.get_prioritycCs tj|S)N)rMrH)r r=rrrrHsz)SchedulerUtilsSchedutils.get_priority_mincCs tj|S)N)rMrJ)r r=rrrrJsz)SchedulerUtilsSchedutils.get_priority_maxN) rrrrKrr:r?rArCrFrHrJrrrrrLjsrLcseZdZdZfddZddZddZdd Zed d Z d d Z ddZ ddZ ddZ ddZddZddZddZddZddZdd!d"Zd#d$Zd%d&Zd'd(Zdd)d*Zd+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6Zd7d8Zd9d:Z d;d<Z!d=d>Z"dd?d@Z#dAdBZ$dCdDZ%fdEdFZ&dGdHZ'dIdJZ(dKdLZ)e*j+ffdMdN Z,dOdPZ-dQdRZ.fdSdTZ/dUdVZ0dWdXZ1dYdZZ2e3d[d d\d]d^Z4e3d_d d\d`daZ5e3dbd d\dcddZ6e3ded d\dfdgZ7e3dhd d\didjZ8e3dkd d\dldmZ9dndoZ:dpdqZ;drdsZdxdyZ?dzd{Z@d|d}ZAd~dZBddZCddZDddZEddZFe3dd ddddZGddZHddZIdddZJeKdddZLeMdddZNeKdddZOeMdddZPeKdddZQeMdddZReKdddZSeMdddZTeKdddZUeMdddZVeKdddZWeMdddZXeKdddZYeMdddZZeKdddZ[eMdddZ\eKdddZ]eMdddZ^eKddd„Z_eMdddĄZ`ZaS)SchedulerPlugina]- `scheduler`:: Allows tuning of scheduling priorities, process/thread/IRQ affinities, and CPU isolation. + To prevent processes/threads/IRQs from using certain CPUs, use the [option]`isolated_cores` option. It changes process/thread affinities, IRQs affinities and it sets `default_smp_affinity` for IRQs. The CPU affinity mask is adjusted for all processes and threads matching [option]`ps_whitelist` option subject to success of the `sched_setaffinity()` system call. The default setting of the [option]`ps_whitelist` regular expression is `.*` to match all processes and thread names. To exclude certain processes and threads use [option]`ps_blacklist` option. The value of this option is also interpreted as a regular expression and process/thread names (`ps -eo cmd`) are matched against that expression. Profile rollback allows all matching processes and threads to run on all CPUs and restores the IRQ settings prior to the profile application. + Multiple regular expressions for [option]`ps_whitelist` and [option]`ps_blacklist` options are allowed and separated by `;`. Quoted semicolon `\;` is taken literally. + .Isolate CPUs 2-4 ==== ---- [scheduler] isolated_cores=2-4 ps_blacklist=.*pmd.*;.*PMD.*;^DPDK;.*qemu-kvm.* ---- Isolate CPUs 2-4 while ignoring processes and threads matching `ps_blacklist` regular expressions. ==== The [option]`irq_process` option controls whether the scheduler plugin applies the `isolated_cores` parameter to IRQ affinities. The default value is `true`, which means that the scheduler plugin will move all possible IRQs away from the isolated cores. When `irq_process` is set to `false`, the plugin will not change any IRQ affinities. ==== The [option]`default_irq_smp_affinity` option controls the values *TuneD* writes to `/proc/irq/default_smp_affinity`. The file specifies default affinity mask that applies to all non-active IRQs. Once an IRQ is allocated/activated its affinity bitmask will be set to the default mask. + The following values are supported: + -- `calc`:: Content of `/proc/irq/default_smp_affinity` will be calculated from the `isolated_cores` parameter. Non-isolated cores are calculated as an inversion of the `isolated_cores`. Then the intersection of the non-isolated cores and the previous content of `/proc/irq/default_smp_affinity` is written to `/proc/irq/default_smp_affinity`. If the intersection is an empty set, then just the non-isolated cores are written to `/proc/irq/default_smp_affinity`. This behavior is the default if the parameter `default_irq_smp_affinity` is omitted. `ignore`:: *TuneD* will not touch `/proc/irq/default_smp_affinity`. explicit cpulist:: The cpulist (such as 1,3-4) is unpacked and written directly to `/proc/irq/default_smp_affinity`. -- + .An explicit CPU list to set the default IRQ smp affinity to CPUs 0 and 2 ==== ---- [scheduler] isolated_cores=1,3 default_irq_smp_affinity=0,2 ---- ==== To adjust scheduling policy, priority and affinity for a group of processes/threads, use the following syntax. + [subs="+quotes,+macros"] ---- group.__groupname__=__rule_prio__:__sched__:__prio__:__affinity__:__regex__ ---- + where `__rule_prio__` defines internal *TuneD* priority of the rule. Rules are sorted based on priority. This is needed for inheritence to be able to reorder previously defined rules. Equal `__rule_prio__` rules should be processed in the order they were defined. However, this is Python interpreter dependant. To disable an inherited rule for `__groupname__` use: + [subs="+quotes,+macros"] ---- group.__groupname__= ---- + `__sched__` must be one of: *`f`* for FIFO, *`b`* for batch, *`r`* for round robin, *`o`* for other, *`*`* do not change. + `__affinity__` is CPU affinity in hexadecimal. Use `*` for no change. + `__prio__` scheduling priority (see `chrt -m`). + `__regex__` is Python regular expression. It is matched against the output of + [subs="+quotes,+macros"] ---- ps -eo cmd ---- + Any given process name may match more than one group. In such a case, the priority and scheduling policy are taken from the last matching `__regex__`. + .Setting scheduling policy and priorities to kernel threads and watchdog ==== ---- [scheduler] group.kthreads=0:*:1:*:\[.*\]$ group.watchdog=0:f:99:*:\[watchdog.*\] ---- ==== + The scheduler plug-in uses perf event loop to catch newly created processes. By default it listens to `perf.RECORD_COMM` and `perf.RECORD_EXIT` events. By setting [option]`perf_process_fork` option to `true`, `perf.RECORD_FORK` events will be also listened to. In other words, child processes created by the `fork()` system call will be processed. Since child processes inherit CPU affinity from their parents, the scheduler plug-in usually does not need to explicitly process these events. As processing perf events can pose a significant CPU overhead, the [option]`perf_process_fork` option parameter is set to `false` by default. Due to this, child processes are not processed by the scheduler plug-in. + The CPU overhead of the scheduler plugin can be mitigated by using the scheduler [option]`runtime` option and setting it to `0`. This will completely disable the dynamic scheduler functionality and the perf events will not be monitored and acted upon. The disadvantage ot this approach is the procees/thread tuning will be done only at profile application. + .Disabling the scheduler dynamic functionality ==== ---- [scheduler] runtime=0 isolated_cores=1,3 ---- ==== + NOTE: For perf events, memory mapped buffer is used. Under heavy load the buffer may overflow. In such cases the `scheduler` plug-in may start missing events and failing to process some newly created processes. Increasing the buffer size may help. The buffer size can be set with the [option]`perf_mmap_pages` option. The value of this parameter has to expressed in powers of 2. If it is not the power of 2, the nearest higher power of 2 value is calculated from it and this calculated value used. If the [option]`perf_mmap_pages` option is omitted, the default kernel value is used. + The scheduler plug-in supports process/thread confinement using cgroups v1. + [option]`cgroup_mount_point` option specifies the path to mount the cgroup filesystem or where *TuneD* expects it to be mounted. If unset, `/sys/fs/cgroup/cpuset` is expected. + If [option]`cgroup_groups_init` option is set to `1` *TuneD* will create (and remove) all cgroups defined with the `cgroup*` options. This is the default behavior. If it is set to `0` the cgroups need to be preset by other means. + If [option]`cgroup_mount_point_init` option is set to `1`, *TuneD* will create (and remove) the cgroup mountpoint. It implies `cgroup_groups_init = 1`. If set to `0` the cgroups mount point needs to be preset by other means. This is the default behavior. + The [option]`cgroup_for_isolated_cores` option is the cgroup name used for the [option]`isolated_cores` option functionality. For example, if a system has 4 CPUs, `isolated_cores=1` means that all processes/threads will be moved to CPUs 0,2-3. The scheduler plug-in will isolate the specified core by writing the calculated CPU affinity to the `cpuset.cpus` control file of the specified cgroup and move all the matching processes/threads to this group. If this option is unset, classic cpuset affinity using `sched_setaffinity()` will be used. + [option]`cgroup.__cgroup_name__` option defines affinities for arbitrary cgroups. Even hierarchic cgroups can be used, but the hieararchy needs to be specified in the correct order. Also *TuneD* does not do any sanity checks here, with the exception that it forces the cgroup to be under [option]`cgroup_mount_point`. + The syntax of the scheduler option starting with `group.` has been augmented to use `cgroup.__cgroup_name__` instead of the hexadecimal `__affinity__`. The matching processes will be moved to the cgroup `__cgroup_name__`. It is also possible to use cgroups which have not been defined by the [option]`cgroup.` option as described above, i.e. cgroups not managed by *TuneD*. + All cgroup names are sanitized by replacing all all dots (`.`) with slashes (`/`). This is to prevent the plug-in from writing outside [option]`cgroup_mount_point`. + .Using cgroups v1 with the scheduler plug-in ==== ---- [scheduler] cgroup_mount_point=/sys/fs/cgroup/cpuset cgroup_mount_point_init=1 cgroup_groups_init=1 cgroup_for_isolated_cores=group cgroup.group1=2 cgroup.group2=0,2 group.ksoftirqd=0:f:2:cgroup.group1:ksoftirqd.* ps_blacklist=ksoftirqd.*;rcuc.*;rcub.*;ktimersoftd.* isolated_cores=1 ---- Cgroup `group1` has the affinity set to CPU 2 and the cgroup `group2` to CPUs 0,2. Given a 4 CPU setup, the [option]`isolated_cores=1` option causes all processes/threads to be moved to CPU cores 0,2-3. Processes/threads that are blacklisted by the [option]`ps_blacklist` regular expression will not be moved. The scheduler plug-in will isolate the specified core by writing the CPU affinity 0,2-3 to the `cpuset.cpus` control file of the `group` and move all the matching processes/threads to this cgroup. ==== Option [option]`cgroup_ps_blacklist` allows excluding processes which belong to the blacklisted cgroups. The regular expression specified by this option is matched against cgroup hierarchies from `/proc/PID/cgroups`. Cgroups v1 hierarchies from `/proc/PID/cgroups` are separated by commas ',' prior to regular expression matching. The following is an example of content against which the regular expression is matched against: `10:hugetlb:/,9:perf_event:/,8:blkio:/` + Multiple regular expressions can be separated by semicolon ';'. The semicolon represents a logical 'or' operator. + .Cgroup-based exclusion of processes from the scheduler ==== ---- [scheduler] isolated_cores=1 cgroup_ps_blacklist=:/daemons\b ---- The scheduler plug-in will move all processes away from core 1 except processes which belong to cgroup '/daemons'. The '\b' is a regular expression metacharacter that matches a word boundary. ---- [scheduler] isolated_cores=1 cgroup_ps_blacklist=\b8:blkio: ---- The scheduler plug-in will exclude all processes which belong to a cgroup with hierarchy-ID 8 and controller-list blkio. ==== Recent kernels moved some `sched_` and `numa_balancing_` kernel run-time parameters from `/proc/sys/kernel`, managed by the `sysctl` utility, to `debugfs`, typically mounted under `/sys/kernel/debug`. TuneD provides an abstraction mechanism for the following parameters via the scheduler plug-in: [option]`sched_min_granularity_ns`, [option]`sched_latency_ns`, [option]`sched_wakeup_granularity_ns`, [option]`sched_tunable_scaling`, [option]`sched_migration_cost_ns`, [option]`sched_nr_migrate`, [option]`numa_balancing_scan_delay_ms`, [option]`numa_balancing_scan_period_min_ms`, [option]`numa_balancing_scan_period_max_ms` and [option]`numa_balancing_scan_size_mb`. Based on the kernel used, TuneD will write the specified value to the correct location. + .Set tasks' "cache hot" value for migration decisions. ==== ---- [scheduler] sched_migration_cost_ns=500000 ---- On the old kernels, this is equivalent to: ---- [sysctl] kernel.sched_migration_cost_ns=500000 ---- that is, value `500000` will be written to `/proc/sys/kernel/sched_migration_cost_ns`. However, on more recent kernels, the value `500000` will be written to `/sys/kernel/debug/sched/migration_cost_ns`. ==== c stt|j||||||||d|_tj|_ttj|_ |dk rh|j tj tj|_t|j tj tj|_ t|_d|_i|_d|_d|_d|_tj|_|jdd|_d|_|jdd|_d|_y t|_Wntk rt |_YnXdS)NTz.*r )Z command_nameirq)!superrNrZ_has_dynamic_optionsconstsZCFG_DEF_DAEMON_daemonintZCFG_DEF_SLEEP_INTERVAL_sleep_intervalget_boolZ CFG_DAEMONr4ZCFG_SLEEP_INTERVALrr_secure_boot_hint_sched_knob_paths_cache _ps_whitelist _ps_blacklist_cgroup_ps_blacklist_reperfZcpu_map_cpusZ _storage_key_scheduler_storage_key _irq_process_irq_storage_key_evlistr_scheduler_utilsAttributeErrorrL) r Zmonitor_repositoryZstorage_factoryZhardware_inventoryZdevice_matcherZdevice_matcher_udevZplugin_instance_factoryZ global_cfg variables) __class__rrrs0     zSchedulerPlugin.__init__cCsT|dkr dSy t|}Wntk r,dSX|dkr:dStdtjtj|dS)Nr)rT ValueErrormathZceillog)r Z mmap_pagesZmprrr_calc_mmap_pagess z SchedulerPlugin._calc_mmap_pagescsd|_d|_d|_d|_jjji_tjdkr^t j dj i_jj jt _d_d_d_tjfdd|jjD_|j|_jj|jd}j|}|dkrt jd|d}|dk rt||krt j d ||fx(|jD]}jj|j||j|<qWjj|jjd d d krHd|_tj |_!j"r|jryt#j$|_%t#j&t#j't#j(d d ddd d t#j)t#j*Bd }|j+j,|j%dt#j-j,|j%|_|jj.||dkr|jj/n|jj/|dWnd|_YnXdS)NFTrz0recovering scheduling settings from previous runcsJg|]B\}}|dddkrt|dkrj|ddjj|fqS)Nzcgroup.)len_sanitize_cgroup_path _variablesexpand)r*optionr )r rr sz2SchedulerPlugin._instance_init..perf_mmap_pageszKInvalid 'perf_mmap_pages' value specified: '%s', using default kernel valuezL'perf_mmap_pages' value has to be power of two, specified: '%s', using: '%d'Zruntimer0) typeconfigZtaskcommmmapZfreqZ wakeup_eventsZ watermarkZ sample_type)Zcpusthreads)Zpages)0raZ_has_dynamic_tuningZ_has_static_tuning_runtime_tuning_storager4r^_scheduler_originalrlriinfo_restore_ps_affinityunsetr._cgroups_original_affinityr_cgroup_affinity_initialized_cgroup collections OrderedDictoptionsr0_cgroups _schedulerrnrorjerrorstrrrV threadingZEvent _terminaterSr\Z thread_mapZ_threadsevselZ TYPE_SOFTWAREZCOUNT_SW_DUMMYZ SAMPLE_TIDZ SAMPLE_CPUopenr]Zevlistaddrw)r instanceZperf_mmap_pages_rawrrr+rr)r r_instance_inits^          zSchedulerPlugin._instance_initcCs*|jr&x|jjD]}tj|jqWdS)N)ra get_pollfdr)closer,)r rfdrrr_instance_cleanupsz!SchedulerPlugin._instance_cleanupcCs4dtjdddddddddddddddddddddS)NFTcalcZfalse)isolated_corescgroup_mount_pointcgroup_mount_point_initcgroup_groups_initcgroup_for_isolated_corescgroup_ps_blacklist ps_whitelist ps_blacklist irq_processdefault_irq_smp_affinityrrperf_process_forksched_min_granularity_nssched_latency_nssched_wakeup_granularity_nssched_tunable_scalingsched_migration_cost_nssched_nr_migratenuma_balancing_scan_delay_ms!numa_balancing_scan_period_min_ms!numa_balancing_scan_period_max_msnuma_balancing_scan_size_mb)rRZDEF_CGROUP_MOUNT_POINT)clsrrr_get_config_optionss,z#SchedulerPlugin._get_config_optionscCs|dk rt|jddSdS)N./)rreplace)r rrrrrm9sz%SchedulerPlugin._sanitize_cgroup_pathcCs>t|tjs|}tj|}tj|}|j|r:d|d}|S)N[]) isinstanceprocfsprocessZprocess_cmdline _is_kthread)r rr9rrrr _get_cmdline=s     zSchedulerPlugin._get_cmdlinecCstj}|ji}x|jD]}yN|j|}|d}|||<d|krnx&|djD]}|j|}|||<qTWWqttfk r}z$|jtj ks|jtj krwnWYdd}~XqXqW|S)Nr9rx) rpidstatsreload_threadsr2rkeysOSErrorIOErrorerrnoENOENTESRCH)r ps processesprocrr9errr get_processesGs$    zSchedulerPlugin.get_processescCs@|jj|}|jj|}|jj|}tjd|||f||fS)Nz8Read scheduler policy '%s' and priority '%d' of PID '%d')rbr:r7rFridebug)r r9r sched_strr rrr_get_rt`s    zSchedulerPlugin._get_rtcCs|jj|}tjd|||fyB|jj|}|jj|}||ksJ||kr`tjd||||fWn4ttfk r}ztjd|WYdd}~XnXy|jj |||Wn`ttfk r }z>t |dr|j t j krtjd|ntjd||fWYdd}~XnXdS)NzBSetting scheduler policy to '%s' and priority to '%d' of PID '%d'.z9Priority for %s must be in range %d - %d. '%d' was given.z(Failed to get allowed priority range: %srzAFailed to set scheduling parameters of PID %d, the task vanished.z1Failed to set scheduling parameters of PID %d: %s) rbr7rirrHrJr SystemErrorrr?hasattrrr)r r9r=r>rZprio_minZprio_maxrrrr_set_rths*    zSchedulerPlugin._set_rtcCs|ddtjj@dkS)Nstatflagsr)rZpidstatZ PF_KTHREAD)r rrrrrszSchedulerPlugin._is_kthreadcCs yjtj|}|djrd|dddkr8tjd|n(|j|rRtjd|ntjd|dSdSWnttfk r}zF|j t j ks|j t j krtjd |d Stj d ||fd SWYdd}~Xn8t tfk r}ztj d ||fdSd}~XnXdS)NrstateZzYAffinity of zombie task with PID %d cannot be changed, the task's affinity mask is fixed.z[Affinity of kernel thread with PID %d cannot be changed, the task's affinity mask is fixed.zRAffinity of task with PID %d cannot be changed, the task's affinity mask is fixed.rrz6Failed to get task info for PID %d, the task vanished.z&Failed to get task info for PID %d: %srfr)rrZis_bound_to_cpurirrwarnrrrrrrrcKeyError)r r9rrrrr_affinity_changeables2       z$SchedulerPlugin._affinity_changeablec Cs\y|j|}Wn(tk r6t|j}||j|<YnX|jdkrX|jdkrX||_||_dS)N)r{rrrr r )r r9r r paramsrrr_store_orig_process_rts z&SchedulerPlugin._store_orig_process_rtcCsd}|dkr|dkr|Sy:|j|\}}|dkr4|}|j||||j|||Wntttfk r}zTt|dr|jtjkrtj d|||j kr|j |=d}ntj d||fWYdd}~XnX|S)NTrz=Failed to read scheduler policy of PID %d, the task vanished.FzcRefusing to set scheduler and priority of PID %d, reading original scheduling parameters failed: %s) rrrrrrrrrirr{r)r r9r=r>contZ prev_schedZ prev_priorrrr_tune_process_rts& z SchedulerPlugin._tune_process_rtcCst|dddkS)Nrkzcgroup.)r)r r rrr_is_cgroup_affinitysz#SchedulerPlugin._is_cgroup_affinityFc Csby|j|}Wn(tk r6t|j}||j|<YnX|jdkr^|jdkr^|rX||_n||_dS)N)r{rrrr r )r r9r is_cgrouprrrr_store_orig_process_affinitys z,SchedulerPlugin._store_orig_process_affinityc Cspxj|jjdtjt|dfddjdD]@}y&|jdddd}|dkrP|Sd Stk rfYq(Xq(Wd S) Nz%s/%s/%sr T)no_error z:cpuset:rrOr)r read_filerRZPROCFS_MOUNT_POINTrsplit IndexError)r r9lr rrr_get_cgroup_affinitys, z$SchedulerPlugin._get_cgroup_affinitycCsB|j|}|j}|dkr$d||f}|jjd|t|dddS)Nrz%s/%sz%s/tasksT)r)rm_cgroup_mount_pointr write_to_filer)r r9r pathrrr _set_cgroups   zSchedulerPlugin._set_cgroupcCs,|dd}t|t o"t|dk}||fS)Nrkr)rlistrl)r r rrrr_parse_cgroup_affinitys z&SchedulerPlugin._parse_cgroup_affinityc Csd}|dkr|Syd|j|\}}|r<|j|}|j||n(|j|}|rX|j|||}|j|||j|||Wntttfk r}zTt |dr|j t j krt j d|||jkr|j|=d}nt jd||fWYdd}~XnX|S)NTrz5Failed to read affinity of PID %d, the task vanished.FzLRefusing to set CPU affinity of PID %d, reading original affinity failed: %s)rrr _get_affinity_get_intersect_affinity _set_affinityrrrrrrrirr{r) r r9r intersectrrr prev_affinityrrrr_tune_process_affinitys4     z&SchedulerPlugin._tune_process_affinitycCsF|j|||}|sdS|j||}| s2||jkr6dS||j|_dS)N)rrr{r)r r9rr=r>r rrrr _tune_processs zSchedulerPlugin._tune_processc Csf|jj|}|dkr.|dkr.tjd|dSy t|}Wn"tk r\tjd|dSX||fS)Nrz>Invalid scheduler: %s. Scheduler and priority will be ignored.z=Invalid priority: %s. Scheduler and priority will be ignored.)NN)NN)rbr6rirrTrg)r r5Z str_priorityr r rrr_convert_sched_paramss  z%SchedulerPlugin._convert_sched_paramscCsD|dkrd}n2|j|r|}n"|jj|}|s@tjd|d}|S)Nrz)Invalid affinity: %s. It will be ignored.)rr hex2cpulistrir)r Z str_affinityr rrr_convert_affinity+s  z!SchedulerPlugin._convert_affinitycCs6|\}}}}}|j||\}}|j|}|||||fS)N)rr)r vals rule_prior r r regexrrr_convert_sched_cfg8s   z"SchedulerPlugin._convert_sched_cfgcCsd|j|f}ytj|tjWn4tk rT}ztjd||fWYdd}~XnX|jj d|df|jj d|jdfddddstjd|dS)Nz%s/%sz Unable to create cgroup '%s': %sz cpuset.memsT)rz3Unable to initialize 'cpuset.mems ' for cgroup '%s') rr)mkdirrRDEF_CGROUP_MODErrirrrr)r r rrrrr_cgroup_create_group?s$z$SchedulerPlugin._cgroup_create_groupcCs@|jdk r"|j|jkr"|j|jx|jD]}|j|q*WdS)N)rrr)r cgrrr_cgroup_initialize_groupsJs  z)SchedulerPlugin._cgroup_initialize_groupscCstjdytj|jtjWn0tk rN}ztjd|WYdd}~XnX|j j dddddd|jg\}}|dkrtjd |jdS) NzInitializing cgroups settingsz'Unable to create cgroup mount point: %sZmountz-tr z-oZcpusetrzUnable to mount '%s') rirr)makedirsrrRrrrrexecute)r rretoutrrr_cgroup_initializePs   z"SchedulerPlugin._cgroup_initializecCsHytj|Wn4tk rB}ztjd||fWYdd}~XnXdS)Nz#Unable to remove directory '%s': %s)r)rmdirrrir)r r rrrr _remove_dirZszSchedulerPlugin._remove_dircCsXx&t|jD]}|jd|j|fq W|jdk rT|j|jkrT|jd|j|jfdS)Nz%s/%s)reversedrrrr)r rrrr_cgroup_finalize_groups`sz'SchedulerPlugin._cgroup_finalize_groupscCsltjd|jjd|jg\}}|dkr.cs6g|].\}}tjd|rt|dkr|j|fqS)zgroup\.)rematchrlr)r*rpr)r rrrqs cSs |ddS)Nrrr)Z option_valsrrrsz8SchedulerPlugin._instance_apply_static..)keyz(error compiling regular expression: '%s'cs(g|] \}}tj|dk r||fqS)N)rsearch)r*r9r)r%rrrqsc s$g|]\}}||ffqSrr)r*r9r)r rpr rr rrrqsz(?}ztjd|dSd}~XnXx|jjD]x\}}||ksL|||jkrlqL|jdk r|j dk r|j ||j|j |j dk r|j ||j qL|j dk rL|j||j qLWi|_|jj|jdS)NzKerror unapplying tuning, cannot get information about running processes: %s)rrrrirr{r0rr r rr rr rrzr~r^)r rrr9Z orig_paramsrrrr}s&      z$SchedulerPlugin._restore_ps_affinitycCsttj}d}xr|dkr|dkr|jjd|j|dfddd}|d krvx.|jdD] }|jjd |jdf|dd qRW|d 8}qW|dkrtj d |dS)N rOrz%s/%s/%sZtasksT)rrrz%s/%s)rrz(Unable to cleanup tasks from cgroup '%s')rOr#) rTrRZCGROUP_CLEANUP_TASKS_RETRYrrrrrrir)r r Zcntdatarrrr_cgroup_cleanup_tasks_ones    z)SchedulerPlugin._cgroup_cleanup_tasks_onecCs@|jdk r"|j|jkr"|j|jx|jD]}|j|q*WdS)N)rrr%)r rrrr_cgroup_cleanup_taskss  z%SchedulerPlugin._cgroup_cleanup_taskscsptt|j|||jr2|jr2|jj|jj|j |j |j |j sV|j r^|j|j rl|jdS)N)rQrN_instance_unapply_staticrSryrrr!joinr}r r&rrrr)r rZrollback)rerrr's    z(SchedulerPlugin._instance_unapply_staticcCstjd|d|j|df}|jj|ddd}|dkr|jtjks<|jtjkrLtjd|ntjd||fdSd}~XnX|j j |j ||}|dk r||j krtjd||t |f|\}}} |j||||| |jj|j|j dS)Nz3Failed to get cmdline of PID %d, the task vanished.z#Failed to get cmdline of PID %d: %sz-tuning new process '%s' with PID '%d' by '%s')rrrrrrrirrrZ re_lookuprr{rrrzrr^) r rr9r%rrvr=r>r rrr_add_pid$s$       zSchedulerPlugin._add_pidcCs6||jkr2|j|=tjd||jj|j|jdS)Nz)removed PID %d from the rollback database)r{rirrzrr^)r rr9rrr _remove_pid9s   zSchedulerPlugin._remove_pidc Cs|jj|j}tj}|jj}x|D]}|j|q&Wx|jj st |j|j ddkr:|jj r:d}x|rd}xt|j D]j}|jj |}|r~d}|jtjks|jr|jtjkr|j|t|j|q~|jtjkr~|j|t|jq~WqnWq:WdS)NirTF)rZre_lookup_compilerselectpollrarregisterrZis_setrlrUr]Z read_on_cpurtr\Z RECORD_COMM_perf_process_fork_valueZ RECORD_FORKr2rTtidZ RECORD_EXITr3) r rr%r5ZfdsrZ read_eventsZcpuZeventrrrr @s&   $    zSchedulerPlugin._thread_coder) per_devicecCs:|rdS|r6|dk r6djddtjdt|D|_dS)N|cSsg|] }d|qS)z(%s)r)r*r1rrrrq_sz8SchedulerPlugin._cgroup_ps_blacklist..z(?.z(?.z(?)_default_irq_smp_affinity_valuercpulist_unpack)r r;rr<r0rrr_default_irq_smp_affinityys  z)SchedulerPlugin._default_irq_smp_affinityrcCs*|rdS|r&|dk r&|jj|dk|_dS)Nr )rrVr7)r r;rr<r0rrr_perf_process_forks z"SchedulerPlugin._perf_process_forkcCs"|jj|}tjd||f|S)NzRead affinity '%s' of PID %d)rbrArir)r r9resrrrrs zSchedulerPlugin._get_affinitycCstjd||fy|jj||dSttfk r}zXt|dr`|jtjkr`tjd|n.|j |}|dksz|d krtj d|||fdSd}~XnXdS) Nz'Setting CPU affinity of PID %d to '%s'.Trz4Failed to set affinity of PID %d, the task vanished.rrfz,Failed to set affinity of PID %d to '%s': %sFr) rirrbrCrrrrrrr)r r9r rrCrrrrs  zSchedulerPlugin._set_affinitycCs"t|jt|}|rt|S|S)N)r intersectionr)r Z affinity1Z affinity2Z affinity3Zaffrrrrsz'SchedulerPlugin._get_intersect_affinityc s>fdd|D}jdkr.fdd|D}jdkrJfdd|D}tdd|D}x|D]}yj||}Wnbttfk r}zB|jtjks|jtjkrt j d|nt j d||fwbWYdd}~XnXj ||d d } | sqb|j kr |j |_| rbd ||krbj||d j|d qbWdS) Ncs(g|] }tjjj|dk r|qS)N)rrrY_get_stat_comm)r*r1)r rrrqs z9SchedulerPlugin._set_all_obj_affinity..rOcs(g|] }tjjj|dkr|qS)N)rrrZrE)r*r1)r rrrqs cs(g|] }tjjj|dkr|qS)N)rrr[_get_stat_cgroup)r*r1)r rrrqs cSsg|]}|j|fqSr)r9)r*r1rrrrqsz3Failed to get cmdline of PID %d, the task vanished.zARefusing to set affinity of PID %d, failed to get its cmdline: %sT)rrx)rZr[r.rrrrrrrirrrr{r_set_all_obj_affinityr2) r Zobjsr rxZpslZpsdr9rrrr)r rrGs6         z%SchedulerPlugin._set_all_obj_affinityc Cs(y|dStttfk r"dSXdS)NZcgroupsrO)rrr)r r&rrrrFsz SchedulerPlugin._get_stat_cgroupc Cs,y |ddStttfk r&dSXdS)NrrvrO)rrr)r r&rrrrEs zSchedulerPlugin._get_stat_commcCs`y&tj}|j|j|j|dWn4ttfk rZ}ztjd|WYdd}~XnXdS)NFzIerror applying tuning, cannot get information about running processes: %s) rrrrGr2rrrir)r r rrrrr_set_ps_affinitysz SchedulerPlugin._set_ps_affinitycCsyJ|jj|}tjd||fd|}t|d}|j|WdQRXdSttfk r}zLt|dr|j t j kr| rtjd|d Stj d|||fd SWYdd}~XnXdS) Nz&Setting SMP affinity of IRQ %s to '%s'z/proc/irq/%s/smp_affinitywrrz/Setting SMP affinity of IRQ %s is not supportedrfz0Failed to set SMP affinity of IRQ %s to '%s': %srrr) r cpulist2hexrirrwriterrrrZEIOr)r rPr Z restoring affinity_hexfilenamer#rrrr_set_irq_affinitys"   z!SchedulerPlugin._set_irq_affinitycCs|y>|jj|}tjd|tdd}|j|WdQRXWn8ttfk rv}ztjd||fWYdd}~XnXdS)Nz(Setting default SMP IRQ affinity to '%s'z/proc/irq/default_smp_affinityrIz2Failed to set default SMP IRQ affinity to '%s': %s) rrJrirrrKrrr)r r rLr#rrrr_set_default_irq_affinitys  z)SchedulerPlugin._set_default_irq_affinityc Cs"t}tj}x|jD]}y"||d}tjd||fWntk rTwYnX|j|||}t|t|krvq|j ||d}|dkr||j |<q|d kr|j j |qW|j jd}|j j|}|jdkr|j|||}n|jdkr|j}|jdkr|j|||_|jj|j|dS) Nr zRead affinity of IRQ '%s': '%s'Frrfz/proc/irq/default_smp_affinityrr>r)rr interruptsrrirrrrrNrrappendrrrr?rOrrzr`) r r irq_originalrrPrrrCZprev_affinity_hexrrr_set_all_irq_affinity s6        z%SchedulerPlugin._set_all_irq_affinitycCsn|jj|jd}|dkrdSx$|jjD]\}}|j||dq(W|jdkr\|j}|j||jj |jdS)NTr>) rzr4r`rr0rNr?rrOr~)r rRrPr rrr_restore_all_irq_affinity)s  z)SchedulerPlugin._restore_all_irq_affinitycCsFt|jt|}|r,tjtj||fntjtj|||f|S)N)rissubsetrir|rRr*rr+)r irq_descriptioncorrect_affinityr,rCrrr_verify_irq_affinity4s z$SchedulerPlugin._verify_irq_affinityc Cs|jj|jd}tj}d}x|jD]}||jkrR|rRd|}tjt j |q&y<||d}tj d||fd|} |j | ||sd}Wq&t k rw&Yq&Xq&W|jjd} |jj| }|jdkr|j d ||jd kr|n|j rd}|S) NTz-IRQ %s does not support changing SMP affinityr z#Read SMP affinity of IRQ '%s': '%s'zSMP affinity of IRQ %sFz/proc/irq/default_smp_affinityr>zdefault IRQ SMP affinityr)rzr4r`rrPrrrir|rRZ STR_VERIFY_PROFILE_VALUE_MISSINGrrXrrrrr?) r rWr0rRrrCrP descriptionr,rVZcurrent_affinity_hexrrr_verify_all_irq_affinity@s8     z(SchedulerPlugin._verify_all_irq_affinityr )r9r c Csd}d|_|dk rrt|jj|}t|j}|j|rRt||}|jj||_n |jj|j}tj d||f|sz|r|dkrdS|r|j r|j ||SdS|r|j r|j d|j } n|} |j| |j r|j|n|j r|jdS)NzJInvalid isolated_cores specified, '%s' does not match available cores '%s'Tz cgroup.%s)rrrr@r]rUrr)rirr_rZrr rHrSrT) r r;rr<r0r isolatedZpresentZstr_cpusZ ps_affinityrrr_isolated_cores_s6        zSchedulerPlugin._isolated_corescCsd|||f}|jj|}|r"|Sd||f}tjj|sv|dkrPd||f}nd|||f}d|}|jdkrvd|_||j|<|S)Nz%s_%s_%sz/proc/sys/kernel/%s_%srOz%s/%sz%s/%s/%sz/sys/kernel/debug/%sT)rXr4r)rexistsrW)r prefix namespaceknobrrrrr_get_sched_knob_paths     z$SchedulerPlugin._get_sched_knob_pathcCsJ|jj|j|||dd}|dkrFtjd||jrFtjdd|_|S)N)rzError reading '%s'zUThis may not work with Secure Boot or kernel_lockdown (this hint is logged only once)F)rrrbrirrW)r r_r`rar$rrr_get_sched_knobs zSchedulerPlugin._get_sched_knobcCsN|dkr dS|sJ|jj|j|||||r0tjgnddsJtjd||f|S)NF)rz Error writing value '%s' to '%s')rrrbrrrir)r r_r`rarsimremoverrr_set_sched_knobszSchedulerPlugin._set_sched_knobrcCs|jdddS)NrOr=min_granularity_ns)rc)r rrr_get_sched_min_granularity_nssz-SchedulerPlugin._get_sched_min_granularity_nscCs|jddd|||S)NrOr=rg)rf)r rrdrerrr_set_sched_min_granularity_nssz-SchedulerPlugin._set_sched_min_granularity_nsrcCs|jdddS)NrOr= latency_ns)rc)r rrr_get_sched_latency_nssz%SchedulerPlugin._get_sched_latency_nscCs|jddd|||S)NrOr=rj)rf)r rrdrerrr_set_sched_latency_nssz%SchedulerPlugin._set_sched_latency_nsrcCs|jdddS)NrOr=wakeup_granularity_ns)rc)r rrr _get_sched_wakeup_granularity_nssz0SchedulerPlugin._get_sched_wakeup_granularity_nscCs|jddd|||S)NrOr=rm)rf)r rrdrerrr _set_sched_wakeup_granularity_nssz0SchedulerPlugin._set_sched_wakeup_granularity_nsrcCs|jdddS)NrOr=tunable_scaling)rc)r rrr_get_sched_tunable_scalingsz*SchedulerPlugin._get_sched_tunable_scalingcCs|jddd|||S)NrOr=rp)rf)r rrdrerrr_set_sched_tunable_scalingsz*SchedulerPlugin._set_sched_tunable_scalingrcCs|jdddS)NrOr=migration_cost_ns)rc)r rrr_get_sched_migration_cost_nssz,SchedulerPlugin._get_sched_migration_cost_nscCs|jddd|||S)NrOr=rs)rf)r rrdrerrr_set_sched_migration_cost_nssz,SchedulerPlugin._set_sched_migration_cost_nsrcCs|jdddS)NrOr= nr_migrate)rc)r rrr_get_sched_nr_migratesz%SchedulerPlugin._get_sched_nr_migratecCs|jddd|||S)NrOr=rv)rf)r rrdrerrr_set_sched_nr_migratesz%SchedulerPlugin._set_sched_nr_migratercCs|jdddS)Nr=numa_balancing scan_delay_ms)rc)r rrr!_get_numa_balancing_scan_delay_mssz1SchedulerPlugin._get_numa_balancing_scan_delay_mscCs|jddd|||S)Nr=ryrz)rf)r rrdrerrr!_set_numa_balancing_scan_delay_mssz1SchedulerPlugin._set_numa_balancing_scan_delay_msrcCs|jdddS)Nr=ryscan_period_min_ms)rc)r rrr&_get_numa_balancing_scan_period_min_mssz6SchedulerPlugin._get_numa_balancing_scan_period_min_mscCs|jddd|||S)Nr=ryr})rf)r rrdrerrr&_set_numa_balancing_scan_period_min_mssz6SchedulerPlugin._set_numa_balancing_scan_period_min_msrcCs|jdddS)Nr=ryscan_period_max_ms)rc)r rrr&_get_numa_balancing_scan_period_max_mssz6SchedulerPlugin._get_numa_balancing_scan_period_max_mscCs|jddd|||S)Nr=ryr)rf)r rrdrerrr&_set_numa_balancing_scan_period_max_mssz6SchedulerPlugin._set_numa_balancing_scan_period_max_msrcCs|jdddS)Nr=ry scan_size_mb)rc)r rrr _get_numa_balancing_scan_size_mbsz0SchedulerPlugin._get_numa_balancing_scan_size_mbcCs|jddd|||S)Nr=ryr)rf)r rrdrerrr _set_numa_balancing_scan_size_mbsz0SchedulerPlugin._set_numa_balancing_scan_size_mb)F)F)F)F)F)brrrrKrrjrr classmethodrrmrrrrrrrrrrrrrrrrrrrrrrrrr r r rr}r%r&rRZ ROLLBACK_SOFTr'r-r.r/r2r3r Zcommand_customr=rYrZr_rArBrrrrGrFrErHrNrOrSrTrXrZr]rbrcrfZ command_getrhZ command_setrirkrlrnrorqrrrtrurwrxr{r|r~rrrrr __classcell__rr)rerrNs(  ?             <      "    $ rN) rOrZ decoratorsZ tuned.logsZtunedr subprocessrr\r4Z tuned.constsrRrZtuned.utils.commandsrrr)rrhrrcrMZlogsr4riobjectrrrrLZPluginrNrrrrs0     /PK$2]GІ/plugins/__pycache__/plugin_video.cpython-36.pycnu[3 9sz3VideoPlugin._get_device_objects..r)r Zdevicesr)r r_get_device_objects8szVideoPlugin._get_device_objectscCsddiS)Nradeon_powersaver)r rrr_get_config_options;szVideoPlugin._get_config_optionscCsd|_d|_dS)NFT)Z_has_dynamic_tuningZ_has_static_tuning)r instancerrr_instance_initAszVideoPlugin._instance_initcCsdS)Nr)r rrrr_instance_cleanupEszVideoPlugin._instance_cleanupcCsd|d|d|dS)Nz%/sys/class/drm/%s/device/power_methodz&/sys/class/drm/%s/device/power_profilez(/sys/class/drm/%s/device/power_dpm_state)methodprofile dpm_stater)r r rrr_radeon_powersave_filesHsz#VideoPlugin._radeon_powersave_filesrT)Z per_devicec Csl|j|}ttjdd|j}tjj|dsF|sFtj d|dSx|D]}|dkr|s|j j |dd |rzt j gnd d r|j j |d ||rt j gnd d r|SqN|d kr|s|j j |dd |rt j gnd d rd SqN|dkrP|sd|tdd}|j j |dd|rt j gnd d rd|j j |d||r@t j gnd d rd|SqN|s`tj ddSqNWdS)Nz#(\s*:\s*)|(\s+)|(\s*;\s*)|(\s*,\s*) rz)radeon_powersave is not supported on '%s'defaultautolowmidhighrF)no_errordynpm dpm-battery dpm-balanceddpm-performancezdpm-dpmrz$Invalid option for radeon_powersave.)rr r!r"r#)r&r'r()rstrresubsplitospathexistslogwarnr Z write_to_fileerrnoENOENTlen) r valuer Zsimremove sys_filesZvavstaterrr_set_radeon_powersaveOs>   z!VideoPlugin._set_radeon_powersaveFcCsr|j|}|jj|d|dj}|dkr>|jj|djS|dkrJ|S|dkrjd|jj|djSdSdS)Nr)r$rr%r)zdpm-r)rr Z read_filestrip)r r Zignore_missingr8rrrr_get_radeon_powersavess z!VideoPlugin._get_radeon_powersaveN)F)__name__ __module__ __qualname____doc__rr classmethodrrrrZ command_setr;Z command_getr=rrrrr s   $r)rZ decoratorsZ tuned.logsZtunedZtuned.utils.commandsrr.r3r+Zlogsgetr1ZPluginrrrrrs   PK$2]]1plugins/__pycache__/plugin_systemd.cpython-36.pycnu[3 tjd|d|tjd}|dk r>|jdkr>|jdSdS)Nz^\s*z \s*=\s*(.*)$)flagsr)research MULTILINE lastindexgroup)rconfkeymorrr _get_keyval7s  zSystemdPlugin._get_keyvalc Cs~tjd|ddt||tjd\}}|dkrzy|ddkrF|d7}Wntk r\YnX||dt|d7}|S|S) Nz^(\s*z\s*=).*$z\g<1>)rr =)rsubnstrr IndexError)rr"r#valZconf_newZnsubsrrr _add_keyval?s(  zSystemdPlugin._add_keyvalcCstjd|dd|tjdS)Nz^\s*z\s*=.*\n)r)rsubr)rr"r#rrr_del_keyKszSystemdPlugin._del_keycCs,|jjtjdd}|dkr(tjddS|S)N)err_retz(error reading systemd configuration file)r read_filer r logerror)rZsystemd_system_confrrr_read_systemd_system_confNs  z'SystemdPlugin._read_systemd_system_confcCsptjtj}|jj||s8tjd|jj|dddS|jj|tjsltjdtj|jj|dddSdS)Nz(error writing systemd configuration fileT)no_errorFz/error replacing systemd configuration file '%s') r r ZTMP_FILE_SUFFIXr write_to_filer3r4unlinkrename)rr"Ztmpfilerrr_write_systemd_system_confUs  z(SystemdPlugin._write_systemd_system_confcCstjjtj|jS)N)rr joinr ZPERSISTENT_STORAGE_DIRname)rrrr_get_storage_filenamecsz#SystemdPlugin._get_storage_filenamecCsl|j}|dk rh|j}|jj|ddd}|jj||dkrN|j|tj}n|j|tj|}|j |dS)NT)r1r6) r5r=rr2r8r0r SYSTEMD_CPUAFFINITY_VARr-r:)rr"fnamecpu_affinity_savedrrr_remove_systemd_tuningfs z$SystemdPlugin._remove_systemd_tuningcCs0|tjkr,tjdtj|jtjddS)Nz6removing '%s' systemd tuning previously added by TuneDz[you may need to manualy run 'dracut -f' to update the systemd configuration in initrd image)r Z ROLLBACK_FULLr3infor>rAZconsole)rrZrollbackrrr_instance_unapply_staticrs z&SystemdPlugin._instance_unapply_staticc Cs<|dkr dSdjdd|jjtjddtjdd|DS)Nr. css|]}t|VqdS)N)r*).0vrrr |sz8SystemdPlugin._cpulist_convert_unpack..z\s+,z,\s+)r;rcpulist_unpackrr/)rZcpulistrrr_cpulist_convert_unpackysz%SystemdPlugin._cpulist_convert_unpackrF)Z per_devicec Csd}d}|jj|jj|jj|}djdd|jj|D}|j} | dk rh|j| t j }|j |}|r||j d|||S|r|j } |jj| ddd} |dk r| dkr||kr|jj| |ddtjdt j |t jf|j|j| t j |dS) NrDcss|]}t|VqdS)N)r*)rErFrrrrGsz)SystemdPlugin._cmdline..rT)r1r6)Zmakedirz setting '%s' to '%s' in the '%s')rZunescapeZ _variablesexpandZunquoter;rIr5r%r r>rJZ _verify_valuer=r2r7r3rBr r:r-) rZenablingvalueZverifyZignore_missingZ conf_affinityZconf_affinity_unpackedrFZ v_unpackedr"r?r@rrr_cmdline~s" zSystemdPlugin._cmdline)__name__ __module__ __qualname____doc__rrr classmethodrr%r-r0r5r:r=rAr Z ROLLBACK_SOFTrCrJZcommand_customrM __classcell__rr)rrr s    r)r.rZ decoratorsZ tuned.logsZtunedrZtuned.utils.commandsrZ tuned.constsr rrZlogsgetr3ZPluginrrrrrs     PK$2]SśAA4plugins/__pycache__/plugin_disk.cpython-36.opt-1.pycnu[3 jB@sjddlZddlmZddlTddlZddljZddlm Z ddl Z ddl Z ej j ZGdddejZdS)N)hotplug)*)commandscseZdZdZfddZfddZddZdd Zed d Z d d Z ddZ fddZ fddZ fddZeddZeddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zfd,d-Zd.d/ZdZd1d2Zd3d4Zed5d6d7d8d9Ze d5d[d;d<Z!ed=d6d7d>d?Z"e d=d\d@dAZ#edBd6d7dCdDZ$e dBd]dEdFZ%dGdHZ&dIdJZ'edKd6d7dLdMZ(e dKd^dNdOZ)e*dPd6d7dQdRZ+dSdTZ,edUd6d7dVdWZ-e dUd_dXdYZ.Z/S)` DiskPlugina `disk`:: Plug-in for tuning various block device options. This plug-in can also dynamically change the advanced power management and spindown timeout setting for a drive according to the current drive utilization. The dynamic tuning is controlled by the [option]`dynamic` and the global [option]`dynamic_tuning` option in `tuned-main.conf`. + The disk plug-in operates on all supported block devices unless a comma separated list of [option]`devices` is passed to it. + .Operate only on the sda block device ==== ---- [disk] # Comma separated list of devices, all devices if commented out. devices=sda ---- ==== + The [option]`elevator` option sets the Linux I/O scheduler. + .Use the bfq I/O scheduler on xvda block device ==== ---- [disk] device=xvda elevator=bfq ---- ==== + The [option]`scheduler_quantum` option only applies to the CFQ I/O scheduler. It defines the number of I/O requests that CFQ sends to one device at one time, essentially limiting queue depth. The default value is 8 requests. The device being used may support greater queue depth, but increasing the value of quantum will also increase latency, especially for large sequential write work loads. + The [option]`apm` option sets the Advanced Power Management feature on drives that support it. It corresponds to using the `-B` option of the `hdparm` utility. The [option]`spindown` option puts the drive into idle (low-power) mode, and also sets the standby (spindown) timeout for the drive. It corresponds to using `-S` option of the `hdparm` utility. + .Use a medium-agressive power management with spindown ==== ---- [disk] apm=128 spindown=6 ---- ==== + The [option]`readahead` option controls how much extra data the operating system reads from disk when performing sequential I/O operations. Increasing the `readahead` value might improve performance in application environments where sequential reading of large files takes place. The default unit for readahead is KiB. This can be adjusted to sectors by specifying the suffix 's'. If the suffix is specified, there must be at least one space between the number and suffix (for example, `readahead=8192 s`). + .Set the `readahead` to 4MB unless already set to a higher value ==== ---- [disk] readahead=>4096 ---- ==== The disk readahead value can be multiplied by the constant specified by the [option]`readahead_multiply` option. c srtt|j||ddddddddd d d d g |_d dddddddddd dg |_t|j|_d|_d|_t |_ dS)N}iUF7rnZ<g{Gz?) superr__init__ _power_levels_spindown_levelslen_levels _level_steps_load_smallestr_cmd)selfargskwargs) __class__!/usr/lib/python3.6/plugin_disk.pyrXs zDiskPlugin.__init__csdtt|jd|_d|_t|_t|_x,|j j dD]}|j |r8|jj |j q8Wt|_dS)NTblock)rr _init_devicesZ_devices_supported _use_hdparmsetZ _free_devicesdict_hdparm_apm_device_support_hardware_inventoryZ get_devices_device_is_supportedaddZsys_nameZ_assigned_devices)r'device)r*r+r,r.bs zDiskPlugin._init_devicescsfdd|DS)Ncsg|]}jjd|qS)r-)r3Z get_device).0x)r'r+r, nsz2DiskPlugin._get_device_objects..r+)r'Zdevicesr+)r'r,_get_device_objectsmszDiskPlugin._get_device_objectscCs|js dS||jkr|j|S|jjddd|gtjgdd\}}}|tj krdtjdd|_dS|rtjd|tj d ||fd|j|<dSd |krtjd |d|j|<dSd|j|<dS) NFhdparmz-Cz/dev/%sT) no_errorsZ return_errz4hdparm command not found, ignoring for other devicesz#Device '%s' not supported by hdparmz(rc: %s, msg: '%s')unknownz3Driver for device '%s' does not support apm command) r/r2r&executeerrnoENOENTlogwarninfodebug)r'r6rcoutZerr_msgr+r+r,_is_hdparm_apm_supportedps*       z#DiskPlugin._is_hdparm_apm_supportedcCs2|jdko0|jjdddko0|jdkp0|jjdkS) NdiskZ removable0scsivirtioxennvme)rJrKrLrM)Z device_typeZ attributesgetparentZ subsystem)clsr6r+r+r,r4s  zDiskPlugin._device_is_supportedcCs|jj|d|jdS)Nr-)r3Z subscribe_hardware_events_callback)r'r+r+r,_hardware_events_initsz DiskPlugin._hardware_events_initcCs|jj|dS)N)r3Z unsubscribe)r'r+r+r,_hardware_events_cleanupsz#DiskPlugin._hardware_events_cleanupcs(|j|s|dkr$tt|j||dS)Nremove)r4rrrQ)r'Zeventr6)r*r+r,rQsz$DiskPlugin._hardware_events_callbackcs,|jdk r|jj|tt|j||dS)N) _load_monitorZ add_devicerr_added_device_apply_tuning)r'instance device_name)r*r+r,rVs  z%DiskPlugin._added_device_apply_tuningcs,|jdk r|jj|tt|j||dS)N)rUZ remove_devicerr_removed_device_unapply_tuning)r'rWrX)r*r+r,rYs  z)DiskPlugin._removed_device_unapply_tuningcCsddddddddS)NT)dynamicelevatorapmspindown readaheadreadahead_multiplyscheduler_quantumr+)rPr+r+r,_get_config_optionsszDiskPlugin._get_config_optionscCsddgS)Nr\r]r+)rPr+r+r,#_get_config_options_used_by_dynamicsz.DiskPlugin._get_config_options_used_by_dynamiccCsdd|_d|_d|_|j|jdrTd|_|jjd|j|_ i|_ i|_ i|_ i|_ n d|_d|_ dS)NTrrZrHF)Z_has_static_tuning _apm_errcnt_spindown_errcntZ _option_boolZoptionsZ_has_dynamic_tuning_monitors_repositoryZcreateZassigned_devicesrUZ _device_idle_stats_idle_spindown_change_delayed)r'rWr+r+r,_instance_inits zDiskPlugin._instance_initcCs"|jdk r|jj|jd|_dS)N)rUredelete)r'rWr+r+r,_instance_cleanups zDiskPlugin._instance_cleanupcCs|rd}|j}n d}|j}|tjkr(dS|dkr6d}nL|tj krbtjd|_|_tjddS|d7}|tjkrtjd||r||_n||_dS)Nr]r\rrzIhdparm command not found, ignoring future set_apm / set_spindown commandsz5disabling set_%s command: too many consecutive errors) rdrcconstsERROR_THRESHOLDr?r@rArBrC)r'rEr]sZcntr+r+r,_update_errcnts&    zDiskPlugin._update_errcntcCsNtjd||jjdd|d|gtjgd\}}|j|dd|j|<dS)Nzchanging spindown to %dr;z-S%dz/dev/%s)r<TF)rArDr&r>r?r@rorh)r'rWr6new_spindown_levelrErFr+r+r,_change_spindowns& zDiskPlugin._change_spindowncCs2|jjddd|gtjgd\}}d|ko0d|kS)Nr;z-Cz/dev/%s)r<ZstandbyZsleeping)r&r>r?r@)r'r6rErFr+r+r,_drive_spinnings"zDiskPlugin._drive_spinningc Cs(|j|sdS|jj|}|dkr&dS||jkr<|j|||j||||j|||j|}|j|}|dd|jkr|d|j kr|d|j krd}n.|ddkr|ddks|ddkrd}nd}|dkr|d|7<|j |d}|j |d}t j d|d|jtjkrb|j| rT|dkrTt j d|d|j|<n|j||||jtjkrt j d ||jjd d |d |gtjgd \} } |j| dn4|j|r|j|r|j |d}|j|||t j d||d|dft j d||d|d|dfdS)Nlevelrreadwriterztuning level changed to %dz;delaying spindown change to %d, drive has already spun downTzchanging APM_level to %dr;z-B%dz/dev/%s)r<Fz %s load: read %0.2f, write %0.2fz$%s idle: read %d, write %d, level %d)rGrUZget_device_loadrf_init_stats_and_idle _update_stats _update_idlergr#r$r r!rArDrdrlrmrrrhrqrcr&r>r?r@ro) r'rWr6loadZstatsZidleZ level_changeZnew_power_levelrprErFr+r+r,_instance_update_dynamicsF       .$  &z#DiskPlugin._instance_update_dynamiccCsDddgddgddgd|j|<dddd|j|<d|j|<dS)N rr)newoldmax)rsrtruF)rfrgrh)r'rWr6r+r+r,rw!s$zDiskPlugin._init_stats_and_idlecCs|j|d|j|d<}||j|d<ddt||D}||j|d<|j|d}ddt||D}||j|d<t|dt|d|j|d <t|d t|d |j|d <dS) Nr}r~cSsg|]}|d|dqS)rrr+)r7Znew_oldr+r+r,r9+sz,DiskPlugin._update_stats..diffrcSsg|] }t|qSr+)r)r7Zpairr+r+r,r90srrtru)rfzipfloat)r'rWr6Znew_loadZold_loadrZ old_max_loadZmax_loadr+r+r,rx&s"zDiskPlugin._update_statscCsLxFdD]>}|j|||jkr6|j||d7<qd|j||<qWdS)Nrtrurr)rtru)rfr%rg)r'rWr6Z operationr+r+r,ry7s zDiskPlugin._update_idlecs0|j|stjd|ntt|j||dS)Nzr?r@ro)r'rr6rrTrErFr+r+r,_set_apmds  ( zDiskPlugin._set_apmc Cs|j|s |stjd|dSd}d}|jjddd|gtjgd\}}|tj krZdS|dkrhd}n@tjd |tj }|ryt |j d }Wnt k rd}YnX|rtj d ||S) Nz+apm option is not supported for device '%s'Fr;z-Bz/dev/)r<rTz .*=\s*(\d+).*rz2could not get current APM settings for device '%s')rGrArCr&r>r?r@rematchSintgroup ValueErrorerror)r'r6rrerrrErFmr+r+r,_get_apmts( "  zDiskPlugin._get_apmr]cCs||j|s(|s tjd|dSt|S|jtjkrt|sl|jjddt|d|gt j gd\}}|j |dt|SdSdS)Nz0spindown option is not supported for device '%s'r;z-Sz/dev/)r<T) rGrArCrrdrlrmr&r>r?r@ro)r'rr6rrTrErFr+r+r, _set_spindowns  ( zDiskPlugin._set_spindowncCs$|j|s |stjd|dSdS)Nz0spindown option is not supported for device '%s')rGrArC)r'r6rr+r+r, _get_spindowns  zDiskPlugin._get_spindowncCs |j|dS)Nzqueue/read_ahead_kb)r)r'r6r+r+r,_readahead_fileszDiskPlugin._readahead_filec Cs^t|jdd}yt|d}Wntk r4dSXt|dkrZ|dddkrZ|d}|S)Nrrrn)rsplitrrr")r'rvalvr+r+r, _parse_raszDiskPlugin._parse_rar^cCsZ|j|}|j|}|dkr0tjd||fn&|sV|jj|d||rNtjgndd|S)Nz,Invalid readahead value '%s' for device '%s'z%dF)r)rrrArr&rr?r@)r'rr6rrTrrr+r+r,_set_readaheads  zDiskPlugin._set_readaheadcCs6|j|}|jj||dj}t|dkr.dSt|S)N)rr)rr&rstripr"r)r'r6rrrr+r+r,_get_readaheads   zDiskPlugin._get_readaheadr_c Cs|rdS|jd|d}|r^|j|}|dkr0dStt||}|jj|||j||dn2|jj|}|dkrvdS|j||d|jj|dS)Nr_)Z command_namerXF) Z _storage_keyrrrZ_storager0rrNZunset) r'ZenablingZ multiplierr6ZverifyrZ storage_keyZ old_readaheadZ new_readaheadr+r+r,_multiply_readaheads"  zDiskPlugin._multiply_readaheadcCs |j|dS)Nzqueue/iosched/quantum)r)r'r6r+r+r,_scheduler_quantum_filesz"DiskPlugin._scheduler_quantum_filer`cCs8|j|}|s4|jj|dt||r,tjgndd|S)Nz%dF)r)rr&rrr?r@)r'rr6rrTrr+r+r,_set_scheduler_quantums  z!DiskPlugin._set_scheduler_quantumcCsH|j|}|jj||dj}t|dkr@|sdisk_scheduler_quantum option is not supported for device '%s')rr&rrr"rArCr)r'r6rrrr+r+r,_get_scheduler_quantums  z!DiskPlugin._get_scheduler_quantum)r)F)F)F)F)F)0__name__ __module__ __qualname____doc__rr.r:rG classmethodr4rRrSrQrVrYrarbrirkrorqrrr{rwrxryrrrrZ command_setrZ command_getrrrrrrrrrZcommand_customrrrr __classcell__r+r+)r*r,r sZJ      2        r)r?rZ decoratorsZ tuned.logsZtunedZ tuned.constsrlZtuned.utils.commandsrrrZlogsrNrAZPluginrr+r+r+r,s    PK$2]ј 9plugins/__pycache__/plugin_eeepc_she.cpython-36.opt-1.pycnu[3 s    PK$2]r7plugins/__pycache__/plugin_modules.cpython-36.opt-1.pycnu[3 rrZ decoratorsZ tuned.logsZtuned subprocessZtuned.utils.commandsrZ tuned.constsr-ZlogsgetrZPluginrrrrrs    PK$2]5;1plugins/__pycache__/__init__.cpython-36.opt-1.pycnu[3 sPK$2]GІ5plugins/__pycache__/plugin_video.cpython-36.opt-1.pycnu[3 9sz3VideoPlugin._get_device_objects..r)r Zdevicesr)r r_get_device_objects8szVideoPlugin._get_device_objectscCsddiS)Nradeon_powersaver)r rrr_get_config_options;szVideoPlugin._get_config_optionscCsd|_d|_dS)NFT)Z_has_dynamic_tuningZ_has_static_tuning)r instancerrr_instance_initAszVideoPlugin._instance_initcCsdS)Nr)r rrrr_instance_cleanupEszVideoPlugin._instance_cleanupcCsd|d|d|dS)Nz%/sys/class/drm/%s/device/power_methodz&/sys/class/drm/%s/device/power_profilez(/sys/class/drm/%s/device/power_dpm_state)methodprofile dpm_stater)r r rrr_radeon_powersave_filesHsz#VideoPlugin._radeon_powersave_filesrT)Z per_devicec Csl|j|}ttjdd|j}tjj|dsF|sFtj d|dSx|D]}|dkr|s|j j |dd |rzt j gnd d r|j j |d ||rt j gnd d r|SqN|d kr|s|j j |dd |rt j gnd d rd SqN|dkrP|sd|tdd}|j j |dd|rt j gnd d rd|j j |d||r@t j gnd d rd|SqN|s`tj ddSqNWdS)Nz#(\s*:\s*)|(\s+)|(\s*;\s*)|(\s*,\s*) rz)radeon_powersave is not supported on '%s'defaultautolowmidhighrF)no_errordynpm dpm-battery dpm-balanceddpm-performancezdpm-dpmrz$Invalid option for radeon_powersave.)rr r!r"r#)r&r'r()rstrresubsplitospathexistslogwarnr Z write_to_fileerrnoENOENTlen) r valuer Zsimremove sys_filesZvavstaterrr_set_radeon_powersaveOs>   z!VideoPlugin._set_radeon_powersaveFcCsr|j|}|jj|d|dj}|dkr>|jj|djS|dkrJ|S|dkrjd|jj|djSdSdS)Nr)r$rr%r)zdpm-r)rr Z read_filestrip)r r Zignore_missingr8rrrr_get_radeon_powersavess z!VideoPlugin._get_radeon_powersaveN)F)__name__ __module__ __qualname____doc__rr classmethodrrrrZ command_setr;Z command_getr=rrrrr s   $r)rZ decoratorsZ tuned.logsZtunedZtuned.utils.commandsrr.r3r+Zlogsgetr1ZPluginrrrrrs   PK$2]* nn2plugins/__pycache__/plugin_vm.cpython-36.opt-1.pycnu[3 tj|||r6tjgndd|S|sPt j ddSdS)NdefragF)rzJOption 'transparent_hugepage.defrag' is not supported on current hardware.) rrr rrrr!r"r#rr)r r$r%r&r'r r r _set_transparent_hugepage_defragfs  z)VMPlugin._set_transparent_hugepage_defragcCs6tjj|jd}tjj|r.tjtj|SdSdS)Nr-)rrr rrrr*r)r r'r r r _get_transparent_hugepage_defragss z)VMPlugin._get_transparent_hugepage_defragN)__name__ __module__ __qualname____doc__ classmethodr rrrZ command_setr(r)Z command_getr+r,r.r/r r r r rs    r)rZ decoratorsZ tuned.logsZtunedrr"structZglobZtuned.utils.commandsrZlogsgetrrZPluginrr r r r s   PK$2][Vyaa:plugins/__pycache__/plugin_bootloader.cpython-36.opt-1.pycnu[3 Z%d?d@Z&e'dAdBdCZ(e'dDdEdFZ)e'dGdHdIZ*e'dJdKdLdMdNdOZ+e'dPdKdLdMdQdRZ,e'dSdKdLdMdTdUZ-e'dVdKdLdMdWdXZ.dYdZZ/Z0S)\BootloaderPlugina `bootloader`:: Adds options to the kernel command line. This plug-in supports the GRUB 2 boot loader and the Boot Loader Specification (BLS). + NOTE: *TuneD* will not remove or replace kernel command line parameters added via other methods like *grubby*. *TuneD* will manage the kernel command line parameters added via *TuneD*. Please refer to your platform bootloader documentation about how to identify and manage kernel command line parameters set outside of *TuneD*. + Customized non-standard location of the GRUB 2 configuration file can be specified by the [option]`grub2_cfg_file` option. + The kernel options are added to the current GRUB configuration and its templates. Reboot the system for the kernel option to take effect. + Switching to another profile or manually stopping the `tuned` service removes the additional options. If you shut down or reboot the system, the kernel options persist in the [filename]`grub.cfg` file and grub environment files. + The kernel options can be specified by the following syntax: + [subs="+quotes,+macros"] ---- cmdline__suffix__=__arg1__ __arg2__ ... __argN__ ---- + Or with an alternative, but equivalent syntax: + [subs="+quotes,+macros"] ---- cmdline__suffix__=+__arg1__ __arg2__ ... __argN__ ---- + Where __suffix__ can be arbitrary (even empty) alphanumeric string which should be unique across all loaded profiles. It is recommended to use the profile name as the __suffix__ (for example, [option]`cmdline_my_profile`). If there are multiple [option]`cmdline` options with the same suffix, during the profile load/merge the value which was assigned previously will be used. This is the same behavior as any other plug-in options. The final kernel command line is constructed by concatenating all the resulting [option]`cmdline` options. + It is also possible to remove kernel options by the following syntax: + [subs="+quotes,+macros"] ---- cmdline__suffix__=-__arg1__ __arg2__ ... __argN__ ---- + Such kernel options will not be concatenated and thus removed during the final kernel command line construction. + .Modifying the kernel command line ==== For example, to add the [option]`quiet` kernel option to a *TuneD* profile, include the following lines in the [filename]`tuned.conf` file: ---- [bootloader] cmdline_my_profile=+quiet ---- An example of a custom profile `my_profile` that adds the [option]`isolcpus=2` option to the kernel command line: ---- [bootloader] cmdline_my_profile=isolcpus=2 ---- An example of a custom profile `my_profile` that removes the [option]`rhgb quiet` options from the kernel command line (if previously added by *TuneD*): ---- [bootloader] cmdline_my_profile=-rhgb quiet ---- ==== + .Modifying the kernel command line, example with inheritance ==== For example, to add the [option]`rhgb quiet` kernel options to a *TuneD* profile `profile_1`: ---- [bootloader] cmdline_profile_1=+rhgb quiet ---- In the child profile `profile_2` drop the [option]`quiet` option from the kernel command line: ---- [main] include=profile_1 [bootloader] cmdline_profile_2=-quiet ---- The final kernel command line will be [option]`rhgb`. In case the same [option]`cmdline` suffix as in the `profile_1` is used: ---- [main] include=profile_1 [bootloader] cmdline_profile_1=-quiet ---- It will result in the empty kernel command line because the merge executes and the [option]`cmdline_profile_1` gets redefined to just [option]`-quiet`. Thus there is nothing to remove in the final kernel command line processing. ==== + The [option]`initrd_add_img=IMAGE` adds an initrd overlay file `IMAGE`. If the `IMAGE` file name begins with '/', the absolute path is used. Otherwise, the current profile directory is used as the base directory for the `IMAGE`. + The [option]`initrd_add_dir=DIR` creates an initrd image from the directory `DIR` and adds the resulting image as an overlay. If the `DIR` directory name begins with '/', the absolute path is used. Otherwise, the current profile directory is used as the base directory for the `DIR`. + The [option]`initrd_dst_img=PATHNAME` sets the name and location of the resulting initrd image. Typically, it is not necessary to use this option. By default, the location of initrd images is `/boot` and the name of the image is taken as the basename of `IMAGE` or `DIR`. This can be overridden by setting [option]`initrd_dst_img`. + The [option]`initrd_remove_dir=VALUE` removes the source directory from which the initrd image was built if `VALUE` is true. Only 'y', 'yes', 't', 'true' and '1' (case insensitive) are accepted as true values for this option. Other values are interpreted as false. + .Adding an overlay initrd image ==== ---- [bootloader] initrd_remove_dir=True initrd_add_dir=/tmp/tuned-initrd.img ---- This creates an initrd image from the `/tmp/tuned-initrd.img` directory and and then removes the `tuned-initrd.img` directory from `/tmp`. ==== + The [option]`skip_grub_config=VALUE` does not change grub configuration if `VALUE` is true. However, [option]`cmdline` options are still processed, and the result is used to verify the current cmdline. Only 'y', 'yes', 't', 'true' and '1' (case insensitive) are accepted as true values for this option. Other values are interpreted as false. + .Do not change grub configuration ==== ---- [bootloader] skip_grub_config=True cmdline=+systemd.cpu_affinity=1 ---- ==== cs6tjjtjstjdtt|j ||t |_ dS)Nz4Required GRUB2 template not found, disabling plugin.) ospathisfileconstsZGRUB2_TUNED_TEMPLATE_PATHrZNotSupportedPluginExceptionsuperr__init__r_cmd)selfargskwargs) __class__'/usr/lib/python3.6/plugin_bootloader.pyrs zBootloaderPlugin.__init__cCsVd|_d|_d|_d|_d|_d|_d|_d|_|j|_ |j |_ |j dk |_ dS)NFT)Z_has_dynamic_tuningZ_has_static_tuningupdate_grub2_cfg_skip_grub_config_val_initrd_remove_dir_initrd_dst_img_val _cmdline_val _initrd_val_get_grub2_cfg_files_grub2_cfg_file_names _bls_enabled_bls_rpm_ostree_status _rpm_ostree)rinstancerrr_instance_inits  zBootloaderPlugin._instance_initcCsdS)Nr)rr#rrr_instance_cleanupsz"BootloaderPlugin._instance_cleanupcCsddddddddS)N)grub2_cfg_fileinitrd_dst_imginitrd_add_imginitrd_add_dirinitrd_remove_dircmdlineskip_grub_configr)clsrrr_get_config_optionssz$BootloaderPlugin._get_config_optionsrcCs`i}|j}xN|jD]B}||kr|jdd}|j|dgjt|dkrR|dndqW|S)z Returns dict created from options e.g.: _options_to_dict("A=A A=B A B=A C=A", "A=B B=A B=B") returns {'A': ['A', None], 'C': ['A']} =rrN)split setdefaultappendlen)optionsZomitdoZarrrrr_options_to_dicts .z!BootloaderPlugin._options_to_dictcCsdjdd|jDS)N cSs2g|]*\}}|D]}|dk r(|d|n|qqS)Nr/r).0kvZv1rrr sz5BootloaderPlugin._dict_to_options..)joinitems)r5rrr_dict_to_optionssz!BootloaderPlugin._dict_to_optionscCsr|jjddgdd\}}}tjd||f|dkr8dS|j}t|dksX|dd krjtjd |dS|d S) zW Returns status of rpm-ostree transactions or None if not run on rpm-ostree system z rpm-ostreeZstatusT) return_errz.rpm-ostree status output stdout: %s stderr: %srNzState:z2Exceptional format of rpm-ostree status result: %sr)rexecutelogdebugr0r3warn)rrcouterrZsplitedrrrr!sz#BootloaderPlugin._rpm_ostree_statuscCsFd}d}x(t|D]}|jdkr&dSt|qW|jdkrBdSdS)N g?ZidleTF)ranger!r)rZ sleep_cyclesZ sleep_secsirrr_wait_till_idles   z BootloaderPlugin._wait_till_idlecs|jjddgdd\}}}tjd||f|dkr8dS|j|}|jsXtjddSi}|j|j}x8|j D],\} x| D]} |j | qW| |<qtWi} |j|j} x|j D]~\} |j r$tjd |f|j gj ||j fd d |Dg|<|j gj | | | <qW| |krdtjd | || |fStjd | |f|jjddgdd | Ddd |Ddd\}} }|dkrtjd||j|ddfS|| |fSdS)z Method for appending or deleting rpm-ostree karg returns None if rpm-ostree not present or is run on not ostree system or tuple with new kargs, appended kargs and deleted kargs z rpm-ostreekargsT)r@z'rpm-ostree output stdout: %s stderr: %srNzCannot wait for transaction endz)adding rpm-ostree kargs %s: %s for deletecs$g|]}|dk rd|nqS)Nr/r)r9r;)r:rrr<.sz6BootloaderPlugin._rpm_ostree_kargs..z3skipping rpm-ostree kargs - append == deleting (%s)z2rpm-ostree kargs - appending: '%s'; deleting: '%s'cSsg|] }d|qS)z --append=%sr)r9r;rrrr<9scSsg|] }d|qS)z --delete=%sr)r9r;rrrr<:sz-Something went wrong with rpm-ostree kargs %s)NNN)NNN)rrBrCrDr7rLerrorr?r0r>removegetr1extendinfo)rr2deleterFrGrHrMdeletedZ delete_paramsvalr;appendedZ append_params_r)r:r_rpm_ostree_kargs sF         z"BootloaderPlugin._rpm_ostree_kargsc CsV|jj}g}xR|D]J}t|jdr4|j|q||krJ||||<qtjd||jjfqWd}x|D]}||}|dksn|dkrqn|d}|dd}|ddj } |dks|d kr|dkr| dkr|d | 7}qn|d kr(| dkr4x@| j D]&} t j | } t j d | d d|}qWqn|d |7}qnW|j }|dkrR||d<|S)zSMerge provided options with plugin default options and merge all cmdline.* options.r+z$Unknown option '%s' for plugin '%s'.rNrrrA+\-r8z(\A|\s)z (?=\Z|\s))rZrYr[)r.copystr startswithr2rCrEr__name__stripr0reescapesub) rr4Z effectiveZ cmdline_keyskeyr+rUopZop1valspZregexrrr_get_effective_optionsAs:         z'BootloaderPlugin._get_effective_optionscCs.g}x$tjD]}tjj|r |j|q W|S)N)r ZGRUB2_CFG_FILESr r existsr2)rZ cfg_filesfrrrrcs   z%BootloaderPlugin._get_grub2_cfg_filescCsH|jjtjdd}t|dkr2tjdtjdStjd|tj ddk S)NT)no_errorrzcannot read '%s'Fz=^\s*GRUB_ENABLE_BLSCFG\s*=\s*\"?\s*[tT][rR][uU][eE]\s*\"?\s*$)flags) r read_filer GRUB2_DEFAULT_ENV_FILEr3rCrRrasearch MULTILINE)rgrub2_default_envrrrrjs  zBootloaderPlugin._bls_enabledcCs|jjtj|S)N)radd_modify_option_in_filer BOOT_CMDLINE_FILE)rr5rrr_patch_bootcmdlinessz#BootloaderPlugin._patch_bootcmdlinecCs|jtjdtjdi|js*tjddSx4|jD]*}|jj|dtj ddtj diddq2W|j dk rtjd|j |jj |j dS)Nrzcannot find grub.cfg to patchzset\s+F)addzremoving initrd image '%s') rtr BOOT_CMDLINE_TUNED_VARBOOT_CMDLINE_INITRD_ADD_VARrrCrRrrrGRUB2_TUNED_VARGRUB2_TUNED_INITRD_VARrunlink)rrjrrr_remove_grub2_tuningvs  * z%BootloaderPlugin._remove_grub2_tuningcCsf|jjtj}tjtjd|tjd}|r2|dnd}tjtjd|tjd}|rZ|dnd}||fS)Nz =\"(.*)\")rlrr) rrmr rsrarorvrpBOOT_CMDLINE_KARGS_DELETED_VAR)rrjrVrTrrr_get_rpm_ostree_changess z(BootloaderPlugin._get_rpm_ostree_changescCs@|j\}}|j|j||j|d|jtjdtjdidS)N)r2rSr)r}rXr7rtr rvr|)rrVrTrrr_remove_rpm_ostree_tunings z*BootloaderPlugin._remove_rpm_ostree_tuningcCsR|tjkrN|j rN|jr,tjd|jn"tjd|j|jddddS)Nz4removing rpm-ostree tuning previously added by Tunedz/removing grub2 tuning previously added by Tunedr) tuned_params tuned_initrd) r Z ROLLBACK_FULLrr"rCrRr~r{_update_grubenv)rr#Zrollbackrrr_instance_unapply_statics   z)BootloaderPlugin._instance_unapply_staticcCstjdtjdtjdd|tjd}tjdtjd|tjd}tjdtjdd|tjd}tjdtjd|tjd}tjtjdd|tjd}tjtj dd|tjdS) Nzunpatching grub.cfgz ^\s*set\s+z\s*=.* r)rlz *\$z\nz\n+) rCrDrarcr rxrpryGRUB2_TEMPLATE_HEADER_BEGINGRUB2_TEMPLATE_HEADER_END)r grub2_cfgcfgrrr_grub2_cfg_unpatchs z#BootloaderPlugin._grub2_cfg_unpatchcCstjddtjd}x8|D]0}|d|jj|d|jj||d7}qW|tjd7}tjd||tj d }tj tj d }xt|D]l}tjd |d d |||tj d }tjd |d||dd|tj d }tjd |dd|tj d }qW|S)Nzinitial patching of grub.cfgz\1\n\n zset z="z" z\nz+^(\s*###\s+END\s+[^#]+/00_header\s+### *)\n)rl)linuxZinitrdz^(\s*z(16|efi)?\s+.*)$z\1 $z(?:16|efi)?\s+\S+rescue.*)\$z *(.*)$z\1\2z(?:16|efi)?\s+\S+rescue.*) +$z\1) rCrDr rrrbrrarcrprxry)rrr5soptZd2rKrrr_grub2_cfg_patch_initials  0 $( z)BootloaderPlugin._grub2_cfg_patch_initialcCs|jjtj}t|dkr.tjdtjdStjtjd}d}xv|D]n}t j d|d||d|t j ddkrFd }|dd kr|d 7}||d |d |d||d7}qFW|rtj dtj|jj tj|d S)Nrzcannot read '%s'F)ZGRUB_CMDLINE_LINUX_DEFAULTZGRUB_INITRD_OVERLAYz^[^#]*\bz \s*=.*\\\$z\b.*$)rlTrrz="${z:+$z }\$z" z patching '%s')rrmr rnr3rCrRrxryrarorprD write_to_file)rrqr5writerKrrr_grub2_default_env_patchs   * ,z)BootloaderPlugin._grub2_default_env_patchcCs|jjtj}t|dkr.tjdtjdSd}tjdtj d|tj drd}tj dtj dd |tj d}|d d kr|d 7}|rtj d tj|jj tj|dS)Nrzcannot read '%s'Fzb^GRUB_CMDLINE_LINUX_DEFAULT=\"\$\{GRUB_CMDLINE_LINUX_DEFAULT:\+\$GRUB_CMDLINE_LINUX_DEFAULT \}\\\$z"$)rlTz"$ rrrzunpatching '%s'r)rrmr rnr3rCrRrarorxrprcrDr)rrqrrrrr_grub2_default_env_unpatchs   z+BootloaderPlugin._grub2_default_env_unpatchcCsZtjd|jstjddSx|jD]}|jj|}t|dkrVtjd|q(tjd||}d}xf|D]^}tjd|dd|jj ||d |tj d \}}|d kstj d ||tj d dkrrd}qrWttj d t j|tj d ttj d t j|tj d krd}|r*|j|j||}|jj||q(W|jrN|jn|jdS)Nzpatching grub.cfgzcannot find grub.cfg to patchFrzcannot patch %sz+adding boot command line parameters to '%s'z \b(set\s+z\s*=).*$z\1")rlrz\$Tz\1")rCrDrrRrrmr3rasubnrbrprofindallr rxryrrrr rr)rr5rjrZ grub2_cfg_newZ patch_initialrZnsubsrrr_grub2_cfg_patchs4     4"  z!BootloaderPlugin._grub2_cfg_patchcCsb|j\}}|j|j|}|s"dS|j|d\}}}|dkr@dS|jtj|jtj|j|idS)N)r2) r}r7rrXrtr rvr|r?)rrVrWZ _cmdline_dictr5rrr_rpm_ostree_updates z#BootloaderPlugin._rpm_ostree_updatecCs8|jtj|jtj|ji|jtj|jtj|jidS)N) rr rxrryrrtrvrw)rrrr _grub2_updateszBootloaderPlugin._grub2_updatecCstjjtjS)N)r r rir ZBLS_ENTRIES_PATH)rrrr_has_blsszBootloaderPlugin._has_blscCs\tjdt|dd|jD}|jjdddg|\}}|dkrXtjd|d Sd S) Nzupdating grubenv, setting %scSs$g|]\}}dt|t|fqS)z%s=%s)r])r9Zoptionvaluerrrr< sz4BootloaderPlugin._update_grubenv..z grub2-editenvr[setrzcannot update grubenv: '%s'FT)rCrDr]r>rrBrE)rr5lrFrGrrrr sz BootloaderPlugin._update_grubenvcCsb|jj}|dkrdStjdtj|jjtjdgd|id\}}|dkr^tjd|dSd S) NrFz4running kernel update hook '%s' to patch BLS entriesruZKERNEL_INSTALL_MACHINE_ID)envrzcannot patch BLS entries: '%s'T)rZget_machine_idrCrDr ZKERNEL_UPDATE_HOOK_FILErBrE)rZ machine_idrFrGrrr_bls_entries_patch_initials z+BootloaderPlugin._bls_entries_patch_initialcCs6tjd|jr2|j|j|jdr2|jr2dSdS)Nz updating BLS)rrTF)rCrDrrrrr)rrrr _bls_updates  zBootloaderPlugin._bls_updatecCs(|jdkr$tjjtjtjj||_dS)N)rr r r=r BOOT_DIRbasename)rnamerrr_init_initrd_dst_img&s z%BootloaderPlugin._init_initrd_dst_imgcCstjjtjS)N)r r isdirr ZPETITBOOT_DETECT_DIR)rrrr_check_petitboot*sz!BootloaderPlugin._check_petitbootcCs|jrtjddS|jr&tjdtjd|jtjj|j}|j j ||jsXdSd|_ |j j dj }d}t|}|rtjdd |}t||kr|}tjj|||_dS) Nz:Detected rpm-ostree which doesn't support initrd overlays.FzkDetected Petitboot which doesn't support initrd overlays. The initrd overlay will be ignored by bootloader.zinstalling initrd image as '%s'Tz /proc/cmdline/z)^\s*BOOT_IMAGE=\s*(?:\([^)]*\))?(\S*/).*$z\1)r"rCrErrRrr r rrr\rrmrstripr3rarcr=r)rZimgZimg_nameZ curr_cmdlineZinitrd_grubpathZlcr rrr_install_initrd-s&   z BootloaderPlugin._install_initrdr&cCs$|rdS|r |dk r t|g|_dS)N)r]r)renablingrverifyignore_missingrrr_grub2_cfg_fileBs z BootloaderPlugin._grub2_cfg_filer'cCsR|rdS|rN|dk rNt||_|jdkr,dS|jddkrNtjjtj|j|_dS)NrFrr)r]rr r r=r r)rrrrrrrr_initrd_dst_imgJs   z BootloaderPlugin._initrd_dst_imgr*cCs*|rdS|r&|dk r&|jj|dk|_dS)N1)rget_boolr)rrrrrrrrrVs z#BootloaderPlugin._initrd_remove_dirr(FrI)Z per_deviceZprioritycCsD|rdS|r@|dk r@t|}|j||dkr2dS|j|s@dSdS)NrF)r]rr)rrrrrZsrc_imgrrr_initrd_add_img^s   z BootloaderPlugin._initrd_add_imgr)c Cs|rdS|o|dk rt|}|j||dkr4dStjj|sRtjd|dStjd|tj ddd\}}tj d|tj ||j j d ||d d \}} tj d | |d krtjd|j j|d ddS|j||j j||jrtjd||j j|dS)NrFzFerror: cannot create initrd image, source directory '%s' doesn't existz+generating initrd image from directory '%s'ztuned-bootloader-z.tmp)prefixsuffixz+writing initrd image to temporary file '%s'zfind . | cpio -co > %sT)cwdshellz cpio log: %srzerror generating initrd image)rkzremoving directory '%s')r]rr r rrCrNrRtempfileZmkstemprDcloserrBrzrrZrmtree) rrrrrZsrc_dirfdZtmpfilerFrGrrr_initrd_add_dirks2      z BootloaderPlugin._initrd_add_dirr+cCsJ|jj|jj|}|r |jr8|jd}|j|}n |jjd}t|dkrTdSt |j }t |j } | |} t| dkrt j t jdt| fdSdd|D} xR| D]J} | j ddd} | | krt jt j| | fqt jt j| | | fqW| |@}t j d d j|fd S|rF|dk rFt j d d|_||_dS) Nrz /proc/cmdliner+TcSsi|]}||jdddqS)r/rr)r0)r9r;rrr sz-BootloaderPlugin._cmdline..r/rz2expected arguments that are present in cmdline: %sr8Fz;installing additional boot command line parameters to grub2)Z _variablesexpandrZunquoter"rXr?rmr3rr0rCrRr ZSTR_VERIFY_PROFILE_VALUE_OKr]rNZ'STR_VERIFY_PROFILE_CMDLINE_FAIL_MISSINGZSTR_VERIFY_PROFILE_CMDLINE_FAILr=rr)rrrrrr;Zrpm_ostree_kargsr+Z cmdline_setZ value_setZ missing_setZ cmdline_dictmargZ present_setrrr_cmdlines6         zBootloaderPlugin._cmdliner,cCs8|rdS|r4|dk r4|jj|dkr4tjdd|_dS)Nrz(skipping any modification of grub configT)rrrCrRr)rrrrrrrr_skip_grub_configs   z"BootloaderPlugin._skip_grub_configcCs|rV|jrVt|jdkr"tjdt|jdkr:tjd|jtj|jtj |jin0|r|j r|j rp|j n|j |jd|_ dS)Nrz0requested changes to initrd will not be applied!z1requested changes to cmdline will not be applied!F)rr3rrCrErrtr rvrwrr"rrr)rr#rrrr_instance_post_statics     z&BootloaderPlugin._instance_post_static)r)1r_ __module__ __qualname____doc__rr$r% classmethodr. staticmethodr7r?r!rLrXrhrrrtr{r}r~r Z ROLLBACK_SOFTrrrrrrrrrrrrrrrZcommand_customrrrrrrrr __classcell__rr)rrrsT.    4"          ! r)rrZ decoratorsZ tuned.logsZtunedrZtuned.utils.commandsrZ tuned.constsr r rarZtimerZlogsrPrCZPluginrrrrrs      PK$2]x||3plugins/__pycache__/repository.cpython-36.opt-1.pycnu[3 s  PK$2]~YY7plugins/__pycache__/plugin_rtentsk.cpython-36.opt-1.pycnu[3 s   PK$2]./plugins/__pycache__/plugin_sysfs.cpython-36.pycnu[3 0sz.SysfsPlugin._instance_init..)Z_has_dynamic_tuningZ_has_static_tuningdictlistZoptionsitems_sysfs_sysfs_original)r instancerrr_instance_init,szSysfsPlugin._instance_initcCsdS)Nr)r rrrr_instance_cleanup3szSysfsPlugin._instance_cleanupcCsvxpt|jjD]^\}}|jj|}xHtj|D]:}|j|r\|j||j |<|j ||q0t j d|q0WqWdS)Nz)rejecting write to '%s' (not inside /sys)) rrr _variablesexpandglobiglob _check_sysfs _read_sysfsr _write_sysfslogerror)r rkeyvaluevfrrr_instance_apply_static6s  z"SysfsPlugin._instance_apply_staticc Cspd}xft|jjD]T\}}|jj|}x>tj|D]0}|j|r4|j|} |j ||| |dkr4d}q4WqW|S)NTF) rrrrrr r!r"r#Z _verify_value) r rZignore_missingZdevicesretr'r(r)r*Zcurr_valrrr_instance_verify_static@s    z#SysfsPlugin._instance_verify_staticcCs,x&t|jjD]\}}|j||qWdS)N)rrrr$)r rZrollbackr'r(rrr_instance_unapply_staticKsz$SysfsPlugin._instance_unapply_staticcCs tjd|S)Nz^/sys/.*)rematch)r sysfs_filerrrr"OszSysfsPlugin._check_sysfscCs2|jj|j}t|dkr*|jj|dSdSdS)NrF)r Z read_filestriplenZget_active_option)r r1datarrrr#Rs zSysfsPlugin._read_sysfscCs|jj||S)N)r Z write_to_file)r r1r(rrrr$YszSysfsPlugin._write_sysfs)__name__ __module__ __qualname____doc__rrrr+r-constsZ ROLLBACK_SOFTr.r"r#r$ __classcell__rr)r rr s   r)rr r/Zos.pathrZ decoratorsZ tuned.logsZtunedZ tuned.constsr9 subprocessZtuned.utils.commandsrZlogsgetr%ZPluginrrrrrs    PK$2]^e e 4plugins/__pycache__/plugin_acpi.cpython-36.opt-1.pycnu[3  `acpi`:: Configures the ACPI driver. + The only currently supported option is [option]`platform_profile`, which sets the ACPI platform profile sysfs attribute, a generic power/performance preference API for other drivers. Multiple profiles can be specified, separated by `|`. The first available profile is selected. + -- .Selecting a platform profile ==== ---- [acpi] platform_profile=balanced|low-power ---- Using this option, *TuneD* will try to set the platform profile to `balanced`. If that fails, it will try to set it to `low-power`. ==== -- cstt|j||dS)N)superr__init__)selfargskwargs) __class__!/usr/lib/python3.6/plugin_acpi.pyr$szACPIPlugin.__init__cCsddiS)Nplatform_profiler )clsr r r_get_config_options'szACPIPlugin._get_config_optionscCsd|_d|_dS)NTF)Z_has_static_tuningZ_has_dynamic_tuning)r instancer r r_instance_init+szACPIPlugin._instance_initcCsdS)Nr )r rr r r_instance_cleanup/szACPIPlugin._instance_cleanupcCstjjtdS)NZplatform_profile_choices)ospathjoinr)rr r r_platform_profile_choices_path2sz)ACPIPlugin._platform_profile_choices_pathcCstjjtdS)Nr)rrrr)rr r r_platform_profile_path6sz!ACPIPlugin._platform_profile_pathrcCstjj|jstjddSdd|jdD}t|jj |j j}xZ|D]R}||kr|stj d||jj |j||rt jgndd|Stjd|qPWtjd dS) Nz5ACPI platform_profile is not supported on this systemcSsg|] }|jqSr )strip).0profiler r r ?sz4ACPIPlugin._set_platform_profile..|z Setting platform_profile to '%s'F)Zno_errorz+Requested platform_profile '%s' unavailablezDFailed to set platform_profile. Is the value in the profile correct?)rrisfilerlogdebugsplitset_cmd read_filerinfoZ write_to_fileerrnoENOENTwarnerror)r ZprofilesZsimremoveZavail_profilesrr r r_set_platform_profile:s   z ACPIPlugin._set_platform_profileFcCs2tjj|jstjddS|jj|jjS)Nz5ACPI platform_profile is not supported on this system) rrrrr r!r$r%r)r Zignore_missingr r r_get_platform_profileLs z ACPIPlugin._get_platform_profile)F)__name__ __module__ __qualname____doc__r classmethodrrrrrZ command_setr,Z command_getr- __classcell__r r )r rr s    r)rZ decoratorsrr'Z tuned.logsZtunedZ tuned.constsrZlogsgetr ZPluginrr r r rs   PK$2]v0plugins/__pycache__/hotplug.cpython-36.opt-1.pycnu[3 ddlmZddljZddlZejjZGdddej Z dS))baseNcseZdZdZfddZfddZddZdd Zd d Zd d Z ddZ ddZ ddZ ddZ ddZddZddZddZZS)Pluginz: Base class for plugins with device hotpluging support. cstt|j||dS)N)superr__init__)selfargskwargs) __class__/usr/lib/python3.6/hotplug.pyr szPlugin.__init__cstt|j|jdS)N)rrcleanup_hardware_events_cleanup)r)r r r r szPlugin.cleanupcCsdS)Nr )rr r r _hardware_events_initszPlugin._hardware_events_initcCsdS)Nr )rr r r rszPlugin._hardware_events_cleanupcCs |jdS)N)r)rr r r _init_devicesszPlugin._init_devicescCsN|dkr&tjd|j|j|jn$|dkrJtjd|j|j|jdS)Naddzdevice '%s' addedremovezdevice '%s' removed)loginfoZsys_name _add_device_remove_device)rZeventZdevicer r r _hardware_events_callbacks z Plugin._hardware_events_callbackcCsdtjd|j|f|jj||j||jd|g|j|||j||jd|g|j j|dS)Nz!instance %s: adding new device %sZapply) rrname_assigned_devicesr_call_device_script script_pre_added_device_apply_tuning script_postprocessed_devices)rinstance device_namer r r _add_device_process$s   zPlugin._add_device_processcCsr||j|jBkrdSxXt|jjD],\}}t|j||gdkr$|j||Pq$Wtj d||jj |dS)Nrzno instance wants %s) r _free_deviceslist _instancesitemslenZ_get_matching_devicesr!rdebugr)rr Z instance_namerr r r r,s zPlugin._add_devicecCs8x|D]}|j||qWt|jt|jdk|_dS)zN Add devices specified by the set to the instance, no check is performed. rN)r!r&rassigned_devicesactive)rr device_namesdevr r r _add_devices_nocheck8s zPlugin._add_devices_nocheckcCsx||jkrt|j||jd|g|j|||j||jd|g|jj|t|jt|jdk|_|j j|dSdS)NZunapplyrTF) rrr_removed_device_unapply_tuningrrr&r(r)r)rrr r r r _remove_device_processCs    zPlugin._remove_device_processcCsJ||j|jBkrdSx0t|jjD]}|j||r$Pq$W|jj|dS)zVRemove device from the instance Parameters: device_name -- name of the device N)rr"r#r$valuesr.r)rr rr r r rQs  zPlugin._remove_devicecCsx|D]}|j||qWdS)zS Remove devices specified by the set from the instance, no check is performed. N)r.)rrr*r+r r r _remove_devices_nocheckas zPlugin._remove_devices_nocheckcCs6|j||g|jr2|jjtjtjr2|j||dS)N)Z_execute_all_device_commandshas_dynamic_tuning _global_cfggetconstsCFG_DYNAMIC_TUNINGCFG_DEF_DYNAMIC_TUNINGZ_instance_apply_dynamic)rrr r r r rhsz!Plugin._added_device_apply_tuningcCs:|jr$|jjtjtjr$|j|||j||gdddS)NT)r)r1r2r3r4r5r6Z_instance_unapply_dynamicZ_cleanup_all_device_commands)rrr r r r r-ms z%Plugin._removed_device_unapply_tuning)__name__ __module__ __qualname____doc__rr rrrrr!rr,r.rr0rr- __classcell__r r )r r rs    r) rZ tuned.constsr4Z tuned.logsZtunedZlogsr3rrr r r r s   PK$2]"bb3plugins/__pycache__/exceptions.cpython-36.opt-1.pycnu[3 sPK$2]"bb-plugins/__pycache__/exceptions.cpython-36.pycnu[3 sPK$2]?z!!/plugins/__pycache__/plugin_audio.cpython-36.pycnu[3 s   PK$2]x>>0plugins/__pycache__/plugin_script.cpython-36.pycnu[3 s   PK$2]]7plugins/__pycache__/plugin_systemd.cpython-36.opt-1.pycnu[3 tjd|d|tjd}|dk r>|jdkr>|jdSdS)Nz^\s*z \s*=\s*(.*)$)flagsr)research MULTILINE lastindexgroup)rconfkeymorrr _get_keyval7s  zSystemdPlugin._get_keyvalc Cs~tjd|ddt||tjd\}}|dkrzy|ddkrF|d7}Wntk r\YnX||dt|d7}|S|S) Nz^(\s*z\s*=).*$z\g<1>)rr =)rsubnstrr IndexError)rr"r#valZconf_newZnsubsrrr _add_keyval?s(  zSystemdPlugin._add_keyvalcCstjd|dd|tjdS)Nz^\s*z\s*=.*\n)r)rsubr)rr"r#rrr_del_keyKszSystemdPlugin._del_keycCs,|jjtjdd}|dkr(tjddS|S)N)err_retz(error reading systemd configuration file)r read_filer r logerror)rZsystemd_system_confrrr_read_systemd_system_confNs  z'SystemdPlugin._read_systemd_system_confcCsptjtj}|jj||s8tjd|jj|dddS|jj|tjsltjdtj|jj|dddSdS)Nz(error writing systemd configuration fileT)no_errorFz/error replacing systemd configuration file '%s') r r ZTMP_FILE_SUFFIXr write_to_filer3r4unlinkrename)rr"Ztmpfilerrr_write_systemd_system_confUs  z(SystemdPlugin._write_systemd_system_confcCstjjtj|jS)N)rr joinr ZPERSISTENT_STORAGE_DIRname)rrrr_get_storage_filenamecsz#SystemdPlugin._get_storage_filenamecCsl|j}|dk rh|j}|jj|ddd}|jj||dkrN|j|tj}n|j|tj|}|j |dS)NT)r1r6) r5r=rr2r8r0r SYSTEMD_CPUAFFINITY_VARr-r:)rr"fnamecpu_affinity_savedrrr_remove_systemd_tuningfs z$SystemdPlugin._remove_systemd_tuningcCs0|tjkr,tjdtj|jtjddS)Nz6removing '%s' systemd tuning previously added by TuneDz[you may need to manualy run 'dracut -f' to update the systemd configuration in initrd image)r Z ROLLBACK_FULLr3infor>rAZconsole)rrZrollbackrrr_instance_unapply_staticrs z&SystemdPlugin._instance_unapply_staticc Cs<|dkr dSdjdd|jjtjddtjdd|DS)Nr. css|]}t|VqdS)N)r*).0vrrr |sz8SystemdPlugin._cpulist_convert_unpack..z\s+,z,\s+)r;rcpulist_unpackrr/)rZcpulistrrr_cpulist_convert_unpackysz%SystemdPlugin._cpulist_convert_unpackrF)Z per_devicec Csd}d}|jj|jj|jj|}djdd|jj|D}|j} | dk rh|j| t j }|j |}|r||j d|||S|r|j } |jj| ddd} |dk r| dkr||kr|jj| |ddtjdt j |t jf|j|j| t j |dS) NrDcss|]}t|VqdS)N)r*)rErFrrrrGsz)SystemdPlugin._cmdline..rT)r1r6)Zmakedirz setting '%s' to '%s' in the '%s')rZunescapeZ _variablesexpandZunquoter;rIr5r%r r>rJZ _verify_valuer=r2r7r3rBr r:r-) rZenablingvalueZverifyZignore_missingZ conf_affinityZconf_affinity_unpackedrFZ v_unpackedr"r?r@rrr_cmdline~s" zSystemdPlugin._cmdline)__name__ __module__ __qualname____doc__rrr classmethodrr%r-r0r5r:r=rAr Z ROLLBACK_SOFTrCrJZcommand_customrM __classcell__rr)rrr s    r)r.rZ decoratorsZ tuned.logsZtunedrZtuned.utils.commandsrZ tuned.constsr rrZlogsgetr3ZPluginrrrrrs     PK$2],o6plugins/__pycache__/plugin_script.cpython-36.opt-1.pycnu[3 s   PK$2]@<<3plugins/__pycache__/plugin_scsi_host.cpython-36.pycnu[3 2sz6SCSIHostPlugin._get_device_objects..r)r Zdevicesr)r r_get_device_objects1sz"SCSIHostPlugin._get_device_objectscCs |jdkS)NZ scsi_host)Z device_type)clsrrrrr4sz#SCSIHostPlugin._device_is_supportedcCs|jj|d|jdS)Nr)rZ subscribe_hardware_events_callback)r rrr_hardware_events_init8sz$SCSIHostPlugin._hardware_events_initcCs|jj|dS)N)rZ unsubscribe)r rrr_hardware_events_cleanup;sz'SCSIHostPlugin._hardware_events_cleanupcs |j|rtt|j||dS)N)rrrr)r Zeventr)r rrr>s z(SCSIHostPlugin._hardware_events_callbackcstt|j||dS)N)rr_added_device_apply_tuning)r instance device_name)r rrrBsz)SCSIHostPlugin._added_device_apply_tuningcstt|j||dS)N)rr_removed_device_unapply_tuning)r r r!)r rrr"Esz-SCSIHostPlugin._removed_device_unapply_tuningcCsddiS)Nalpmr)rrrr_get_config_optionsHsz"SCSIHostPlugin._get_config_optionscCsd|_d|_dS)NTF)Z_has_static_tuningZ_has_dynamic_tuning)r r rrr_instance_initNszSCSIHostPlugin._instance_initcCsdS)Nr)r r rrr_instance_cleanupRsz SCSIHostPlugin._instance_cleanupcCstjjdt|dS)Nz/sys/class/scsi_host/Zlink_power_management_policy)ospathjoinstr)r rrrr_get_alpm_policy_fileUsz$SCSIHostPlugin._get_alpm_policy_filer#T)Z per_devicecCsd|dkr dS|j|}|s`tjj|rF|jj|||rs    PK$2]]K6plugins/__pycache__/plugin_uncore.cpython-36.opt-1.pycnu[3 dSXt j |d}t |dkrbd|_|}x|D]}|jj |qhWt jdt|jdS)NTFzuncore*rz devices: %s)Z_devices_supportedsetZ_assigned_devicesZ _free_devicesZ_is_tpmioslistdir SYSFS_DIROSErrorfnmatchfilterlenaddlogdebugstr)selfZdevicesZ tpmi_devicesdr#/usr/lib/python3.6/plugin_uncore.py _init_devices$s   zUncorePlugin._init_devicescCsd|_d|_dS)NTF)Z_has_static_tuningZ_has_dynamic_tuning)rinstancerrr_instance_init:szUncorePlugin._instance_initcCsdS)Nr)rrrrr_instance_cleanup>szUncorePlugin._instance_cleanupcCs2t|d|}tj|}t|dkr.t|SdS)N/r)r cmdZ read_filerint)rdev_dirfile sysfs_filevaluerrr_getAs   zUncorePlugin._getcCs(t|d|}tj|d|r$|SdS)Nrz%u)r rZ write_to_file)rrrr!r rrr_setHszUncorePlugin._setcCs dddS)N) max_freq_khz min_freq_khzr)clsrrr_get_config_optionsNsz UncorePlugin._get_config_optionsc Cs*y t|}Wn"tk r.tjd|dSXy4|j|d}|j|d}|j|d}|j|d}Wn"ttfk rtjddSX|tkr||krtjd|||fdS||krtjd|||f|}nT|t kr"||krtjd |||fdS||kr&tjd |||f|}ndS|S) Nzvalue '%s' is not integerinitial_max_freq_khzinitial_min_freq_khzr$r%z+fail to read inital uncore frequency valuesz/%s: max_freq_khz %d value below min_freq_khz %dzC%s: max_freq_khz %d value above initial_max_freq_khz - capped to %dz/%s: min_freq_khz %d value above max_freq_khz %dzC%s: min_freq_khz %d value below initial_max_freq_khz - capped to %d) r ValueErrorrerrorr"r IOErrorIS_MAXinfoIS_MIN) rdeviceZ min_or_maxr!Zfreq_khzr(r)r$r%rrr_validate_valueUs:        zUncorePlugin._validate_valuer$T)Z per_devicecCsB|j|t|}|dkrdS|r"|Stjd||f|j|d|S)Nz%s: set max_freq_khz %dr$)r1r-rrr#)rr!r0simremover$rrr_set_max_freq_khz|szUncorePlugin._set_max_freq_khzFc Cs`|rtjjt rdSy|j|d}Wn"ttfk rHtjddSXtj d||f|S)Nr$z$fail to read uncore frequency valuesz%s: get max_freq_khz %d) rpathisdirr r"r r,rr+r)rr0ignore_missingr$rrr_get_max_freq_khzs zUncorePlugin._get_max_freq_khzr%cCsB|j|t|}|dkrdS|r"|Stjd||f|j|d|S)Nz%s: set min_freq_khz %dr%)r1r/rrr#)rr!r0r2r3r%rrr_set_min_freq_khzszUncorePlugin._set_min_freq_khzc Cs`|rtjjt rdSy|j|d}Wn"ttfk rHtjddSXtj d||f|S)Nr%z$fail to read uncore frequency valuesz%s: get min_freq_khz %d) rr5r6r r"r r,rr+r)rr0r7r%rrr_get_min_freq_khzs zUncorePlugin._get_min_freq_khzN)F)F)__name__ __module__ __qualname____doc__rrrr"r# classmethodr'r1Z command_setr4Z command_getr8r9r:rrrrrs '   r)rZ decoratorsZ tuned.logsZtunedZtuned.utils.commandsrrr Zlogsgetrrr r/r-ZPluginrrrrrs   PK$2]6 3plugins/__pycache__/plugin_usb.cpython-36.opt-1.pycnu[3 *sz1USBPlugin._get_device_objects..r)r Zdevicesr)r r_get_device_objects)szUSBPlugin._get_device_objectscCsddiS)N autosuspendr)r rrr_get_config_options,szUSBPlugin._get_config_optionscCsd|_d|_dS)NTF)Z_has_static_tuningZ_has_dynamic_tuning)r instancerrr_instance_init2szUSBPlugin._instance_initcCsdS)Nr)r rrrr_instance_cleanup6szUSBPlugin._instance_cleanupcCsd|S)Nz)/sys/bus/usb/devices/%s/power/autosuspendr)r r rrr_autosuspend_sysfile9szUSBPlugin._autosuspend_sysfilerT)Z per_devicecCsR|j|}|dkrdS|rdnd}|sN|j|}|jj|||rFtjgndd|S)N10F)no_error)Z _option_boolrr Z write_to_fileerrnoENOENT)r valuer Zsimremoveenablevalsys_filerrr_set_autosuspend<s    zUSBPlugin._set_autosuspendFcCs|j|}|jj||djS)N)r)rr Z read_filestrip)r r Zignore_missingr$rrr_get_autosuspendIs zUSBPlugin._get_autosuspendN)F)__name__ __module__ __qualname____doc__rr classmethodrrrrZ command_setr%Z command_getr'rrrrr s   r)rZ decoratorsZ tuned.logsZtunedZtuned.utils.commandsrZglobrZlogsgetlogZPluginrrrrrs   PK$2]޲i@h@h-plugins/__pycache__/plugin_cpu.cpython-36.pycnu[3 d?d@dAZ%e&d=dpdBdCZ'dqdEdFZ(e$dGd>dHdIdJdKZ)e&dGdrdLdMZ*dNdOZ+dsdPdQZ,dRdSZ-e$dTd>d?dUdVZ.dWdXZ/dYdZZ0d[d\Z1e&dTdtd]d^Z2d_d`Z3dadbZ4e$dcd>d?dddeZ5e&dcdudfdgZ6e$dhd>d?didjZ7e&dhdvdkdlZ8Z9S)wCPULatencyPlugina `cpu`:: Sets the CPU governor to the value specified by the [option]`governor` option and dynamically changes the Power Management Quality of Service (PM QoS) CPU Direct Memory Access (DMA) latency according to the CPU load. `governor`::: The [option]`governor` option of the 'cpu' plug-in supports specifying CPU governors. Multiple governors are separated using '|'. The '|' character is meant to represent a logical 'or' operator. Note that the same syntax is used for the [option]`energy_perf_bias` option. *TuneD* will set the first governor that is available on the system. + For example, with the following profile, *TuneD* will set the 'ondemand' governor, if it is available. If it is not available, but the 'powersave' governor is available, 'powersave' will be set. If neither of them are available, the governor will not be changed. + .Specifying a CPU governor ==== ---- [cpu] governor=ondemand|powersave ---- ==== `sampling_down_factor`::: The sampling rate determines how frequently the governor checks to tune the CPU. The [option]`sampling_down_factor` is a tunable that multiplies the sampling rate when the CPU is at its highest clock frequency thereby delaying load evaluation and improving performance. Allowed values for sampling_down_factor are 1 to 100000. + .The recommended setting for jitter reduction ==== ---- [cpu] sampling_down_factor = 100 ---- ==== `energy_perf_bias`::: [option]`energy_perf_bias` supports managing energy vs. performance policy via x86 Model Specific Registers using the `x86_energy_perf_policy` tool. Multiple alternative Energy Performance Bias (EPB) values are supported. The alternative values are separated using the '|' character. The following EPB values are supported starting with kernel 4.13: "performance", "balance-performance", "normal", "balance-power" and "power". On newer processors is value writen straight to file (see rhbz#2095829) + .Specifying alternative Energy Performance Bias values ==== ---- [cpu] energy_perf_bias=powersave|power ---- *TuneD* will try to set EPB to 'powersave'. If that fails, it will try to set it to 'power'. ==== `energy_performance_preference`::: [option]`energy_performance_preference` supports managing energy vs. performance hints on newer Intel and AMD processors with active P-State CPU scaling drivers (intel_pstate or amd-pstate). Multiple alternative Energy Performance Preferences (EPP) values are supported. The alternative values are separated using the '|' character. Available values can be found in `energy_performance_available_preferences` file in `CPUFreq` policy directory in `sysfs`. in + .Specifying alternative Energy Performance Hints values ==== ---- [cpu] energy_performance_preference=balance_power|power ---- *TuneD* will try to set EPP to 'balance_power'. If that fails, it will try to set it to 'power'. ==== `latency_low, latency_high, load_threshold`::: + If the CPU load is lower than the value specified by the[option]`load_threshold` option, the latency is set to the value specified either by the [option]`latency_high` option or by the [option]`latency_low` option. + `force_latency`::: You can also force the latency to a specific value and prevent it from dynamically changing further. To do so, set the [option]`force_latency` option to the required latency value. + The maximum latency value can be specified in several ways: + * by a numerical value in microseconds (for example, `force_latency=10`) * as the kernel CPU idle level ID of the maximum C-state allowed (for example, force_latency = cstate.id:1) * as a case sensitive name of the maximum C-state allowed (for example, force_latency = cstate.name:C1) * by using 'None' as a fallback value to prevent errors when alternative C-state IDs/names do not exist. When 'None' is used in the alternatives pipeline, all the alternatives that follow 'None' are ignored. + It is also possible to specify multiple fallback values separated by '|' as the C-state names and/or IDs may not be available on some systems. + .Specifying fallback C-state values ==== ---- [cpu] force_latency=cstate.name:C6|cstate.id:4|10 ---- This configuration tries to obtain and set the latency of C-state named C6. If the C-state C6 does not exist, kernel CPU idle level ID 4 (state4) latency is searched for in sysfs. Finally, if the state4 directory in sysfs is not found, the last latency fallback value is `10` us. The value is encoded and written into the kernel's PM QoS file `/dev/cpu_dma_latency`. ==== + .Specifying fallback C-state values using 'None'. ==== ---- [cpu] force_latency=cstate.name:XYZ|None ---- In this case, if C-state with the name `XYZ` does not exist [option]`force_latency`, no latency value will be written into the kernel's PM QoS file, and no errors will be reported due to the presence of 'None'. ==== `min_perf_pct, max_perf_pct, no_turbo`::: These options set the internals of the Intel P-State driver exposed via the kernel's `sysfs` interface. + .Adjusting the configuration of the Intel P-State driver ==== ---- [cpu] min_perf_pct=100 ---- Limit the minimum P-State that will be requested by the driver. It states it as a percentage of the max (non-turbo) performance level. ==== + `pm_qos_resume_latency_us`::: This option allow to set specific latency for all cpus or specific ones. ==== ---- [cpu] pm_qos_resume_latency_us=n/a ---- Special value that disables C-states completely. ==== ---- [cpu] pm_qos_resume_latency_us=0 ---- Allows all C-states. ==== ---- [cpu] pm_qos_resume_latency_us=100 ---- Allows any C-state with a resume latency less than value. csrtt|j||d|_d|_d|_d|_d|_d|_d|_ d|_ d|_ d|_ d|_ d|_i|_t|_d|_dS)NTx86_64F)superr__init__ _has_pm_qos_archZ_is_x86 _is_intel_is_amd_has_energy_perf_bias_has_intel_pstate_has_amd_pstate_has_pm_qos_resume_latency_us_min_perf_pct_save_max_perf_pct_save_no_turbo_save_governors_mapr_cmd_flags)selfargskwargs) __class__ /usr/lib/python3.6/plugin_cpu.pyr s zCPULatencyPlugin.__init__cCs>d|_t|_x"|jjdD]}|jj|jqWt|_dS)NTcpu)Z_devices_supportedsetZ _free_devices_hardware_inventoryZ get_devicesaddZsys_nameZ_assigned_devices)rdevicerrr _init_devicess zCPULatencyPlugin._init_devicescsfdd|DS)Ncsg|]}jjd|qS)r)r Z get_device).0x)rrr sz8CPULatencyPlugin._get_device_objects..r)rZdevicesr)rr_get_device_objectssz$CPULatencyPlugin._get_device_objectsc Csddddddddddddd S)Ng?di) load_threshold latency_low latency_high force_latencygovernorsampling_down_factorenergy_perf_bias min_perf_pct max_perf_pctno_turbopm_qos_resume_latency_usenergy_performance_preferencer)rrrr_get_config_optionssz$CPULatencyPlugin._get_config_optionscCsdddddg}tj|_|j|krttj}|jjd}|dkrFd|_n|d ksV|d kr^d|_nd|_t j d |nt j d |j|jr|j |j |jr|j dS) NrZi686Zi585Zi486Zi386Z vendor_idZ GenuineIntelTZ AuthenticAMDZ HygonGenuinez$We are running on an x86 %s platformzWe are running on %s (non x86))platformmachiner procfscpuinfotagsgetr r loginfo_check_energy_perf_bias_check_intel_pstate_check_amd_pstate)rZ intel_archsrZvendorrrr _check_archs"   zCPULatencyPlugin._check_archcCsbd|_d}|jjddgtj|gd\}}|dkr@|dkr@d|_n|dkrTtjd n tjd dS) NFrx86_energy_perf_policyz-r)Z no_errorsrTzgunable to run x86_energy_perf_policy tool, ignoring CPU energy performance bias, is the tool installed?zXyour CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias)rrexecuteerrnoENOENTr<warning)rZretcode_unsupportedretcodeoutrrrr>s z(CPULatencyPlugin._check_energy_perf_biascCs"tjjd|_|jrtjddS)Nz$/sys/devices/system/cpu/intel_pstatezintel_pstate detected)ospathexistsrr<r=)rrrrr?sz$CPULatencyPlugin._check_intel_pstatecCs"tjjd|_|jrtjddS)Nz"/sys/devices/system/cpu/amd_pstatezamd-pstate detected)rJrKrLrr<r=)rrrrr@#sz"CPULatencyPlugin._check_amd_pstatecCs$|jdkrtjjjdg|_|jS)Nflags)rr8r9r:r;)rrrr_get_cpuinfo_flags(s z#CPULatencyPlugin._get_cpuinfo_flagscCs t|}|jjt|jddS)NrrC)strrZ is_cpu_onlinereplace)rr"Zsdrrr_is_cpu_online-szCPULatencyPlugin._is_cpu_onlinecCstjjd|S)Nz3/sys/devices/system/cpu/%s/cpufreq/scaling_governor)rJrKrL)rr"rrr_cpu_has_scaling_governor1sz*CPULatencyPlugin._cpu_has_scaling_governorcCs<|j|stjd|dS|j|s8tjd|dSdS)Nz'%s' is not online, skippingFz.there is no scaling governor fo '%s', skippingT)rQr<debugrR)rr"rrr_check_cpu_can_change_governor4s  z/CPULatencyPlugin._check_cpu_can_change_governorcCsd|_d|_t|jjd|krd|_ytjtj tj |_ Wn*t k rht jdtj d|_YnXd|_|jddkr|jddkr|jjdd|_d|_nd|_|jnd|_t jd|jyt|jd|_Wntk rd|_YnXdS) NTFrz-Unable to open '%s', disabling PM_QoS controlr,r3loadzILatency settings from non-first CPU plugin instance '%s' will be ignored.)Z_has_static_tuningZ_has_dynamic_tuninglistZ _instancesvalues_first_instancerJopenconstsZPATH_CPU_DMA_LATENCYO_WRONLY_cpu_latency_fdOSErrorr<errorr _latencyoptions_monitors_repositoryZcreate _load_monitorrAr=nameZassigned_devices _first_device IndexError)rinstancerrr_instance_init=s*  zCPULatencyPlugin._instance_initcCs4|jr0|jrtj|j|jdk r0|jj|jdS)N)rXr rJcloser\rbradelete)rrfrrr_instance_cleanup[s   z"CPULatencyPlugin._instance_cleanupcCs|jjd|djS)Nz'/sys/devices/system/cpu/intel_pstate/%s)r read_filestrip)rattrrrr_get_intel_pstate_attrbsz'CPULatencyPlugin._get_intel_pstate_attrcCs|dk r|jjd||dS)Nz'/sys/devices/system/cpu/intel_pstate/%s)r write_to_file)rrmvalrrr_set_intel_pstate_attresz'CPULatencyPlugin._set_intel_pstate_attrcCs&|dkr dS|j|}|j|||S)N)rnrq)rrmvaluevrrr_getset_intel_pstate_attris   z*CPULatencyPlugin._getset_intel_pstate_attrcstt|j||jsdS|jj|jd}|dk r>|j||jr|jj|jd}|j d||_ |jj|jd}|j d||_ |jj|jd}|j d||_ dS)Nr,r0r1r2) rr_instance_apply_staticrXZ _variablesexpandr` _set_latencyrrtrrr)rrfZforce_latency_valueZ new_value)rrrrups(       z'CPULatencyPlugin._instance_apply_staticcsLtt|j|||jrH|jrH|jd|j|jd|j|jd|jdS)Nr0r1r2) rr_instance_unapply_staticrXrrqrrr)rrfZrollback)rrrrxs  z)CPULatencyPlugin._instance_unapply_staticcCs|j||dS)N)_instance_update_dynamic)rrfr"rrr_instance_apply_dynamicsz(CPULatencyPlugin._instance_apply_dynamiccCsZ|js t||jkrdS|jjd}||jdkrF|j|jdn|j|jddS)Nsystemr)r+r*)rXAssertionErrorrdrbZget_loadr`rw)rrfr"rUrrrrys  z)CPULatencyPlugin._instance_update_dynamiccCsdS)Nr)rrfr"rrr_instance_unapply_dynamicsz*CPULatencyPlugin._instance_unapply_dynamicc Cs&yt|Sttfk r dSXdS)N)int ValueError TypeError)rsrrr_str2intszCPULatencyPlugin._str2intcCsi|_xztjtD]l}td|}|jj|dddd}|jj|dddd}|dk r|dk r|j|}|dk r||j|j<qWdS)Nz/%s/rcT)err_retno_errorlatency)cstates_latencyrJlistdircpuidle_states_pathrrkrrl)rdZ cstate_pathrcrrrr_read_cstates_latencys  z&CPULatencyPlugin._read_cstates_latencyFcCshtjd||jdkr*tjd|j|jj|d}|rR|dkrRtjddStjdt||S)Nz)getting latency for cstate with name '%s'zreading cstates latency tablerz"skipping latency 0 as set by paramz!cstate name mapped to latency: %s)r<rSrrr;rO)rrcno_zerorrrr_get_latency_by_cstate_names    z,CPULatencyPlugin._get_latency_by_cstate_namecCstjdt||j|}|dkr2tjddStdd|}|j|jj|ddd}|rt|dkrttjddStjd t||S) Nz'getting latency for cstate with ID '%s'zcstate ID is invalidz /%s/latencyzstate%dT)rrrz"skipping latency 0 as set by paramzcstate ID mapped to latency: %s)r<rSrOrrrrk)rZlidrZ latency_pathrrrr_get_latency_by_cstate_ids    z*CPULatencyPlugin._get_latency_by_cstate_idc Cs`d|_t|jd}tjd||fx.|D]$}yt|}tjd|Wntk rH|dddkr|j|dddd}n|dd d kr|j|d d}n|dd d kr|j|d ddd}nn|dd dkr|j|d d}nJ|dkrtjddS|r.|dkr.tjdntjdt|d}YnX|dk r.Pq.W|dfS)N|z#parsing latency '%s', allow_na '%s'z+parsed directly specified latency value: %drzcstate.id_no_zero:T)r z cstate.id:zcstate.name_no_zero: z cstate.name:noneNonezlatency 'none' specifiedzn/azlatency 'n/a' specifiedzinvalid latency specified: '%s'F)rr)NT) rrOsplitr<rSr~rrr)rrallow_naZ latenciesrrr_parse_latencys6    zCPULatencyPlugin._parse_latencycCsp|j|\}}| rl|jrl|dkr4tjdd|_n8|j|krltjd|tjd|}tj |j |||_dS)Nztunable to evaluate latency value (probably wrong settings in the 'cpu' section of current profile), disabling PM QoSFzsetting new cpu latency %di) rr r<r^r_r=structpackrJwriter\)rrskipZ latency_binrrrrws    zCPULatencyPlugin._set_latencycCs|jjd|jjS)Nz>/sys/devices/system/cpu/%s/cpufreq/scaling_available_governors)rrkrlr)rr"rrr_get_available_governorssz)CPULatencyPlugin._get_available_governorsr-T) per_devicecCs|j|sdSt|}|jd}dd|D}x&|D]}t|dkr4tjddSq4W|j|}x~|D]^}||kr|stjd||f|jj d|||rt j gndd Pqf|sftj d ||fqfWtj d d j|d}|S) NrcSsg|] }|jqSr)rl)r$r-rrrr&sz2CPULatencyPlugin._set_governor..rz.The 'governor' option contains an empty value.z!setting governor '%s' on cpu '%s'z3/sys/devices/system/cpu/%s/cpufreq/scaling_governorF)rz7Ignoring governor '%s' on cpu '%s', it is not supportedz.None of the scaling governors is supported: %sz, )rTrOrlenr<r^rr=rrorErFrSwarnjoin)rZ governorsr"simremover-Zavailable_governorsrrr _set_governors2        zCPULatencyPlugin._set_governorcCsTd}|j|sdS|jjd||dj}t|dkr:|}|dkrPtjd||S)Nz3/sys/devices/system/cpu/%s/cpufreq/scaling_governor)rrz*could not get current governor on cpu '%s')rTrrkrlrr<r^)rr"ignore_missingr-datarrr _get_governors  zCPULatencyPlugin._get_governorondemandcCsd|S)Nz7/sys/devices/system/cpu/cpufreq/%s/sampling_down_factorr)rr-rrr_sampling_down_factor_path%sz+CPULatencyPlugin._sampling_down_factor_pathr.r)rZprioritycCsd}||jkr|jjd|j|<|j|}|dkrFtjd|dS|t|jjkr||j|<|j|}tj j |stjd||fdSt |}|stj d||f|j j|||rtjgndd|S)NzIignoring sampling_down_factor setting for CPU '%s', cannot match governorzTignoring sampling_down_factor setting for CPU '%s', governor '%s' doesn't support itz6setting sampling_down_factor to '%s' for governor '%s'F)r)rclearrr<rSrVrWrrJrKrLrOr=rrorErF)rr.r"rrrpr-rKrrr_set_sampling_down_factor(s&       z*CPULatencyPlugin._set_sampling_down_factorcCsD|j||d}|dkrdS|j|}tjj|s4dS|jj|jS)N)r)rrrJrKrLrrkrl)rr"rr-rKrrr_get_sampling_down_factorCs  z*CPULatencyPlugin._get_sampling_down_factorcCs*|jjdd|t|gdd\}}}||fS)NrBz-cT)Z return_err)rrDrO)rcpu_idrrrHrIerr_msgrrr_try_set_energy_perf_biasMs z*CPULatencyPlugin._try_set_energy_perf_biascCsd||r dndfS)Nz>/sys/devices/system/cpu/cpufreq/policy%s/energy_performance_%sZavailable_preferencesZ preferencer)rrZ availablerrr_pstate_preference_pathVsz(CPULatencyPlugin._pstate_preference_pathcCsd|S)Nz4/sys/devices/system/cpu/cpu%s/power/energy_perf_biasr)rrrrr_energy_perf_bias_pathYsz'CPULatencyPlugin._energy_perf_bias_pathr/c Cs||j|stjd|dS|jd}|jd}tj|jkr|j|}t j j |r|sxT|D]>}|j }|j j|||rtjgnddr^tjd||fPq^Wtjd|t|Stjd|dSn|jrt|slx|D]|}|j }tjd ||f|j||\} } | d kr,tjd||fPq| d krHtjd | Pqtjd ||fqWtjd|t|SdSdS) Nz%s is not online, skippingrrF)rz5energy_perf_bias successfully set to '%s' on cpu '%s'zPFailed to set energy_perf_bias on cpu '%s'. Is the value in the profile correct?zXFailed to set energy_perf_bias on cpu '%s' because energy_perf_bias file does not exist.z2Trying to set energy_perf_bias to '%s' on cpu '%s'rz"Failed to set energy_perf_bias: %szHCould not set energy_perf_bias to '%s' on cpu '%s', trying another value)rQr<rSlstriprrZCFG_CPU_EPP_FLAGrNrrJrKrLrlrrorErFr=r^rOrr) rr/r"rrrvalsenergy_perf_bias_pathrprHrrrr_set_energy_perf_bias\sX              z&CPULatencyPlugin._set_energy_perf_biascCsjy t|}WnXtk rd}z|j| rBdS|dksZ|dkrp|dkrptjd||fdS|s|jj|j|||rt j gndd|S) Nz%s is not online, skippingT)rzn/arzr?r@rNrQrRrTrgrjrnrqrtrurZZ ROLLBACK_SOFTrxrzryr}rrrrrrwrZ command_setrZ command_getrrrrrrrrrrrrrrrrrr __classcell__rr)rrrsn,            8   r)rCrZ decoratorsZ tuned.logsZtunedZtuned.utils.commandsrZ tuned.constsrZrJrErr6r8Zlogsr;r<rZPluginrrrrrs    PK$2]O=  4plugins/__pycache__/plugin_irqbalance.cpython-36.pycnu[3 irqbalance sysconfig file is missing. Is irqbalance installed?z,Failed to read irqbalance sysconfig file: %s) openrIRQBALANCE_SYSCONFIG_FILEreadIOErrorerrnoENOENTlogwarnerror)r ferrr_read_irqbalance_sysconfig1s  z+IrqbalancePlugin._read_irqbalance_sysconfigcCsZy&ttjd}|j|WdQRXdStk rT}ztjd|dSd}~XnXdS)NwTz-Failed to write irqbalance sysconfig file: %sF)rrrwriterrr )r contentr!r"rrr_write_irqbalance_sysconfig<sz,IrqbalancePlugin._write_irqbalance_sysconfigcCs |d|S)NzIRQBALANCE_BANNED_CPUS=%s r)r sysconfigbanned_cpumaskrrr_write_banned_cpusEsz#IrqbalancePlugin._write_banned_cpuscCs8g}x(|jdD]}tjd|s|j|qWdj|S)N z\s*IRQBALANCE_BANNED_CPUS=)splitrematchappendjoin)r r(lineslinerrr_clear_banned_cpusHs  z#IrqbalancePlugin._clear_banned_cpuscCs2|jjdddgdgd\}}|dkr.tjddS)NZ systemctlz try-restartZ irqbalance)Z no_errorsrz.Failed to restart irqbalance. Is it installed?)_cmdZexecuterr)r Zretcodeoutrrr_restart_irqbalanceOs z$IrqbalancePlugin._restart_irqbalancecCs@|j}|dkrdS|j|}|j||}|j|r<|jdS)N)r#r3r*r'r7)r r)r&rrr_set_banned_cpusXs   z!IrqbalancePlugin._set_banned_cpuscCs4|j}|dkrdS|j|}|j|r0|jdS)N)r#r3r'r7)r r&rrr_restore_banned_cpusas   z%IrqbalancePlugin._restore_banned_cpusrF)Z per_devicec Csd}|dk rjt|jj|}t|j}|j|rB|jjt|}n(djdd|jD}tj d||f|sr|r~|dkr~dS|rdS|r|j |n|j dS)N,cSsg|] }t|qSr)str).0xrrr rsz1IrqbalancePlugin._banned_cpus..zGInvalid banned_cpus specified, '%s' does not match available cores '%s') setr5Zcpulist_unpackr issubsetZ cpulist2hexlistr0rr r8r9) r ZenablingvalueZverifyZignore_missingr)ZbannedZpresentZstr_cpusrrr _banned_cpusis     zIrqbalancePlugin._banned_cpus)__name__ __module__ __qualname____doc__rrr classmethodrr#r'r*r3r7r8r9rrC __classcell__rr)rrr s      r)rZ decoratorsrZtunedrZ tuned.logsrr r-ZlogsgetrZPluginrrrrrs    PK$2]v*plugins/__pycache__/hotplug.cpython-36.pycnu[3 ddlmZddljZddlZejjZGdddej Z dS))baseNcseZdZdZfddZfddZddZdd Zd d Zd d Z ddZ ddZ ddZ ddZ ddZddZddZddZZS)Pluginz: Base class for plugins with device hotpluging support. cstt|j||dS)N)superr__init__)selfargskwargs) __class__/usr/lib/python3.6/hotplug.pyr szPlugin.__init__cstt|j|jdS)N)rrcleanup_hardware_events_cleanup)r)r r r r szPlugin.cleanupcCsdS)Nr )rr r r _hardware_events_initszPlugin._hardware_events_initcCsdS)Nr )rr r r rszPlugin._hardware_events_cleanupcCs |jdS)N)r)rr r r _init_devicesszPlugin._init_devicescCsN|dkr&tjd|j|j|jn$|dkrJtjd|j|j|jdS)Naddzdevice '%s' addedremovezdevice '%s' removed)loginfoZsys_name _add_device_remove_device)rZeventZdevicer r r _hardware_events_callbacks z Plugin._hardware_events_callbackcCsdtjd|j|f|jj||j||jd|g|j|||j||jd|g|j j|dS)Nz!instance %s: adding new device %sZapply) rrname_assigned_devicesr_call_device_script script_pre_added_device_apply_tuning script_postprocessed_devices)rinstance device_namer r r _add_device_process$s   zPlugin._add_device_processcCsr||j|jBkrdSxXt|jjD],\}}t|j||gdkr$|j||Pq$Wtj d||jj |dS)Nrzno instance wants %s) r _free_deviceslist _instancesitemslenZ_get_matching_devicesr!rdebugr)rr Z instance_namerr r r r,s zPlugin._add_devicecCs8x|D]}|j||qWt|jt|jdk|_dS)zN Add devices specified by the set to the instance, no check is performed. rN)r!r&rassigned_devicesactive)rr device_namesdevr r r _add_devices_nocheck8s zPlugin._add_devices_nocheckcCsx||jkrt|j||jd|g|j|||j||jd|g|jj|t|jt|jdk|_|j j|dSdS)NZunapplyrTF) rrr_removed_device_unapply_tuningrrr&r(r)r)rrr r r r _remove_device_processCs    zPlugin._remove_device_processcCsJ||j|jBkrdSx0t|jjD]}|j||r$Pq$W|jj|dS)zVRemove device from the instance Parameters: device_name -- name of the device N)rr"r#r$valuesr.r)rr rr r r rQs  zPlugin._remove_devicecCsx|D]}|j||qWdS)zS Remove devices specified by the set from the instance, no check is performed. N)r.)rrr*r+r r r _remove_devices_nocheckas zPlugin._remove_devices_nocheckcCs6|j||g|jr2|jjtjtjr2|j||dS)N)Z_execute_all_device_commandshas_dynamic_tuning _global_cfggetconstsCFG_DYNAMIC_TUNINGCFG_DEF_DYNAMIC_TUNINGZ_instance_apply_dynamic)rrr r r r rhsz!Plugin._added_device_apply_tuningcCs:|jr$|jjtjtjr$|j|||j||gdddS)NT)r)r1r2r3r4r5r6Z_instance_unapply_dynamicZ_cleanup_all_device_commands)rrr r r r r-ms z%Plugin._removed_device_unapply_tuning)__name__ __module__ __qualname____doc__rr rrrrr!rr,r.rr0rr- __classcell__r r )r r rs    r) rZ tuned.constsr4Z tuned.logsZtunedZlogsr3rrr r r r s   PK$2]?z!!5plugins/__pycache__/plugin_audio.cpython-36.opt-1.pycnu[3 s   PK$2]s\\-plugins/__pycache__/plugin_net.cpython-36.pycnu[3 Z!d?d@Z"ed<dkdAdBZ#edCd+d,dDdEZ$edCdldFdGZ%dHdIZ&dJdKZ'dLdMZ(dNdOZ)dPdQZ*dRdSZ+dTdUZ,dmdVdWZ-dXdYZ.e/dZd+d,d[d\Z0e/d]d+d,d^d_Z1e/d`d+d,dadbZ2e/dcd+d,dddeZ3e/dfd+d,dgdhZ4Z5S)nNetTuningPlugina `net`:: Configures network driver, hardware and Netfilter settings. Dynamic change of the interface speed according to the interface utilization is also supported. The dynamic tuning is controlled by the [option]`dynamic` and the global [option]`dynamic_tuning` option in `tuned-main.conf`. + The [option]`wake_on_lan` option sets wake-on-lan to the specified value as when using the `ethtool` utility. + .Set Wake-on-LAN for device eth0 on MagicPacket(TM) ==== ---- [net] devices=eth0 wake_on_lan=g ---- ==== + The [option]`coalesce` option allows changing coalescing settings for the specified network devices. The syntax is: + [subs="+quotes,+macros"] ---- coalesce=__param1__ __value1__ __param2__ __value2__ ... __paramN__ __valueN__ ---- Note that not all the coalescing parameters are supported by all network cards. For the list of coalescing parameters of your network device, use `ethtool -c device`. + .Setting coalescing parameters rx/tx-usecs for all network devices ==== ---- [net] coalesce=rx-usecs 3 tx-usecs 16 ---- ==== + The [option]`features` option allows changing the offload parameters and other features for the specified network devices. To query the features of your network device, use `ethtool -k device`. The syntax of the option is the same as the [option]`coalesce` option. + .Turn off TX checksumming, generic segmentation and receive offload ==== ---- [net] features=tx off gso off gro off ---- ==== The [option]`pause` option allows changing the pause parameters for the specified network devices. To query the pause parameters of your network device, use `ethtool -a device`. The syntax of the option is the same as the [option]`coalesce` option. + .Disable autonegotiation ==== ---- [net] pause=autoneg off ---- ==== + The [option]`ring` option allows changing the rx/tx ring parameters for the specified network devices. To query the ring parameters of your network device, use `ethtool -g device`. The syntax of the option is the same as the [option]`coalesce` option. + .Change the number of ring entries for the Rx/Tx rings to 1024/512 respectively ===== ----- [net] ring=rx 1024 tx 512 ----- ===== + The [option]`channels` option allows changing the numbers of channels for the specified network device. A channel is an IRQ and the set of queues that can trigger that IRQ. To query the channels parameters of your network device, use `ethtool -l device`. The syntax of the option is the same as the [option]`coalesce` option. + .Set the number of multi-purpose channels to 16 ===== ----- [net] channels=combined 16 ----- ===== + A network device either supports rx/tx or combined queue mode. The [option]`channels` option automatically adjusts the parameters based on the mode supported by the device as long as a valid configuration is requested. + The [option]`nf_conntrack_hashsize` option sets the size of the hash table which stores lists of conntrack entries by writing to `/sys/module/nf_conntrack/parameters/hashsize`. + .Adjust the size of the conntrack hash table ==== ---- [net] nf_conntrack_hashsize=131072 ---- ==== + The [option]`txqueuelen` option allows changing txqueuelen (the length of the transmit queue). It uses `ip` utility that is in package iproute recommended for TuneD, so the package needs to be installed for its correct functionality. To query the txqueuelen parameters of your network device use `ip link show` and the current value is shown after the qlen column. + .Adjust the length of the transmit queue ==== ---- [net] txqueuelen=5000 ---- ==== + The [option]`mtu` option allows changing MTU (Maximum Transmission Unit). It uses `ip` utility that is in package iproute recommended for TuneD, so the package needs to be installed for its correct functionality. To query the MTU parameters of your network device use `ip link show` and the current value is shown after the MTU column. + .Adjust the size of the MTU ==== ---- [net] mtu=9000 ---- ==== cs6tt|j||d|_d|_t|_i|_d|_dS)Ng?T) superr__init___load_smallest _level_stepsr_cmd_re_ip_link_show_use_ip)selfargskwargs) __class__ /usr/lib/python3.6/plugin_net.pyr s zNetTuningPlugin.__init__cCshd|_t|_t|_tjd}x.|jjdD]}|j|j r.|jj |j q.Wt j dt|jdS)NTz(?!.*/virtual/.*)netz devices: %s)Z_devices_supportedsetZ _free_devicesZ_assigned_devicesrecompile_hardware_inventoryZ get_devicesmatchZ device_pathaddZsys_namelogdebugstr)rZre_not_virtualdevicerrr _init_devicess  zNetTuningPlugin._init_devicescsfdd|DS)Ncsg|]}jjd|qS)r)rZ get_device).0x)rrr sz7NetTuningPlugin._get_device_objects..r)rZdevicesr)rr_get_device_objectssz#NetTuningPlugin._get_device_objectscCsXd|_|j|jdr.levelrreadwriterz%s: setting 100Mbpsdz%s: setting max speedz %s load: read %0.2f, write %0.2fz$%s idle: read %d, write %d, level %d)r(Zget_device_loadr*_init_stats_and_idle _update_stats _update_idler)r rinforZ set_speed set_max_speedr)rr+r loadZstatsZidlerrrr/s&     ($ z(NetTuningPlugin._instance_update_dynamiccCs2dddddddddddddddddddddddS)N)z adaptive-rxz adaptive-txzrx-usecsz rx-framesz rx-usecs-irqz rx-frames-irqztx-usecsz tx-framesz tx-usecs-irqz tx-frames-irqzstats-block-usecsz pkt-rate-lowz rx-usecs-lowz rx-frames-lowz tx-usecs-lowz tx-frames-lowz pkt-rate-highz rx-usecs-highzrx-frames-highz tx-usecs-highztx-frames-highzsample-intervalr)clsrrr_get_config_options_coalesces,z,NetTuningPlugin._get_config_options_coalescecCs ddddS)N)autonegrxtxr)r=rrr_get_config_options_pausesz)NetTuningPlugin._get_config_options_pausecCsdddddS)N)r@zrx-minizrx-jumborAr)r=rrr_get_config_options_ringsz(NetTuningPlugin._get_config_options_ringcCsdddddS)N)r@rAothercombinedr)r=rrr_get_config_options_channelssz,NetTuningPlugin._get_config_options_channelsc Csddddddddddd S)NT) r& wake_on_lannf_conntrack_hashsizefeaturescoalescepauseringchannels txqueuelenmtur)r=rrr_get_config_optionssz#NetTuningPlugin._get_config_optionscCsF|jt|j}ddgd|dgd|j|<dddd|j|<dS)Nrr)newmax)r3r4r5) _calc_speedrZ get_max_speedr*r))rr+r Z max_speedrrrr7sz$NetTuningPlugin._init_stats_and_idlecCs|j|d|j|d<}||j|d<ddt||D}||j|d<|j|d}ddt||D}||j|d<t|dt|d|j|d <t|d t|d |j|d <dS) NrSoldcSsg|]}|d|dqS)rrr)r"Znew_oldrrrr$(sz1NetTuningPlugin._update_stats..diffrTcSsg|] }t|qSr)rT)r"Zpairrrrr$-srr4rRr5)r*zipfloat)rr+r Znew_loadZold_loadrWZ old_max_loadZmax_loadrrrr8"s"zNetTuningPlugin._update_statscCsLxFdD]>}|j|||jkr6|j||d7<qd|j||<qWdS)Nr4r5rr)r4r5)r*r r))rr+r Z operationrrrr94s zNetTuningPlugin._update_idlecCsH||jkrD|j|ddkrDd|j|d<tjd|t|jdS)Nr3rz%s: setting max speed)r)rr:rr;)rr+r rrr_instance_unapply_dynamic<sz)NetTuningPlugin._instance_unapply_dynamiccCstd|dS)Ng333333?ig333333@g333333#A)r1)rZspeedrrrrUBszNetTuningPlugin._calc_speedcCs|jj|}ttjdd|j}t|}|ddkrPtjd|t|fdS|dkr^t St t t |ddd|dddS)Nz (:\s*)|(\s+)|(\s*;\s*)|(\s*,\s*) rRrzinvalid %s parameter: '%s'r) Z _variablesexpandrrsubsplitlenrerrordictlistrX)rr2contextvZlvrrr_parse_config_parametersKs  z(NetTuningPlugin._parse_config_parameterscCs||jjddddddddd d d d d dddddd|}dd|jdD}t|dkrXdStdddd|ddDDS)Nz adaptive-rx:z adaptive-tx:zrx-frames-low:zrx-frames-high:ztx-frames-low:ztx-frames-high:zlro:zrx:ztx:zsg:ztso:zufo:zgso:zgro:zrxvlan:ztxvlan:zntuple:zrxhash:)z Adaptive RX:z\s+TX:z rx-frame-low:zrx-frame-high:z tx-frame-low:ztx-frame-high:zlarge-receive-offload:zrx-checksumming:ztx-checksumming:zscatter-gather:ztcp-segmentation-offload:zudp-fragmentation-offload:zgeneric-segmentation-offload:zgeneric-receive-offload:zrx-vlan-offload:ztx-vlan-offload:zntuple-filters:zreceive-hashing:cSs2g|]*}tt|dkrtjdt| r|qS)rz \[fixed\]$)r`rrsearch)r"rerrrr$ssz. rRcSsg|]}t|dkr|qS)rR)r`)r"urrrr$xscSsg|]}tjdt|qS)z:\s*)rr_r)r"rerrrr$xsr)r multiple_re_replacer_r`rb)rr2Zvlrrr_parse_device_parametersZs0 z(NetTuningPlugin._parse_device_parameterscCsdS)Nz,/sys/module/nf_conntrack/parameters/hashsizer)rrrr_nf_conntrack_hashsize_pathzsz+NetTuningPlugin._nf_conntrack_hashsize_pathrGT)Z per_devicecCs^|dkr dStjddt|}tjdtd|s@tjddS|sZ|jjdd|d|g|S) N0dz^[z]+$zIncorrect 'wake_on_lan' value.ethtoolz-sZwol) rr^rr WOL_VALUESrwarnr execute)rr2r simremoverrr_set_wake_on_lan~s z NetTuningPlugin._set_wake_on_lanFc CsXd}y:tjdtd|jjd|gdtj}|r<|jd}Wntk rRYnX|S)Nz.*Wake-on:\s*([z]+).*ror)rrrpr rrSgroupIOError)rr ignore_missingr2mrrr_get_wake_on_lans(z NetTuningPlugin._get_wake_on_lanrHcCsN|dkr dSt|}|dkrF|sB|jj|j||r:tjgndd|SdSdS)NrF)Zno_error)r1r Z write_to_filerlerrnoENOENT)rr2rsrtZhashsizerrr_set_nf_conntrack_hashsizesz*NetTuningPlugin._set_nf_conntrack_hashsizecCs(|jj|j}t|dkr$t|SdS)Nr)r Z read_filerlr`r1)rr2rrr_get_nf_conntrack_hashsizes z*NetTuningPlugin._get_nf_conntrack_hashsizecCsz|js dSddg|}|jj|tjgdd\}}}|tj krRtjdd|_dS|rvtjdtjd||fdS|S) NZiplinkT) no_errorsZ return_errz0ip command not found, ignoring for other devicesFzProblem calling ip commandz(rc: %s, msg: '%s')) rr rrr|r}rrqr:r)rrZrcoutZerr_msgrrr _call_ip_links    zNetTuningPlugin._call_ip_linkNcCsdg}|r|j||j|S)NZshow)appendr)rr rrrr _ip_link_shows zNetTuningPlugin._ip_link_showrNcCsr|dkr dSy t|Wn"tk r:tjd|dSX|sn|jdd|d|g}|dkrntjd|dS|S)Nz$txqueuelen value '%s' is not integerrdevrNz%Cannot set txqueuelen for device '%s')r1 ValueErrorrrqr)rr2r rsrtresrrr_set_txqueuelens zNetTuningPlugin._set_txqueuelencCs(||jkrtjd||j|<|j|S)z@ Return regex for int arg value from "ip link show" command z.*\s+%s\s+(\d+))rrr)rargrrr_get_re_ip_link_shows z$NetTuningPlugin._get_re_ip_link_showcCs`|j|}|dkr(|s$tjd|dS|jdj|}|dkrV|sRtjd|dS|jdS)NzECannot get 'ip link show' result for txqueuelen value for device '%s'ZqlenzFCannot get txqueuelen value from 'ip link show' result for device '%s'r)rrr:rrgrw)rr ryrrrrr_get_txqueuelens zNetTuningPlugin._get_txqueuelenrOcCsr|dkr dSy t|Wn"tk r:tjd|dSX|sn|jdd|d|g}|dkrntjd|dS|S)Nzmtu value '%s' is not integerrrrOzCannot set mtu for device '%s')r1rrrqr)rr2r rsrtrrrr_set_mtus zNetTuningPlugin._set_mtucCs`|j|}|dkr(|s$tjd|dS|jdj|}|dkrV|sRtjd|dS|jdS)Nz>Cannot get 'ip link show' result for mtu value for device '%s'rOz?Cannot get mtu value from 'ip link show' result for device '%s'r)rrr:rrgrw)rr ryrrrrr_get_mtus zNetTuningPlugin._get_mtucCsl|dkr dSt|j}|j|j|j|jd}t||j}|j|shtjd|t ||fdSdS)NrIT)rJrKrLrMzunknown %s parameter(s): %sF) rkeysr>rBrCrFissubsetrrar)rrdrnZparamsZsupported_getterZ supportedrrr_check_parameters s   z!NetTuningPlugin._check_parameterscCsR|jjdddd|}|jddd}dd|D}td dd d|DDS) Nr?r@rA)Z AutonegotiateRXTXrhrcSs&g|]}|dkrtjd| r|qS)z \[fixed\])rrg)r"r#rrrr$sz;NetTuningPlugin._parse_pause_parameters..cSsg|]}t|dkr|qS)rR)r`)r"r#rrrr$ scSsg|]}tjd|qS)z:\s*)rr_)r"r#rrrr$ s)r rjr_rb)rslrrr_parse_pause_parameterss z'NetTuningPlugin._parse_pause_parameterscCsjtjd|tjd}|d}|jjddddd|}|jd }d d |D}d d d d |DD}t|S)Nz^Current hardware settings:$)flagsrr@zrx-minizrx-jumborA)rzRX MinizRX JumborrhcSsg|]}|dkr|qS)rr)r"r#rrrr$,sz:NetTuningPlugin._parse_ring_parameters..cSsg|]}t|dkr|qS)rR)r`)r"r#rrrr$-scSsg|]}tjd|qS)z:\s*)rr_)r"r#rrrr$-s)rr_ MULTILINEr rjrb)rrarrrr_parse_ring_parameters#s  z&NetTuningPlugin._parse_ring_parameterscCsjtjd|tjd}|d}|jjddddd|}|jd }d d |D}d d d d |DD}t|S)Nz^Current hardware settings:$)rrr@rArDrE)rrZOtherZCombinedrhcSsg|]}|dkr|qS)rr)r"r#rrrr$:sz>NetTuningPlugin._parse_channels_parameters..cSsg|]}t|dkr|qS)rR)r`)r"r#rrrr$;scSsg|]}tjd|qS)z:\s*)rr_)r"r#rrrr$;s)rr_rr rjrb)rrrrrrr_parse_channels_parameters1s  z*NetTuningPlugin._parse_channels_parameterscCszg}d|kr(|jd|dd|dgn,ttt|dt|d}|jd|gttt|ddd|dddS)NrEr@rrArR)extendrrTr1rbrcrX)rrdZ params_list dev_paramsZmod_params_listZcntrrr_replace_channels_parameters>s z,NetTuningPlugin._replace_channels_parametersc CsRt|j}t|j}||}x,|D]$}tjd|||f|j|dq&WdS)aFilter unsupported parameters and log warnings about it Positional parameters: context -- context of change parameters -- parameters to change device -- name of device on which should be parameters set dev_params -- dictionary of currently known parameters of device z-%s parameter %s is not supported by device %sN)rrrZwarningpop) rrdZ parametersr rZsupported_parametersZparameters_to_changeZunsupported_parametersparamrrr_check_device_supportGs    z%NetTuningPlugin._check_device_supportc Csdddddd}||}|jjd||g\}}|dksBt|dkrFdS|j|j|j|j|jd}||}||} |d kr|j||  rdS| S) Nz-cz-kz-az-gz-l)rJrIrKrLrMrorrJ)r rrr`rkrrrr) rrdr context2optoptretr2Zcontext2parserparserrnrrr_get_device_parameters^s  z&NetTuningPlugin._get_device_parametersc Cs|dkst|dkrdS|j||}|dks:|j|| r>iS|r|j|||||dkrt|tt|dkr|j||jj ||}| rt|dkrt j d|t|fdddd d d }||}|jj d ||g|jj |d gd|S)NrrMn/armzsetting %s: %sz-Cz-Kz-Az-Gz-L)rJrIrKrLrMroP)r)rrm) r`rfrrrnextiterrr dict2listrrrr) rrdr2r rsrrnrrrrr_set_device_parametersps   $z&NetTuningPlugin._set_device_parametersc s|j||d}|r|j||}|dks2t|dkr6dS|j|||||ddks^tdkrbdSfdd|jD}t|}|r|jj|jj|k} |j|| ||d| S|j j |dj |jj|n|j j |} |j|| |ddS) N)Z command_nameZ device_namerF)rcs g|]\}}|kr||fqSrr)r"rr2) params_setrrr$sz6NetTuningPlugin._custom_parameters..)r r\) Z _storage_keyrr`ritemsrbr rZ_log_verification_resultZ_storagerjoinget) rrdstartr2r verifyZ storage_keyZparams_currentZrelevant_params_currentroriginal_valuer)rr_custom_parameterss:     z"NetTuningPlugin._custom_parametersrIcCs|jd||||S)NrI)r)rrr2r rryrrr _featuresszNetTuningPlugin._featuresrJcCs|jd||||S)NrJ)r)rrr2r rryrrr _coalesceszNetTuningPlugin._coalescerKcCs|jd||||S)NrK)r)rrr2r rryrrr_pauseszNetTuningPlugin._pauserLcCs|jd||||S)NrL)r)rrr2r rryrrr_ringszNetTuningPlugin._ringrMcCs|jd||||S)NrM)r)rrr2r rryrrr _channelsszNetTuningPlugin._channels)F)N)F)F)N)6__name__ __module__ __qualname____doc__r r!r%r,r.r0r/ classmethodr>rBrCrFrPr7r8r9rZrUrfrkrlZ command_setruZ command_getr{r~rrrrrrrrrrrrrrrrrZcommand_customrrrrr __classcell__rr)rrrsd                    &r)r|rrZ decoratorsZ tuned.logsZtunedZtuned.utils.nettoolrZtuned.utils.commandsrosrZlogsrrrpZPluginrrrrrs    PK$2]A1~??3plugins/__pycache__/decorators.cpython-36.opt-1.pycnu[3 .wrapperr )rrrr r )rrrr rs csfdd}|S)Ncsdd|_|S)NT)getr)r )r )rr r r !s zcommand_get..wrapperr )rr r )rr r s csfdd}|S)Ncsdd|_|S)NT)Zcustomrrr)r )r )rrrr r r *s  zcommand_custom..wrapperr )rrrr r )rrrr r)sN)Fr)Fr)__all__rrrr r r r s   PK$2]* nn,plugins/__pycache__/plugin_vm.cpython-36.pycnu[3 tj|||r6tjgndd|S|sPt j ddSdS)NdefragF)rzJOption 'transparent_hugepage.defrag' is not supported on current hardware.) rrr rrrr!r"r#rr)r r$r%r&r'r r r _set_transparent_hugepage_defragfs  z)VMPlugin._set_transparent_hugepage_defragcCs6tjj|jd}tjj|r.tjtj|SdSdS)Nr-)rrr rrrr*r)r r'r r r _get_transparent_hugepage_defragss z)VMPlugin._get_transparent_hugepage_defragN)__name__ __module__ __qualname____doc__ classmethodr rrrZ command_setr(r)Z command_getr+r,r.r/r r r r rs    r)rZ decoratorsZ tuned.logsZtunedrr"structZglobZtuned.utils.commandsrZlogsgetrrZPluginrr r r r s   PK$2]^e e .plugins/__pycache__/plugin_acpi.cpython-36.pycnu[3  `acpi`:: Configures the ACPI driver. + The only currently supported option is [option]`platform_profile`, which sets the ACPI platform profile sysfs attribute, a generic power/performance preference API for other drivers. Multiple profiles can be specified, separated by `|`. The first available profile is selected. + -- .Selecting a platform profile ==== ---- [acpi] platform_profile=balanced|low-power ---- Using this option, *TuneD* will try to set the platform profile to `balanced`. If that fails, it will try to set it to `low-power`. ==== -- cstt|j||dS)N)superr__init__)selfargskwargs) __class__!/usr/lib/python3.6/plugin_acpi.pyr$szACPIPlugin.__init__cCsddiS)Nplatform_profiler )clsr r r_get_config_options'szACPIPlugin._get_config_optionscCsd|_d|_dS)NTF)Z_has_static_tuningZ_has_dynamic_tuning)r instancer r r_instance_init+szACPIPlugin._instance_initcCsdS)Nr )r rr r r_instance_cleanup/szACPIPlugin._instance_cleanupcCstjjtdS)NZplatform_profile_choices)ospathjoinr)rr r r_platform_profile_choices_path2sz)ACPIPlugin._platform_profile_choices_pathcCstjjtdS)Nr)rrrr)rr r r_platform_profile_path6sz!ACPIPlugin._platform_profile_pathrcCstjj|jstjddSdd|jdD}t|jj |j j}xZ|D]R}||kr|stj d||jj |j||rt jgndd|Stjd|qPWtjd dS) Nz5ACPI platform_profile is not supported on this systemcSsg|] }|jqSr )strip).0profiler r r ?sz4ACPIPlugin._set_platform_profile..|z Setting platform_profile to '%s'F)Zno_errorz+Requested platform_profile '%s' unavailablezDFailed to set platform_profile. Is the value in the profile correct?)rrisfilerlogdebugsplitset_cmd read_filerinfoZ write_to_fileerrnoENOENTwarnerror)r ZprofilesZsimremoveZavail_profilesrr r r_set_platform_profile:s   z ACPIPlugin._set_platform_profileFcCs2tjj|jstjddS|jj|jjS)Nz5ACPI platform_profile is not supported on this system) rrrrr r!r$r%r)r Zignore_missingr r r_get_platform_profileLs z ACPIPlugin._get_platform_profile)F)__name__ __module__ __qualname____doc__r classmethodrrrrrZ command_setr,Z command_getr- __classcell__r r )r rr s    r)rZ decoratorsrr'Z tuned.logsZtunedZ tuned.constsrZlogsgetr ZPluginrr r r rs   PK$2][Vyaa4plugins/__pycache__/plugin_bootloader.cpython-36.pycnu[3 Z%d?d@Z&e'dAdBdCZ(e'dDdEdFZ)e'dGdHdIZ*e'dJdKdLdMdNdOZ+e'dPdKdLdMdQdRZ,e'dSdKdLdMdTdUZ-e'dVdKdLdMdWdXZ.dYdZZ/Z0S)\BootloaderPlugina `bootloader`:: Adds options to the kernel command line. This plug-in supports the GRUB 2 boot loader and the Boot Loader Specification (BLS). + NOTE: *TuneD* will not remove or replace kernel command line parameters added via other methods like *grubby*. *TuneD* will manage the kernel command line parameters added via *TuneD*. Please refer to your platform bootloader documentation about how to identify and manage kernel command line parameters set outside of *TuneD*. + Customized non-standard location of the GRUB 2 configuration file can be specified by the [option]`grub2_cfg_file` option. + The kernel options are added to the current GRUB configuration and its templates. Reboot the system for the kernel option to take effect. + Switching to another profile or manually stopping the `tuned` service removes the additional options. If you shut down or reboot the system, the kernel options persist in the [filename]`grub.cfg` file and grub environment files. + The kernel options can be specified by the following syntax: + [subs="+quotes,+macros"] ---- cmdline__suffix__=__arg1__ __arg2__ ... __argN__ ---- + Or with an alternative, but equivalent syntax: + [subs="+quotes,+macros"] ---- cmdline__suffix__=+__arg1__ __arg2__ ... __argN__ ---- + Where __suffix__ can be arbitrary (even empty) alphanumeric string which should be unique across all loaded profiles. It is recommended to use the profile name as the __suffix__ (for example, [option]`cmdline_my_profile`). If there are multiple [option]`cmdline` options with the same suffix, during the profile load/merge the value which was assigned previously will be used. This is the same behavior as any other plug-in options. The final kernel command line is constructed by concatenating all the resulting [option]`cmdline` options. + It is also possible to remove kernel options by the following syntax: + [subs="+quotes,+macros"] ---- cmdline__suffix__=-__arg1__ __arg2__ ... __argN__ ---- + Such kernel options will not be concatenated and thus removed during the final kernel command line construction. + .Modifying the kernel command line ==== For example, to add the [option]`quiet` kernel option to a *TuneD* profile, include the following lines in the [filename]`tuned.conf` file: ---- [bootloader] cmdline_my_profile=+quiet ---- An example of a custom profile `my_profile` that adds the [option]`isolcpus=2` option to the kernel command line: ---- [bootloader] cmdline_my_profile=isolcpus=2 ---- An example of a custom profile `my_profile` that removes the [option]`rhgb quiet` options from the kernel command line (if previously added by *TuneD*): ---- [bootloader] cmdline_my_profile=-rhgb quiet ---- ==== + .Modifying the kernel command line, example with inheritance ==== For example, to add the [option]`rhgb quiet` kernel options to a *TuneD* profile `profile_1`: ---- [bootloader] cmdline_profile_1=+rhgb quiet ---- In the child profile `profile_2` drop the [option]`quiet` option from the kernel command line: ---- [main] include=profile_1 [bootloader] cmdline_profile_2=-quiet ---- The final kernel command line will be [option]`rhgb`. In case the same [option]`cmdline` suffix as in the `profile_1` is used: ---- [main] include=profile_1 [bootloader] cmdline_profile_1=-quiet ---- It will result in the empty kernel command line because the merge executes and the [option]`cmdline_profile_1` gets redefined to just [option]`-quiet`. Thus there is nothing to remove in the final kernel command line processing. ==== + The [option]`initrd_add_img=IMAGE` adds an initrd overlay file `IMAGE`. If the `IMAGE` file name begins with '/', the absolute path is used. Otherwise, the current profile directory is used as the base directory for the `IMAGE`. + The [option]`initrd_add_dir=DIR` creates an initrd image from the directory `DIR` and adds the resulting image as an overlay. If the `DIR` directory name begins with '/', the absolute path is used. Otherwise, the current profile directory is used as the base directory for the `DIR`. + The [option]`initrd_dst_img=PATHNAME` sets the name and location of the resulting initrd image. Typically, it is not necessary to use this option. By default, the location of initrd images is `/boot` and the name of the image is taken as the basename of `IMAGE` or `DIR`. This can be overridden by setting [option]`initrd_dst_img`. + The [option]`initrd_remove_dir=VALUE` removes the source directory from which the initrd image was built if `VALUE` is true. Only 'y', 'yes', 't', 'true' and '1' (case insensitive) are accepted as true values for this option. Other values are interpreted as false. + .Adding an overlay initrd image ==== ---- [bootloader] initrd_remove_dir=True initrd_add_dir=/tmp/tuned-initrd.img ---- This creates an initrd image from the `/tmp/tuned-initrd.img` directory and and then removes the `tuned-initrd.img` directory from `/tmp`. ==== + The [option]`skip_grub_config=VALUE` does not change grub configuration if `VALUE` is true. However, [option]`cmdline` options are still processed, and the result is used to verify the current cmdline. Only 'y', 'yes', 't', 'true' and '1' (case insensitive) are accepted as true values for this option. Other values are interpreted as false. + .Do not change grub configuration ==== ---- [bootloader] skip_grub_config=True cmdline=+systemd.cpu_affinity=1 ---- ==== cs6tjjtjstjdtt|j ||t |_ dS)Nz4Required GRUB2 template not found, disabling plugin.) ospathisfileconstsZGRUB2_TUNED_TEMPLATE_PATHrZNotSupportedPluginExceptionsuperr__init__r_cmd)selfargskwargs) __class__'/usr/lib/python3.6/plugin_bootloader.pyrs zBootloaderPlugin.__init__cCsVd|_d|_d|_d|_d|_d|_d|_d|_|j|_ |j |_ |j dk |_ dS)NFT)Z_has_dynamic_tuningZ_has_static_tuningupdate_grub2_cfg_skip_grub_config_val_initrd_remove_dir_initrd_dst_img_val _cmdline_val _initrd_val_get_grub2_cfg_files_grub2_cfg_file_names _bls_enabled_bls_rpm_ostree_status _rpm_ostree)rinstancerrr_instance_inits  zBootloaderPlugin._instance_initcCsdS)Nr)rr#rrr_instance_cleanupsz"BootloaderPlugin._instance_cleanupcCsddddddddS)N)grub2_cfg_fileinitrd_dst_imginitrd_add_imginitrd_add_dirinitrd_remove_dircmdlineskip_grub_configr)clsrrr_get_config_optionssz$BootloaderPlugin._get_config_optionsrcCs`i}|j}xN|jD]B}||kr|jdd}|j|dgjt|dkrR|dndqW|S)z Returns dict created from options e.g.: _options_to_dict("A=A A=B A B=A C=A", "A=B B=A B=B") returns {'A': ['A', None], 'C': ['A']} =rrN)split setdefaultappendlen)optionsZomitdoZarrrrr_options_to_dicts .z!BootloaderPlugin._options_to_dictcCsdjdd|jDS)N cSs2g|]*\}}|D]}|dk r(|d|n|qqS)Nr/r).0kvZv1rrr sz5BootloaderPlugin._dict_to_options..)joinitems)r5rrr_dict_to_optionssz!BootloaderPlugin._dict_to_optionscCsr|jjddgdd\}}}tjd||f|dkr8dS|j}t|dksX|dd krjtjd |dS|d S) zW Returns status of rpm-ostree transactions or None if not run on rpm-ostree system z rpm-ostreeZstatusT) return_errz.rpm-ostree status output stdout: %s stderr: %srNzState:z2Exceptional format of rpm-ostree status result: %sr)rexecutelogdebugr0r3warn)rrcouterrZsplitedrrrr!sz#BootloaderPlugin._rpm_ostree_statuscCsFd}d}x(t|D]}|jdkr&dSt|qW|jdkrBdSdS)N g?ZidleTF)ranger!r)rZ sleep_cyclesZ sleep_secsirrr_wait_till_idles   z BootloaderPlugin._wait_till_idlecs|jjddgdd\}}}tjd||f|dkr8dS|j|}|jsXtjddSi}|j|j}x8|j D],\} x| D]} |j | qW| |<qtWi} |j|j} x|j D]~\} |j r$tjd |f|j gj ||j fd d |Dg|<|j gj | | | <qW| |krdtjd | || |fStjd | |f|jjddgdd | Ddd |Ddd\}} }|dkrtjd||j|ddfS|| |fSdS)z Method for appending or deleting rpm-ostree karg returns None if rpm-ostree not present or is run on not ostree system or tuple with new kargs, appended kargs and deleted kargs z rpm-ostreekargsT)r@z'rpm-ostree output stdout: %s stderr: %srNzCannot wait for transaction endz)adding rpm-ostree kargs %s: %s for deletecs$g|]}|dk rd|nqS)Nr/r)r9r;)r:rrr<.sz6BootloaderPlugin._rpm_ostree_kargs..z3skipping rpm-ostree kargs - append == deleting (%s)z2rpm-ostree kargs - appending: '%s'; deleting: '%s'cSsg|] }d|qS)z --append=%sr)r9r;rrrr<9scSsg|] }d|qS)z --delete=%sr)r9r;rrrr<:sz-Something went wrong with rpm-ostree kargs %s)NNN)NNN)rrBrCrDr7rLerrorr?r0r>removegetr1extendinfo)rr2deleterFrGrHrMdeletedZ delete_paramsvalr;appendedZ append_params_r)r:r_rpm_ostree_kargs sF         z"BootloaderPlugin._rpm_ostree_kargsc CsV|jj}g}xR|D]J}t|jdr4|j|q||krJ||||<qtjd||jjfqWd}x|D]}||}|dksn|dkrqn|d}|dd}|ddj } |dks|d kr|dkr| dkr|d | 7}qn|d kr(| dkr4x@| j D]&} t j | } t j d | d d|}qWqn|d |7}qnW|j }|dkrR||d<|S)zSMerge provided options with plugin default options and merge all cmdline.* options.r+z$Unknown option '%s' for plugin '%s'.rNrrrA+\-r8z(\A|\s)z (?=\Z|\s))rZrYr[)r.copystr startswithr2rCrEr__name__stripr0reescapesub) rr4Z effectiveZ cmdline_keyskeyr+rUopZop1valspZregexrrr_get_effective_optionsAs:         z'BootloaderPlugin._get_effective_optionscCs.g}x$tjD]}tjj|r |j|q W|S)N)r ZGRUB2_CFG_FILESr r existsr2)rZ cfg_filesfrrrrcs   z%BootloaderPlugin._get_grub2_cfg_filescCsH|jjtjdd}t|dkr2tjdtjdStjd|tj ddk S)NT)no_errorrzcannot read '%s'Fz=^\s*GRUB_ENABLE_BLSCFG\s*=\s*\"?\s*[tT][rR][uU][eE]\s*\"?\s*$)flags) r read_filer GRUB2_DEFAULT_ENV_FILEr3rCrRrasearch MULTILINE)rgrub2_default_envrrrrjs  zBootloaderPlugin._bls_enabledcCs|jjtj|S)N)radd_modify_option_in_filer BOOT_CMDLINE_FILE)rr5rrr_patch_bootcmdlinessz#BootloaderPlugin._patch_bootcmdlinecCs|jtjdtjdi|js*tjddSx4|jD]*}|jj|dtj ddtj diddq2W|j dk rtjd|j |jj |j dS)Nrzcannot find grub.cfg to patchzset\s+F)addzremoving initrd image '%s') rtr BOOT_CMDLINE_TUNED_VARBOOT_CMDLINE_INITRD_ADD_VARrrCrRrrrGRUB2_TUNED_VARGRUB2_TUNED_INITRD_VARrunlink)rrjrrr_remove_grub2_tuningvs  * z%BootloaderPlugin._remove_grub2_tuningcCsf|jjtj}tjtjd|tjd}|r2|dnd}tjtjd|tjd}|rZ|dnd}||fS)Nz =\"(.*)\")rlrr) rrmr rsrarorvrpBOOT_CMDLINE_KARGS_DELETED_VAR)rrjrVrTrrr_get_rpm_ostree_changess z(BootloaderPlugin._get_rpm_ostree_changescCs@|j\}}|j|j||j|d|jtjdtjdidS)N)r2rSr)r}rXr7rtr rvr|)rrVrTrrr_remove_rpm_ostree_tunings z*BootloaderPlugin._remove_rpm_ostree_tuningcCsR|tjkrN|j rN|jr,tjd|jn"tjd|j|jddddS)Nz4removing rpm-ostree tuning previously added by Tunedz/removing grub2 tuning previously added by Tunedr) tuned_params tuned_initrd) r Z ROLLBACK_FULLrr"rCrRr~r{_update_grubenv)rr#Zrollbackrrr_instance_unapply_statics   z)BootloaderPlugin._instance_unapply_staticcCstjdtjdtjdd|tjd}tjdtjd|tjd}tjdtjdd|tjd}tjdtjd|tjd}tjtjdd|tjd}tjtj dd|tjdS) Nzunpatching grub.cfgz ^\s*set\s+z\s*=.* r)rlz *\$z\nz\n+) rCrDrarcr rxrpryGRUB2_TEMPLATE_HEADER_BEGINGRUB2_TEMPLATE_HEADER_END)r grub2_cfgcfgrrr_grub2_cfg_unpatchs z#BootloaderPlugin._grub2_cfg_unpatchcCstjddtjd}x8|D]0}|d|jj|d|jj||d7}qW|tjd7}tjd||tj d }tj tj d }xt|D]l}tjd |d d |||tj d }tjd |d||dd|tj d }tjd |dd|tj d }qW|S)Nzinitial patching of grub.cfgz\1\n\n zset z="z" z\nz+^(\s*###\s+END\s+[^#]+/00_header\s+### *)\n)rl)linuxZinitrdz^(\s*z(16|efi)?\s+.*)$z\1 $z(?:16|efi)?\s+\S+rescue.*)\$z *(.*)$z\1\2z(?:16|efi)?\s+\S+rescue.*) +$z\1) rCrDr rrrbrrarcrprxry)rrr5soptZd2rKrrr_grub2_cfg_patch_initials  0 $( z)BootloaderPlugin._grub2_cfg_patch_initialcCs|jjtj}t|dkr.tjdtjdStjtjd}d}xv|D]n}t j d|d||d|t j ddkrFd }|dd kr|d 7}||d |d |d||d7}qFW|rtj dtj|jj tj|d S)Nrzcannot read '%s'F)ZGRUB_CMDLINE_LINUX_DEFAULTZGRUB_INITRD_OVERLAYz^[^#]*\bz \s*=.*\\\$z\b.*$)rlTrrz="${z:+$z }\$z" z patching '%s')rrmr rnr3rCrRrxryrarorprD write_to_file)rrqr5writerKrrr_grub2_default_env_patchs   * ,z)BootloaderPlugin._grub2_default_env_patchcCs|jjtj}t|dkr.tjdtjdSd}tjdtj d|tj drd}tj dtj dd |tj d}|d d kr|d 7}|rtj d tj|jj tj|dS)Nrzcannot read '%s'Fzb^GRUB_CMDLINE_LINUX_DEFAULT=\"\$\{GRUB_CMDLINE_LINUX_DEFAULT:\+\$GRUB_CMDLINE_LINUX_DEFAULT \}\\\$z"$)rlTz"$ rrrzunpatching '%s'r)rrmr rnr3rCrRrarorxrprcrDr)rrqrrrrr_grub2_default_env_unpatchs   z+BootloaderPlugin._grub2_default_env_unpatchcCsZtjd|jstjddSx|jD]}|jj|}t|dkrVtjd|q(tjd||}d}xf|D]^}tjd|dd|jj ||d |tj d \}}|d kstj d ||tj d dkrrd}qrWttj d t j|tj d ttj d t j|tj d krd}|r*|j|j||}|jj||q(W|jrN|jn|jdS)Nzpatching grub.cfgzcannot find grub.cfg to patchFrzcannot patch %sz+adding boot command line parameters to '%s'z \b(set\s+z\s*=).*$z\1")rlrz\$Tz\1")rCrDrrRrrmr3rasubnrbrprofindallr rxryrrrr rr)rr5rjrZ grub2_cfg_newZ patch_initialrZnsubsrrr_grub2_cfg_patchs4     4"  z!BootloaderPlugin._grub2_cfg_patchcCsb|j\}}|j|j|}|s"dS|j|d\}}}|dkr@dS|jtj|jtj|j|idS)N)r2) r}r7rrXrtr rvr|r?)rrVrWZ _cmdline_dictr5rrr_rpm_ostree_updates z#BootloaderPlugin._rpm_ostree_updatecCs8|jtj|jtj|ji|jtj|jtj|jidS)N) rr rxrryrrtrvrw)rrrr _grub2_updateszBootloaderPlugin._grub2_updatecCstjjtjS)N)r r rir ZBLS_ENTRIES_PATH)rrrr_has_blsszBootloaderPlugin._has_blscCs\tjdt|dd|jD}|jjdddg|\}}|dkrXtjd|d Sd S) Nzupdating grubenv, setting %scSs$g|]\}}dt|t|fqS)z%s=%s)r])r9Zoptionvaluerrrr< sz4BootloaderPlugin._update_grubenv..z grub2-editenvr[setrzcannot update grubenv: '%s'FT)rCrDr]r>rrBrE)rr5lrFrGrrrr sz BootloaderPlugin._update_grubenvcCsb|jj}|dkrdStjdtj|jjtjdgd|id\}}|dkr^tjd|dSd S) NrFz4running kernel update hook '%s' to patch BLS entriesruZKERNEL_INSTALL_MACHINE_ID)envrzcannot patch BLS entries: '%s'T)rZget_machine_idrCrDr ZKERNEL_UPDATE_HOOK_FILErBrE)rZ machine_idrFrGrrr_bls_entries_patch_initials z+BootloaderPlugin._bls_entries_patch_initialcCs6tjd|jr2|j|j|jdr2|jr2dSdS)Nz updating BLS)rrTF)rCrDrrrrr)rrrr _bls_updates  zBootloaderPlugin._bls_updatecCs(|jdkr$tjjtjtjj||_dS)N)rr r r=r BOOT_DIRbasename)rnamerrr_init_initrd_dst_img&s z%BootloaderPlugin._init_initrd_dst_imgcCstjjtjS)N)r r isdirr ZPETITBOOT_DETECT_DIR)rrrr_check_petitboot*sz!BootloaderPlugin._check_petitbootcCs|jrtjddS|jr&tjdtjd|jtjj|j}|j j ||jsXdSd|_ |j j dj }d}t|}|rtjdd |}t||kr|}tjj|||_dS) Nz:Detected rpm-ostree which doesn't support initrd overlays.FzkDetected Petitboot which doesn't support initrd overlays. The initrd overlay will be ignored by bootloader.zinstalling initrd image as '%s'Tz /proc/cmdline/z)^\s*BOOT_IMAGE=\s*(?:\([^)]*\))?(\S*/).*$z\1)r"rCrErrRrr r rrr\rrmrstripr3rarcr=r)rZimgZimg_nameZ curr_cmdlineZinitrd_grubpathZlcr rrr_install_initrd-s&   z BootloaderPlugin._install_initrdr&cCs$|rdS|r |dk r t|g|_dS)N)r]r)renablingrverifyignore_missingrrr_grub2_cfg_fileBs z BootloaderPlugin._grub2_cfg_filer'cCsR|rdS|rN|dk rNt||_|jdkr,dS|jddkrNtjjtj|j|_dS)NrFrr)r]rr r r=r r)rrrrrrrr_initrd_dst_imgJs   z BootloaderPlugin._initrd_dst_imgr*cCs*|rdS|r&|dk r&|jj|dk|_dS)N1)rget_boolr)rrrrrrrrrVs z#BootloaderPlugin._initrd_remove_dirr(FrI)Z per_deviceZprioritycCsD|rdS|r@|dk r@t|}|j||dkr2dS|j|s@dSdS)NrF)r]rr)rrrrrZsrc_imgrrr_initrd_add_img^s   z BootloaderPlugin._initrd_add_imgr)c Cs|rdS|o|dk rt|}|j||dkr4dStjj|sRtjd|dStjd|tj ddd\}}tj d|tj ||j j d ||d d \}} tj d | |d krtjd|j j|d ddS|j||j j||jrtjd||j j|dS)NrFzFerror: cannot create initrd image, source directory '%s' doesn't existz+generating initrd image from directory '%s'ztuned-bootloader-z.tmp)prefixsuffixz+writing initrd image to temporary file '%s'zfind . | cpio -co > %sT)cwdshellz cpio log: %srzerror generating initrd image)rkzremoving directory '%s')r]rr r rrCrNrRtempfileZmkstemprDcloserrBrzrrZrmtree) rrrrrZsrc_dirfdZtmpfilerFrGrrr_initrd_add_dirks2      z BootloaderPlugin._initrd_add_dirr+cCsJ|jj|jj|}|r |jr8|jd}|j|}n |jjd}t|dkrTdSt |j }t |j } | |} t| dkrt j t jdt| fdSdd|D} xR| D]J} | j ddd} | | krt jt j| | fqt jt j| | | fqW| |@}t j d d j|fd S|rF|dk rFt j d d|_||_dS) Nrz /proc/cmdliner+TcSsi|]}||jdddqS)r/rr)r0)r9r;rrr sz-BootloaderPlugin._cmdline..r/rz2expected arguments that are present in cmdline: %sr8Fz;installing additional boot command line parameters to grub2)Z _variablesexpandrZunquoter"rXr?rmr3rr0rCrRr ZSTR_VERIFY_PROFILE_VALUE_OKr]rNZ'STR_VERIFY_PROFILE_CMDLINE_FAIL_MISSINGZSTR_VERIFY_PROFILE_CMDLINE_FAILr=rr)rrrrrr;Zrpm_ostree_kargsr+Z cmdline_setZ value_setZ missing_setZ cmdline_dictmargZ present_setrrr_cmdlines6         zBootloaderPlugin._cmdliner,cCs8|rdS|r4|dk r4|jj|dkr4tjdd|_dS)Nrz(skipping any modification of grub configT)rrrCrRr)rrrrrrrr_skip_grub_configs   z"BootloaderPlugin._skip_grub_configcCs|rV|jrVt|jdkr"tjdt|jdkr:tjd|jtj|jtj |jin0|r|j r|j rp|j n|j |jd|_ dS)Nrz0requested changes to initrd will not be applied!z1requested changes to cmdline will not be applied!F)rr3rrCrErrtr rvrwrr"rrr)rr#rrrr_instance_post_statics     z&BootloaderPlugin._instance_post_static)r)1r_ __module__ __qualname____doc__rr$r% classmethodr. staticmethodr7r?r!rLrXrhrrrtr{r}r~r Z ROLLBACK_SOFTrrrrrrrrrrrrrrrZcommand_customrrrrrrrr __classcell__rr)rrrsT.    4"          ! r)rrZ decoratorsZ tuned.logsZtunedrZtuned.utils.commandsrZ tuned.constsr r rarZtimerZlogsrPrCZPluginrrrrrs      PK$2]FI6plugins/__pycache__/plugin_sysctl.cpython-36.opt-1.pycnu[3 rzGFailed to read sysctl parameter '%s', multi-line values are unsupportedz&Value of sysctl parameter '%s' is '%s'zBFailed to read sysctl parameter '%s', the parameter does not existz(Failed to read sysctl parameter '%s': %s) rQr@rArr"rOr?r4rCrDrErF)r r*r=rGrIir+rJrrrr!s(     zSysctlPlugin._read_sysctlFcCs|j|}tjj|tkr,tjd|dSy6tjd||ft|d}|j |WdQRXdSt t fk r}zJ|j t j kr|rtjntj}|d||fntjd||t|fdSd}~XnXdS)Nz+Refusing to set deprecated sysctl option %sFz%Setting sysctl parameter '%s' to '%s'wTzIFailed to set sysctl parameter '%s' to '%s', the parameter does not existz/Failed to set sysctl parameter '%s' to '%s': %s)rQr2r=basenameDEPRECATED_SYSCTL_OPTIONSrr"r?r@writer4rCrDrErF)r r*r+r.r=rGrJZlog_funcrrrr&s&    zSysctlPlugin._write_sysctl)F)__name__ __module__ __qualname____doc__rrrr-r0r(Z ROLLBACK_SOFTrr)r8rBrQr!r& __classcell__rr)r rrs   r)rerRrZ decoratorsZ tuned.logsZtuned subprocessZtuned.utils.commandsrZ tuned.constsr(rDr2ZlogsrrrVr1ZPluginrrrrrs    PK$2]A1~??-plugins/__pycache__/decorators.cpython-36.pycnu[3 .wrapperr )rrrr r )rrrr rs csfdd}|S)Ncsdd|_|S)NT)getr)r )r )rr r r !s zcommand_get..wrapperr )rr r )rr r s csfdd}|S)Ncsdd|_|S)NT)Zcustomrrr)r )r )rrrr r r *s  zcommand_custom..wrapperr )rrrr r )rrrr r)sN)Fr)Fr)__all__rrrr r r r s   PK$2]r1plugins/__pycache__/plugin_modules.cpython-36.pycnu[3 rrZ decoratorsZ tuned.logsZtuned subprocessZtuned.utils.commandsrZ tuned.constsr-ZlogsgetrZPluginrrrrrs    PK$2]zU9plugins/__pycache__/plugin_scheduler.cpython-36.opt-1.pycnu[3 Jsz*SchedulerUtils.__init__..css|]}tt||fVqdS)N)r(r))r*r,rrrr-Ls)dict_dict_schedcfg2schedconstitems_dict_schedcfg2numvalues_dict_num2schedconst)r rrrrHszSchedulerUtils.__init__cCs |jj|S)N)r1get)r str_schedulerrrrsched_cfg_to_numNszSchedulerUtils.sched_cfg_to_numcCs |jj|S)N)r3r4)r r rrrsched_num_to_constRsz!SchedulerUtils.sched_num_to_constcCs tj|S)N)r)sched_getscheduler)r pidrrr get_schedulerUszSchedulerUtils.get_schedulercCstj||tj|dS)N)r)sched_setscheduler sched_param)r r9schedpriorrr set_schedulerXszSchedulerUtils.set_schedulercCs tj|S)N)r)sched_getaffinity)r r9rrr get_affinity[szSchedulerUtils.get_affinitycCstj||dS)N)r)sched_setaffinity)r r9r rrr set_affinity^szSchedulerUtils.set_affinitycCs tj|jS)N)r)sched_getparamsched_priority)r r9rrr get_priorityaszSchedulerUtils.get_prioritycCs tj|S)N)r)sched_get_priority_min)r r=rrrget_priority_mindszSchedulerUtils.get_priority_mincCs tj|S)N)r)sched_get_priority_max)r r=rrrget_priority_maxgszSchedulerUtils.get_priority_maxN)rrr__doc__r/rr6r7r:r?rArCrFrHrJrrrrr;s rc@sPeZdZdZddZddZddZdd Zd d Zd d Z ddZ ddZ dS)SchedulerUtilsSchedutilszE Class encapsulating scheduler implementation in schedutils module cCs8tdd|jjD|_tdd|jjD|_dS)Ncss |]\}}|tt|fVqdS)N)r( schedutils)r*r+r,rrrr-psz4SchedulerUtilsSchedutils.__init__..css|]}tt||fVqdS)N)r(rM)r*r,rrrr-rs)r.r/r0r1r2r3)r rrrrnsz!SchedulerUtilsSchedutils.__init__cCs tj|S)N)rMr:)r r9rrrr:tsz&SchedulerUtilsSchedutils.get_schedulercCstj|||dS)N)rMr?)r r9r=r>rrrr?wsz&SchedulerUtilsSchedutils.set_schedulercCs tj|S)N)rMrA)r r9rrrrAzsz%SchedulerUtilsSchedutils.get_affinitycCstj||dS)N)rMrC)r r9r rrrrC}sz%SchedulerUtilsSchedutils.set_affinitycCs tj|S)N)rMrF)r r9rrrrFsz%SchedulerUtilsSchedutils.get_prioritycCs tj|S)N)rMrH)r r=rrrrHsz)SchedulerUtilsSchedutils.get_priority_mincCs tj|S)N)rMrJ)r r=rrrrJsz)SchedulerUtilsSchedutils.get_priority_maxN) rrrrKrr:r?rArCrFrHrJrrrrrLjsrLcseZdZdZfddZddZddZdd Zed d Z d d Z ddZ ddZ ddZ ddZddZddZddZddZddZdd!d"Zd#d$Zd%d&Zd'd(Zdd)d*Zd+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6Zd7d8Zd9d:Z d;d<Z!d=d>Z"dd?d@Z#dAdBZ$dCdDZ%fdEdFZ&dGdHZ'dIdJZ(dKdLZ)e*j+ffdMdN Z,dOdPZ-dQdRZ.fdSdTZ/dUdVZ0dWdXZ1dYdZZ2e3d[d d\d]d^Z4e3d_d d\d`daZ5e3dbd d\dcddZ6e3ded d\dfdgZ7e3dhd d\didjZ8e3dkd d\dldmZ9dndoZ:dpdqZ;drdsZdxdyZ?dzd{Z@d|d}ZAd~dZBddZCddZDddZEddZFe3dd ddddZGddZHddZIdddZJeKdddZLeMdddZNeKdddZOeMdddZPeKdddZQeMdddZReKdddZSeMdddZTeKdddZUeMdddZVeKdddZWeMdddZXeKdddZYeMdddZZeKdddZ[eMdddZ\eKdddZ]eMdddZ^eKddd„Z_eMdddĄZ`ZaS)SchedulerPlugina]- `scheduler`:: Allows tuning of scheduling priorities, process/thread/IRQ affinities, and CPU isolation. + To prevent processes/threads/IRQs from using certain CPUs, use the [option]`isolated_cores` option. It changes process/thread affinities, IRQs affinities and it sets `default_smp_affinity` for IRQs. The CPU affinity mask is adjusted for all processes and threads matching [option]`ps_whitelist` option subject to success of the `sched_setaffinity()` system call. The default setting of the [option]`ps_whitelist` regular expression is `.*` to match all processes and thread names. To exclude certain processes and threads use [option]`ps_blacklist` option. The value of this option is also interpreted as a regular expression and process/thread names (`ps -eo cmd`) are matched against that expression. Profile rollback allows all matching processes and threads to run on all CPUs and restores the IRQ settings prior to the profile application. + Multiple regular expressions for [option]`ps_whitelist` and [option]`ps_blacklist` options are allowed and separated by `;`. Quoted semicolon `\;` is taken literally. + .Isolate CPUs 2-4 ==== ---- [scheduler] isolated_cores=2-4 ps_blacklist=.*pmd.*;.*PMD.*;^DPDK;.*qemu-kvm.* ---- Isolate CPUs 2-4 while ignoring processes and threads matching `ps_blacklist` regular expressions. ==== The [option]`irq_process` option controls whether the scheduler plugin applies the `isolated_cores` parameter to IRQ affinities. The default value is `true`, which means that the scheduler plugin will move all possible IRQs away from the isolated cores. When `irq_process` is set to `false`, the plugin will not change any IRQ affinities. ==== The [option]`default_irq_smp_affinity` option controls the values *TuneD* writes to `/proc/irq/default_smp_affinity`. The file specifies default affinity mask that applies to all non-active IRQs. Once an IRQ is allocated/activated its affinity bitmask will be set to the default mask. + The following values are supported: + -- `calc`:: Content of `/proc/irq/default_smp_affinity` will be calculated from the `isolated_cores` parameter. Non-isolated cores are calculated as an inversion of the `isolated_cores`. Then the intersection of the non-isolated cores and the previous content of `/proc/irq/default_smp_affinity` is written to `/proc/irq/default_smp_affinity`. If the intersection is an empty set, then just the non-isolated cores are written to `/proc/irq/default_smp_affinity`. This behavior is the default if the parameter `default_irq_smp_affinity` is omitted. `ignore`:: *TuneD* will not touch `/proc/irq/default_smp_affinity`. explicit cpulist:: The cpulist (such as 1,3-4) is unpacked and written directly to `/proc/irq/default_smp_affinity`. -- + .An explicit CPU list to set the default IRQ smp affinity to CPUs 0 and 2 ==== ---- [scheduler] isolated_cores=1,3 default_irq_smp_affinity=0,2 ---- ==== To adjust scheduling policy, priority and affinity for a group of processes/threads, use the following syntax. + [subs="+quotes,+macros"] ---- group.__groupname__=__rule_prio__:__sched__:__prio__:__affinity__:__regex__ ---- + where `__rule_prio__` defines internal *TuneD* priority of the rule. Rules are sorted based on priority. This is needed for inheritence to be able to reorder previously defined rules. Equal `__rule_prio__` rules should be processed in the order they were defined. However, this is Python interpreter dependant. To disable an inherited rule for `__groupname__` use: + [subs="+quotes,+macros"] ---- group.__groupname__= ---- + `__sched__` must be one of: *`f`* for FIFO, *`b`* for batch, *`r`* for round robin, *`o`* for other, *`*`* do not change. + `__affinity__` is CPU affinity in hexadecimal. Use `*` for no change. + `__prio__` scheduling priority (see `chrt -m`). + `__regex__` is Python regular expression. It is matched against the output of + [subs="+quotes,+macros"] ---- ps -eo cmd ---- + Any given process name may match more than one group. In such a case, the priority and scheduling policy are taken from the last matching `__regex__`. + .Setting scheduling policy and priorities to kernel threads and watchdog ==== ---- [scheduler] group.kthreads=0:*:1:*:\[.*\]$ group.watchdog=0:f:99:*:\[watchdog.*\] ---- ==== + The scheduler plug-in uses perf event loop to catch newly created processes. By default it listens to `perf.RECORD_COMM` and `perf.RECORD_EXIT` events. By setting [option]`perf_process_fork` option to `true`, `perf.RECORD_FORK` events will be also listened to. In other words, child processes created by the `fork()` system call will be processed. Since child processes inherit CPU affinity from their parents, the scheduler plug-in usually does not need to explicitly process these events. As processing perf events can pose a significant CPU overhead, the [option]`perf_process_fork` option parameter is set to `false` by default. Due to this, child processes are not processed by the scheduler plug-in. + The CPU overhead of the scheduler plugin can be mitigated by using the scheduler [option]`runtime` option and setting it to `0`. This will completely disable the dynamic scheduler functionality and the perf events will not be monitored and acted upon. The disadvantage ot this approach is the procees/thread tuning will be done only at profile application. + .Disabling the scheduler dynamic functionality ==== ---- [scheduler] runtime=0 isolated_cores=1,3 ---- ==== + NOTE: For perf events, memory mapped buffer is used. Under heavy load the buffer may overflow. In such cases the `scheduler` plug-in may start missing events and failing to process some newly created processes. Increasing the buffer size may help. The buffer size can be set with the [option]`perf_mmap_pages` option. The value of this parameter has to expressed in powers of 2. If it is not the power of 2, the nearest higher power of 2 value is calculated from it and this calculated value used. If the [option]`perf_mmap_pages` option is omitted, the default kernel value is used. + The scheduler plug-in supports process/thread confinement using cgroups v1. + [option]`cgroup_mount_point` option specifies the path to mount the cgroup filesystem or where *TuneD* expects it to be mounted. If unset, `/sys/fs/cgroup/cpuset` is expected. + If [option]`cgroup_groups_init` option is set to `1` *TuneD* will create (and remove) all cgroups defined with the `cgroup*` options. This is the default behavior. If it is set to `0` the cgroups need to be preset by other means. + If [option]`cgroup_mount_point_init` option is set to `1`, *TuneD* will create (and remove) the cgroup mountpoint. It implies `cgroup_groups_init = 1`. If set to `0` the cgroups mount point needs to be preset by other means. This is the default behavior. + The [option]`cgroup_for_isolated_cores` option is the cgroup name used for the [option]`isolated_cores` option functionality. For example, if a system has 4 CPUs, `isolated_cores=1` means that all processes/threads will be moved to CPUs 0,2-3. The scheduler plug-in will isolate the specified core by writing the calculated CPU affinity to the `cpuset.cpus` control file of the specified cgroup and move all the matching processes/threads to this group. If this option is unset, classic cpuset affinity using `sched_setaffinity()` will be used. + [option]`cgroup.__cgroup_name__` option defines affinities for arbitrary cgroups. Even hierarchic cgroups can be used, but the hieararchy needs to be specified in the correct order. Also *TuneD* does not do any sanity checks here, with the exception that it forces the cgroup to be under [option]`cgroup_mount_point`. + The syntax of the scheduler option starting with `group.` has been augmented to use `cgroup.__cgroup_name__` instead of the hexadecimal `__affinity__`. The matching processes will be moved to the cgroup `__cgroup_name__`. It is also possible to use cgroups which have not been defined by the [option]`cgroup.` option as described above, i.e. cgroups not managed by *TuneD*. + All cgroup names are sanitized by replacing all all dots (`.`) with slashes (`/`). This is to prevent the plug-in from writing outside [option]`cgroup_mount_point`. + .Using cgroups v1 with the scheduler plug-in ==== ---- [scheduler] cgroup_mount_point=/sys/fs/cgroup/cpuset cgroup_mount_point_init=1 cgroup_groups_init=1 cgroup_for_isolated_cores=group cgroup.group1=2 cgroup.group2=0,2 group.ksoftirqd=0:f:2:cgroup.group1:ksoftirqd.* ps_blacklist=ksoftirqd.*;rcuc.*;rcub.*;ktimersoftd.* isolated_cores=1 ---- Cgroup `group1` has the affinity set to CPU 2 and the cgroup `group2` to CPUs 0,2. Given a 4 CPU setup, the [option]`isolated_cores=1` option causes all processes/threads to be moved to CPU cores 0,2-3. Processes/threads that are blacklisted by the [option]`ps_blacklist` regular expression will not be moved. The scheduler plug-in will isolate the specified core by writing the CPU affinity 0,2-3 to the `cpuset.cpus` control file of the `group` and move all the matching processes/threads to this cgroup. ==== Option [option]`cgroup_ps_blacklist` allows excluding processes which belong to the blacklisted cgroups. The regular expression specified by this option is matched against cgroup hierarchies from `/proc/PID/cgroups`. Cgroups v1 hierarchies from `/proc/PID/cgroups` are separated by commas ',' prior to regular expression matching. The following is an example of content against which the regular expression is matched against: `10:hugetlb:/,9:perf_event:/,8:blkio:/` + Multiple regular expressions can be separated by semicolon ';'. The semicolon represents a logical 'or' operator. + .Cgroup-based exclusion of processes from the scheduler ==== ---- [scheduler] isolated_cores=1 cgroup_ps_blacklist=:/daemons\b ---- The scheduler plug-in will move all processes away from core 1 except processes which belong to cgroup '/daemons'. The '\b' is a regular expression metacharacter that matches a word boundary. ---- [scheduler] isolated_cores=1 cgroup_ps_blacklist=\b8:blkio: ---- The scheduler plug-in will exclude all processes which belong to a cgroup with hierarchy-ID 8 and controller-list blkio. ==== Recent kernels moved some `sched_` and `numa_balancing_` kernel run-time parameters from `/proc/sys/kernel`, managed by the `sysctl` utility, to `debugfs`, typically mounted under `/sys/kernel/debug`. TuneD provides an abstraction mechanism for the following parameters via the scheduler plug-in: [option]`sched_min_granularity_ns`, [option]`sched_latency_ns`, [option]`sched_wakeup_granularity_ns`, [option]`sched_tunable_scaling`, [option]`sched_migration_cost_ns`, [option]`sched_nr_migrate`, [option]`numa_balancing_scan_delay_ms`, [option]`numa_balancing_scan_period_min_ms`, [option]`numa_balancing_scan_period_max_ms` and [option]`numa_balancing_scan_size_mb`. Based on the kernel used, TuneD will write the specified value to the correct location. + .Set tasks' "cache hot" value for migration decisions. ==== ---- [scheduler] sched_migration_cost_ns=500000 ---- On the old kernels, this is equivalent to: ---- [sysctl] kernel.sched_migration_cost_ns=500000 ---- that is, value `500000` will be written to `/proc/sys/kernel/sched_migration_cost_ns`. However, on more recent kernels, the value `500000` will be written to `/sys/kernel/debug/sched/migration_cost_ns`. ==== c stt|j||||||||d|_tj|_ttj|_ |dk rh|j tj tj|_t|j tj tj|_ t|_d|_i|_d|_d|_d|_tj|_|jdd|_d|_|jdd|_d|_y t|_Wntk rt |_YnXdS)NTz.*r )Z command_nameirq)!superrNrZ_has_dynamic_optionsconstsZCFG_DEF_DAEMON_daemonintZCFG_DEF_SLEEP_INTERVAL_sleep_intervalget_boolZ CFG_DAEMONr4ZCFG_SLEEP_INTERVALrr_secure_boot_hint_sched_knob_paths_cache _ps_whitelist _ps_blacklist_cgroup_ps_blacklist_reperfZcpu_map_cpusZ _storage_key_scheduler_storage_key _irq_process_irq_storage_key_evlistr_scheduler_utilsAttributeErrorrL) r Zmonitor_repositoryZstorage_factoryZhardware_inventoryZdevice_matcherZdevice_matcher_udevZplugin_instance_factoryZ global_cfg variables) __class__rrrs0     zSchedulerPlugin.__init__cCsT|dkr dSy t|}Wntk r,dSX|dkr:dStdtjtj|dS)Nr)rT ValueErrormathZceillog)r Z mmap_pagesZmprrr_calc_mmap_pagess z SchedulerPlugin._calc_mmap_pagescsd|_d|_d|_d|_jjji_tjdkr^t j dj i_jj jt _d_d_d_tjfdd|jjD_|j|_jj|jd}j|}|dkrt jd|d}|dk rt||krt j d ||fx(|jD]}jj|j||j|<qWjj|jjd d d krHd|_tj |_!j"r|jryt#j$|_%t#j&t#j't#j(d d ddd d t#j)t#j*Bd }|j+j,|j%dt#j-j,|j%|_|jj.||dkr|jj/n|jj/|dWnd|_YnXdS)NFTrz0recovering scheduling settings from previous runcsJg|]B\}}|dddkrt|dkrj|ddjj|fqS)Nzcgroup.)len_sanitize_cgroup_path _variablesexpand)r*optionr )r rr sz2SchedulerPlugin._instance_init..perf_mmap_pageszKInvalid 'perf_mmap_pages' value specified: '%s', using default kernel valuezL'perf_mmap_pages' value has to be power of two, specified: '%s', using: '%d'Zruntimer0) typeconfigZtaskcommmmapZfreqZ wakeup_eventsZ watermarkZ sample_type)Zcpusthreads)Zpages)0raZ_has_dynamic_tuningZ_has_static_tuning_runtime_tuning_storager4r^_scheduler_originalrlriinfo_restore_ps_affinityunsetr._cgroups_original_affinityr_cgroup_affinity_initialized_cgroup collections OrderedDictoptionsr0_cgroups _schedulerrnrorjerrorstrrrV threadingZEvent _terminaterSr\Z thread_mapZ_threadsevselZ TYPE_SOFTWAREZCOUNT_SW_DUMMYZ SAMPLE_TIDZ SAMPLE_CPUopenr]Zevlistaddrw)r instanceZperf_mmap_pages_rawrrr+rr)r r_instance_inits^          zSchedulerPlugin._instance_initcCs*|jr&x|jjD]}tj|jqWdS)N)ra get_pollfdr)closer,)r rfdrrr_instance_cleanupsz!SchedulerPlugin._instance_cleanupcCs4dtjdddddddddddddddddddddS)NFTcalcZfalse)isolated_corescgroup_mount_pointcgroup_mount_point_initcgroup_groups_initcgroup_for_isolated_corescgroup_ps_blacklist ps_whitelist ps_blacklist irq_processdefault_irq_smp_affinityrrperf_process_forksched_min_granularity_nssched_latency_nssched_wakeup_granularity_nssched_tunable_scalingsched_migration_cost_nssched_nr_migratenuma_balancing_scan_delay_ms!numa_balancing_scan_period_min_ms!numa_balancing_scan_period_max_msnuma_balancing_scan_size_mb)rRZDEF_CGROUP_MOUNT_POINT)clsrrr_get_config_optionss,z#SchedulerPlugin._get_config_optionscCs|dk rt|jddSdS)N./)rreplace)r rrrrrm9sz%SchedulerPlugin._sanitize_cgroup_pathcCs>t|tjs|}tj|}tj|}|j|r:d|d}|S)N[]) isinstanceprocfsprocessZprocess_cmdline _is_kthread)r rr9rrrr _get_cmdline=s     zSchedulerPlugin._get_cmdlinecCstj}|ji}x|jD]}yN|j|}|d}|||<d|krnx&|djD]}|j|}|||<qTWWqttfk r}z$|jtj ks|jtj krwnWYdd}~XqXqW|S)Nr9rx) rpidstatsreload_threadsr2rkeysOSErrorIOErrorerrnoENOENTESRCH)r ps processesprocrr9errr get_processesGs$    zSchedulerPlugin.get_processescCs@|jj|}|jj|}|jj|}tjd|||f||fS)Nz8Read scheduler policy '%s' and priority '%d' of PID '%d')rbr:r7rFridebug)r r9r sched_strr rrr_get_rt`s    zSchedulerPlugin._get_rtcCs|jj|}tjd|||fyB|jj|}|jj|}||ksJ||kr`tjd||||fWn4ttfk r}ztjd|WYdd}~XnXy|jj |||Wn`ttfk r }z>t |dr|j t j krtjd|ntjd||fWYdd}~XnXdS)NzBSetting scheduler policy to '%s' and priority to '%d' of PID '%d'.z9Priority for %s must be in range %d - %d. '%d' was given.z(Failed to get allowed priority range: %srzAFailed to set scheduling parameters of PID %d, the task vanished.z1Failed to set scheduling parameters of PID %d: %s) rbr7rirrHrJr SystemErrorrr?hasattrrr)r r9r=r>rZprio_minZprio_maxrrrr_set_rths*    zSchedulerPlugin._set_rtcCs|ddtjj@dkS)Nstatflagsr)rZpidstatZ PF_KTHREAD)r rrrrrszSchedulerPlugin._is_kthreadcCs yjtj|}|djrd|dddkr8tjd|n(|j|rRtjd|ntjd|dSdSWnttfk r}zF|j t j ks|j t j krtjd |d Stj d ||fd SWYdd}~Xn8t tfk r}ztj d ||fdSd}~XnXdS)NrstateZzYAffinity of zombie task with PID %d cannot be changed, the task's affinity mask is fixed.z[Affinity of kernel thread with PID %d cannot be changed, the task's affinity mask is fixed.zRAffinity of task with PID %d cannot be changed, the task's affinity mask is fixed.rrz6Failed to get task info for PID %d, the task vanished.z&Failed to get task info for PID %d: %srfr)rrZis_bound_to_cpurirrwarnrrrrrrrcKeyError)r r9rrrrr_affinity_changeables2       z$SchedulerPlugin._affinity_changeablec Cs\y|j|}Wn(tk r6t|j}||j|<YnX|jdkrX|jdkrX||_||_dS)N)r{rrrr r )r r9r r paramsrrr_store_orig_process_rts z&SchedulerPlugin._store_orig_process_rtcCsd}|dkr|dkr|Sy:|j|\}}|dkr4|}|j||||j|||Wntttfk r}zTt|dr|jtjkrtj d|||j kr|j |=d}ntj d||fWYdd}~XnX|S)NTrz=Failed to read scheduler policy of PID %d, the task vanished.FzcRefusing to set scheduler and priority of PID %d, reading original scheduling parameters failed: %s) rrrrrrrrrirr{r)r r9r=r>contZ prev_schedZ prev_priorrrr_tune_process_rts& z SchedulerPlugin._tune_process_rtcCst|dddkS)Nrkzcgroup.)r)r r rrr_is_cgroup_affinitysz#SchedulerPlugin._is_cgroup_affinityFc Csby|j|}Wn(tk r6t|j}||j|<YnX|jdkr^|jdkr^|rX||_n||_dS)N)r{rrrr r )r r9r is_cgrouprrrr_store_orig_process_affinitys z,SchedulerPlugin._store_orig_process_affinityc Cspxj|jjdtjt|dfddjdD]@}y&|jdddd}|dkrP|Sd Stk rfYq(Xq(Wd S) Nz%s/%s/%sr T)no_error z:cpuset:rrOr)r read_filerRZPROCFS_MOUNT_POINTrsplit IndexError)r r9lr rrr_get_cgroup_affinitys, z$SchedulerPlugin._get_cgroup_affinitycCsB|j|}|j}|dkr$d||f}|jjd|t|dddS)Nrz%s/%sz%s/tasksT)r)rm_cgroup_mount_pointr write_to_filer)r r9r pathrrr _set_cgroups   zSchedulerPlugin._set_cgroupcCs,|dd}t|t o"t|dk}||fS)Nrkr)rlistrl)r r rrrr_parse_cgroup_affinitys z&SchedulerPlugin._parse_cgroup_affinityc Csd}|dkr|Syd|j|\}}|r<|j|}|j||n(|j|}|rX|j|||}|j|||j|||Wntttfk r}zTt |dr|j t j krt j d|||jkr|j|=d}nt jd||fWYdd}~XnX|S)NTrz5Failed to read affinity of PID %d, the task vanished.FzLRefusing to set CPU affinity of PID %d, reading original affinity failed: %s)rrr _get_affinity_get_intersect_affinity _set_affinityrrrrrrrirr{r) r r9r intersectrrr prev_affinityrrrr_tune_process_affinitys4     z&SchedulerPlugin._tune_process_affinitycCsF|j|||}|sdS|j||}| s2||jkr6dS||j|_dS)N)rrr{r)r r9rr=r>r rrrr _tune_processs zSchedulerPlugin._tune_processc Csf|jj|}|dkr.|dkr.tjd|dSy t|}Wn"tk r\tjd|dSX||fS)Nrz>Invalid scheduler: %s. Scheduler and priority will be ignored.z=Invalid priority: %s. Scheduler and priority will be ignored.)NN)NN)rbr6rirrTrg)r r5Z str_priorityr r rrr_convert_sched_paramss  z%SchedulerPlugin._convert_sched_paramscCsD|dkrd}n2|j|r|}n"|jj|}|s@tjd|d}|S)Nrz)Invalid affinity: %s. It will be ignored.)rr hex2cpulistrir)r Z str_affinityr rrr_convert_affinity+s  z!SchedulerPlugin._convert_affinitycCs6|\}}}}}|j||\}}|j|}|||||fS)N)rr)r vals rule_prior r r regexrrr_convert_sched_cfg8s   z"SchedulerPlugin._convert_sched_cfgcCsd|j|f}ytj|tjWn4tk rT}ztjd||fWYdd}~XnX|jj d|df|jj d|jdfddddstjd|dS)Nz%s/%sz Unable to create cgroup '%s': %sz cpuset.memsT)rz3Unable to initialize 'cpuset.mems ' for cgroup '%s') rr)mkdirrRDEF_CGROUP_MODErrirrrr)r r rrrrr_cgroup_create_group?s$z$SchedulerPlugin._cgroup_create_groupcCs@|jdk r"|j|jkr"|j|jx|jD]}|j|q*WdS)N)rrr)r cgrrr_cgroup_initialize_groupsJs  z)SchedulerPlugin._cgroup_initialize_groupscCstjdytj|jtjWn0tk rN}ztjd|WYdd}~XnX|j j dddddd|jg\}}|dkrtjd |jdS) NzInitializing cgroups settingsz'Unable to create cgroup mount point: %sZmountz-tr z-oZcpusetrzUnable to mount '%s') rirr)makedirsrrRrrrrexecute)r rretoutrrr_cgroup_initializePs   z"SchedulerPlugin._cgroup_initializecCsHytj|Wn4tk rB}ztjd||fWYdd}~XnXdS)Nz#Unable to remove directory '%s': %s)r)rmdirrrir)r r rrrr _remove_dirZszSchedulerPlugin._remove_dircCsXx&t|jD]}|jd|j|fq W|jdk rT|j|jkrT|jd|j|jfdS)Nz%s/%s)reversedrrrr)r rrrr_cgroup_finalize_groups`sz'SchedulerPlugin._cgroup_finalize_groupscCsltjd|jjd|jg\}}|dkr.cs6g|].\}}tjd|rt|dkr|j|fqS)zgroup\.)rematchrlr)r*rpr)r rrrqs cSs |ddS)Nrrr)Z option_valsrrrsz8SchedulerPlugin._instance_apply_static..)keyz(error compiling regular expression: '%s'cs(g|] \}}tj|dk r||fqS)N)rsearch)r*r9r)r%rrrqsc s$g|]\}}||ffqSrr)r*r9r)r rpr rr rrrqsz(?}ztjd|dSd}~XnXx|jjD]x\}}||ksL|||jkrlqL|jdk r|j dk r|j ||j|j |j dk r|j ||j qL|j dk rL|j||j qLWi|_|jj|jdS)NzKerror unapplying tuning, cannot get information about running processes: %s)rrrrirr{r0rr r rr rr rrzr~r^)r rrr9Z orig_paramsrrrr}s&      z$SchedulerPlugin._restore_ps_affinitycCsttj}d}xr|dkr|dkr|jjd|j|dfddd}|d krvx.|jdD] }|jjd |jdf|dd qRW|d 8}qW|dkrtj d |dS)N rOrz%s/%s/%sZtasksT)rrrz%s/%s)rrz(Unable to cleanup tasks from cgroup '%s')rOr#) rTrRZCGROUP_CLEANUP_TASKS_RETRYrrrrrrir)r r Zcntdatarrrr_cgroup_cleanup_tasks_ones    z)SchedulerPlugin._cgroup_cleanup_tasks_onecCs@|jdk r"|j|jkr"|j|jx|jD]}|j|q*WdS)N)rrr%)r rrrr_cgroup_cleanup_taskss  z%SchedulerPlugin._cgroup_cleanup_taskscsptt|j|||jr2|jr2|jj|jj|j |j |j |j sV|j r^|j|j rl|jdS)N)rQrN_instance_unapply_staticrSryrrr!joinr}r r&rrrr)r rZrollback)rerrr's    z(SchedulerPlugin._instance_unapply_staticcCstjd|d|j|df}|jj|ddd}|dkr|jtjks<|jtjkrLtjd|ntjd||fdSd}~XnX|j j |j ||}|dk r||j krtjd||t |f|\}}} |j||||| |jj|j|j dS)Nz3Failed to get cmdline of PID %d, the task vanished.z#Failed to get cmdline of PID %d: %sz-tuning new process '%s' with PID '%d' by '%s')rrrrrrrirrrZ re_lookuprr{rrrzrr^) r rr9r%rrvr=r>r rrr_add_pid$s$       zSchedulerPlugin._add_pidcCs6||jkr2|j|=tjd||jj|j|jdS)Nz)removed PID %d from the rollback database)r{rirrzrr^)r rr9rrr _remove_pid9s   zSchedulerPlugin._remove_pidc Cs|jj|j}tj}|jj}x|D]}|j|q&Wx|jj st |j|j ddkr:|jj r:d}x|rd}xt|j D]j}|jj |}|r~d}|jtjks|jr|jtjkr|j|t|j|q~|jtjkr~|j|t|jq~WqnWq:WdS)NirTF)rZre_lookup_compilerselectpollrarregisterrZis_setrlrUr]Z read_on_cpurtr\Z RECORD_COMM_perf_process_fork_valueZ RECORD_FORKr2rTtidZ RECORD_EXITr3) r rr%r5ZfdsrZ read_eventsZcpuZeventrrrr @s&   $    zSchedulerPlugin._thread_coder) per_devicecCs:|rdS|r6|dk r6djddtjdt|D|_dS)N|cSsg|] }d|qS)z(%s)r)r*r1rrrrq_sz8SchedulerPlugin._cgroup_ps_blacklist..z(?.z(?.z(?)_default_irq_smp_affinity_valuercpulist_unpack)r r;rr<r0rrr_default_irq_smp_affinityys  z)SchedulerPlugin._default_irq_smp_affinityrcCs*|rdS|r&|dk r&|jj|dk|_dS)Nr )rrVr7)r r;rr<r0rrr_perf_process_forks z"SchedulerPlugin._perf_process_forkcCs"|jj|}tjd||f|S)NzRead affinity '%s' of PID %d)rbrArir)r r9resrrrrs zSchedulerPlugin._get_affinitycCstjd||fy|jj||dSttfk r}zXt|dr`|jtjkr`tjd|n.|j |}|dksz|d krtj d|||fdSd}~XnXdS) Nz'Setting CPU affinity of PID %d to '%s'.Trz4Failed to set affinity of PID %d, the task vanished.rrfz,Failed to set affinity of PID %d to '%s': %sFr) rirrbrCrrrrrrr)r r9r rrCrrrrs  zSchedulerPlugin._set_affinitycCs"t|jt|}|rt|S|S)N)r intersectionr)r Z affinity1Z affinity2Z affinity3Zaffrrrrsz'SchedulerPlugin._get_intersect_affinityc s>fdd|D}jdkr.fdd|D}jdkrJfdd|D}tdd|D}x|D]}yj||}Wnbttfk r}zB|jtjks|jtjkrt j d|nt j d||fwbWYdd}~XnXj ||d d } | sqb|j kr |j |_| rbd ||krbj||d j|d qbWdS) Ncs(g|] }tjjj|dk r|qS)N)rrrY_get_stat_comm)r*r1)r rrrqs z9SchedulerPlugin._set_all_obj_affinity..rOcs(g|] }tjjj|dkr|qS)N)rrrZrE)r*r1)r rrrqs cs(g|] }tjjj|dkr|qS)N)rrr[_get_stat_cgroup)r*r1)r rrrqs cSsg|]}|j|fqSr)r9)r*r1rrrrqsz3Failed to get cmdline of PID %d, the task vanished.zARefusing to set affinity of PID %d, failed to get its cmdline: %sT)rrx)rZr[r.rrrrrrrirrrr{r_set_all_obj_affinityr2) r Zobjsr rxZpslZpsdr9rrrr)r rrGs6         z%SchedulerPlugin._set_all_obj_affinityc Cs(y|dStttfk r"dSXdS)NZcgroupsrO)rrr)r r&rrrrFsz SchedulerPlugin._get_stat_cgroupc Cs,y |ddStttfk r&dSXdS)NrrvrO)rrr)r r&rrrrEs zSchedulerPlugin._get_stat_commcCs`y&tj}|j|j|j|dWn4ttfk rZ}ztjd|WYdd}~XnXdS)NFzIerror applying tuning, cannot get information about running processes: %s) rrrrGr2rrrir)r r rrrrr_set_ps_affinitysz SchedulerPlugin._set_ps_affinitycCsyJ|jj|}tjd||fd|}t|d}|j|WdQRXdSttfk r}zLt|dr|j t j kr| rtjd|d Stj d|||fd SWYdd}~XnXdS) Nz&Setting SMP affinity of IRQ %s to '%s'z/proc/irq/%s/smp_affinitywrrz/Setting SMP affinity of IRQ %s is not supportedrfz0Failed to set SMP affinity of IRQ %s to '%s': %srrr) r cpulist2hexrirrwriterrrrZEIOr)r rPr Z restoring affinity_hexfilenamer#rrrr_set_irq_affinitys"   z!SchedulerPlugin._set_irq_affinitycCs|y>|jj|}tjd|tdd}|j|WdQRXWn8ttfk rv}ztjd||fWYdd}~XnXdS)Nz(Setting default SMP IRQ affinity to '%s'z/proc/irq/default_smp_affinityrIz2Failed to set default SMP IRQ affinity to '%s': %s) rrJrirrrKrrr)r r rLr#rrrr_set_default_irq_affinitys  z)SchedulerPlugin._set_default_irq_affinityc Cs"t}tj}x|jD]}y"||d}tjd||fWntk rTwYnX|j|||}t|t|krvq|j ||d}|dkr||j |<q|d kr|j j |qW|j jd}|j j|}|jdkr|j|||}n|jdkr|j}|jdkr|j|||_|jj|j|dS) Nr zRead affinity of IRQ '%s': '%s'Frrfz/proc/irq/default_smp_affinityrr>r)rr interruptsrrirrrrrNrrappendrrrr?rOrrzr`) r r irq_originalrrPrrrCZprev_affinity_hexrrr_set_all_irq_affinity s6        z%SchedulerPlugin._set_all_irq_affinitycCsn|jj|jd}|dkrdSx$|jjD]\}}|j||dq(W|jdkr\|j}|j||jj |jdS)NTr>) rzr4r`rr0rNr?rrOr~)r rRrPr rrr_restore_all_irq_affinity)s  z)SchedulerPlugin._restore_all_irq_affinitycCsFt|jt|}|r,tjtj||fntjtj|||f|S)N)rissubsetrir|rRr*rr+)r irq_descriptioncorrect_affinityr,rCrrr_verify_irq_affinity4s z$SchedulerPlugin._verify_irq_affinityc Cs|jj|jd}tj}d}x|jD]}||jkrR|rRd|}tjt j |q&y<||d}tj d||fd|} |j | ||sd}Wq&t k rw&Yq&Xq&W|jjd} |jj| }|jdkr|j d ||jd kr|n|j rd}|S) NTz-IRQ %s does not support changing SMP affinityr z#Read SMP affinity of IRQ '%s': '%s'zSMP affinity of IRQ %sFz/proc/irq/default_smp_affinityr>zdefault IRQ SMP affinityr)rzr4r`rrPrrrir|rRZ STR_VERIFY_PROFILE_VALUE_MISSINGrrXrrrrr?) r rWr0rRrrCrP descriptionr,rVZcurrent_affinity_hexrrr_verify_all_irq_affinity@s8     z(SchedulerPlugin._verify_all_irq_affinityr )r9r c Csd}d|_|dk rrt|jj|}t|j}|j|rRt||}|jj||_n |jj|j}tj d||f|sz|r|dkrdS|r|j r|j ||SdS|r|j r|j d|j } n|} |j| |j r|j|n|j r|jdS)NzJInvalid isolated_cores specified, '%s' does not match available cores '%s'Tz cgroup.%s)rrrr@r]rUrr)rirr_rZrr rHrSrT) r r;rr<r0r isolatedZpresentZstr_cpusZ ps_affinityrrr_isolated_cores_s6        zSchedulerPlugin._isolated_corescCsd|||f}|jj|}|r"|Sd||f}tjj|sv|dkrPd||f}nd|||f}d|}|jdkrvd|_||j|<|S)Nz%s_%s_%sz/proc/sys/kernel/%s_%srOz%s/%sz%s/%s/%sz/sys/kernel/debug/%sT)rXr4r)rexistsrW)r prefix namespaceknobrrrrr_get_sched_knob_paths     z$SchedulerPlugin._get_sched_knob_pathcCsJ|jj|j|||dd}|dkrFtjd||jrFtjdd|_|S)N)rzError reading '%s'zUThis may not work with Secure Boot or kernel_lockdown (this hint is logged only once)F)rrrbrirrW)r r_r`rar$rrr_get_sched_knobs zSchedulerPlugin._get_sched_knobcCsN|dkr dS|sJ|jj|j|||||r0tjgnddsJtjd||f|S)NF)rz Error writing value '%s' to '%s')rrrbrrrir)r r_r`rarsimremoverrr_set_sched_knobszSchedulerPlugin._set_sched_knobrcCs|jdddS)NrOr=min_granularity_ns)rc)r rrr_get_sched_min_granularity_nssz-SchedulerPlugin._get_sched_min_granularity_nscCs|jddd|||S)NrOr=rg)rf)r rrdrerrr_set_sched_min_granularity_nssz-SchedulerPlugin._set_sched_min_granularity_nsrcCs|jdddS)NrOr= latency_ns)rc)r rrr_get_sched_latency_nssz%SchedulerPlugin._get_sched_latency_nscCs|jddd|||S)NrOr=rj)rf)r rrdrerrr_set_sched_latency_nssz%SchedulerPlugin._set_sched_latency_nsrcCs|jdddS)NrOr=wakeup_granularity_ns)rc)r rrr _get_sched_wakeup_granularity_nssz0SchedulerPlugin._get_sched_wakeup_granularity_nscCs|jddd|||S)NrOr=rm)rf)r rrdrerrr _set_sched_wakeup_granularity_nssz0SchedulerPlugin._set_sched_wakeup_granularity_nsrcCs|jdddS)NrOr=tunable_scaling)rc)r rrr_get_sched_tunable_scalingsz*SchedulerPlugin._get_sched_tunable_scalingcCs|jddd|||S)NrOr=rp)rf)r rrdrerrr_set_sched_tunable_scalingsz*SchedulerPlugin._set_sched_tunable_scalingrcCs|jdddS)NrOr=migration_cost_ns)rc)r rrr_get_sched_migration_cost_nssz,SchedulerPlugin._get_sched_migration_cost_nscCs|jddd|||S)NrOr=rs)rf)r rrdrerrr_set_sched_migration_cost_nssz,SchedulerPlugin._set_sched_migration_cost_nsrcCs|jdddS)NrOr= nr_migrate)rc)r rrr_get_sched_nr_migratesz%SchedulerPlugin._get_sched_nr_migratecCs|jddd|||S)NrOr=rv)rf)r rrdrerrr_set_sched_nr_migratesz%SchedulerPlugin._set_sched_nr_migratercCs|jdddS)Nr=numa_balancing scan_delay_ms)rc)r rrr!_get_numa_balancing_scan_delay_mssz1SchedulerPlugin._get_numa_balancing_scan_delay_mscCs|jddd|||S)Nr=ryrz)rf)r rrdrerrr!_set_numa_balancing_scan_delay_mssz1SchedulerPlugin._set_numa_balancing_scan_delay_msrcCs|jdddS)Nr=ryscan_period_min_ms)rc)r rrr&_get_numa_balancing_scan_period_min_mssz6SchedulerPlugin._get_numa_balancing_scan_period_min_mscCs|jddd|||S)Nr=ryr})rf)r rrdrerrr&_set_numa_balancing_scan_period_min_mssz6SchedulerPlugin._set_numa_balancing_scan_period_min_msrcCs|jdddS)Nr=ryscan_period_max_ms)rc)r rrr&_get_numa_balancing_scan_period_max_mssz6SchedulerPlugin._get_numa_balancing_scan_period_max_mscCs|jddd|||S)Nr=ryr)rf)r rrdrerrr&_set_numa_balancing_scan_period_max_mssz6SchedulerPlugin._set_numa_balancing_scan_period_max_msrcCs|jdddS)Nr=ry scan_size_mb)rc)r rrr _get_numa_balancing_scan_size_mbsz0SchedulerPlugin._get_numa_balancing_scan_size_mbcCs|jddd|||S)Nr=ryr)rf)r rrdrerrr _set_numa_balancing_scan_size_mbsz0SchedulerPlugin._set_numa_balancing_scan_size_mb)F)F)F)F)F)brrrrKrrjrr classmethodrrmrrrrrrrrrrrrrrrrrrrrrrrrr r r rr}r%r&rRZ ROLLBACK_SOFTr'r-r.r/r2r3r Zcommand_customr=rYrZr_rArBrrrrGrFrErHrNrOrSrTrXrZr]rbrcrfZ command_getrhZ command_setrirkrlrnrorqrrrtrurwrxr{r|r~rrrrr __classcell__rr)rerrNs(  ?             <      "    $ rN) rOrZ decoratorsZ tuned.logsZtunedr subprocessrr\r4Z tuned.constsrRrZtuned.utils.commandsrrr)rrhrrcrMZlogsr4riobjectrrrrLZPluginrNrrrrs0     /PK$2].5plugins/__pycache__/plugin_sysfs.cpython-36.opt-1.pycnu[3 0sz.SysfsPlugin._instance_init..)Z_has_dynamic_tuningZ_has_static_tuningdictlistZoptionsitems_sysfs_sysfs_original)r instancerrr_instance_init,szSysfsPlugin._instance_initcCsdS)Nr)r rrrr_instance_cleanup3szSysfsPlugin._instance_cleanupcCsvxpt|jjD]^\}}|jj|}xHtj|D]:}|j|r\|j||j |<|j ||q0t j d|q0WqWdS)Nz)rejecting write to '%s' (not inside /sys)) rrr _variablesexpandglobiglob _check_sysfs _read_sysfsr _write_sysfslogerror)r rkeyvaluevfrrr_instance_apply_static6s  z"SysfsPlugin._instance_apply_staticc Cspd}xft|jjD]T\}}|jj|}x>tj|D]0}|j|r4|j|} |j ||| |dkr4d}q4WqW|S)NTF) rrrrrr r!r"r#Z _verify_value) r rZignore_missingZdevicesretr'r(r)r*Zcurr_valrrr_instance_verify_static@s    z#SysfsPlugin._instance_verify_staticcCs,x&t|jjD]\}}|j||qWdS)N)rrrr$)r rZrollbackr'r(rrr_instance_unapply_staticKsz$SysfsPlugin._instance_unapply_staticcCs tjd|S)Nz^/sys/.*)rematch)r sysfs_filerrrr"OszSysfsPlugin._check_sysfscCs2|jj|j}t|dkr*|jj|dSdSdS)NrF)r Z read_filestriplenZget_active_option)r r1datarrrr#Rs zSysfsPlugin._read_sysfscCs|jj||S)N)r Z write_to_file)r r1r(rrrr$YszSysfsPlugin._write_sysfs)__name__ __module__ __qualname____doc__rrrr+r-constsZ ROLLBACK_SOFTr.r"r#r$ __classcell__rr)r rr s   r)rr r/Zos.pathrZ decoratorsZ tuned.logsZtunedZ tuned.constsr9 subprocessZtuned.utils.commandsrZlogsgetr%ZPluginrrrrrs    PK$2]@<<9plugins/__pycache__/plugin_scsi_host.cpython-36.opt-1.pycnu[3 2sz6SCSIHostPlugin._get_device_objects..r)r Zdevicesr)r r_get_device_objects1sz"SCSIHostPlugin._get_device_objectscCs |jdkS)NZ scsi_host)Z device_type)clsrrrrr4sz#SCSIHostPlugin._device_is_supportedcCs|jj|d|jdS)Nr)rZ subscribe_hardware_events_callback)r rrr_hardware_events_init8sz$SCSIHostPlugin._hardware_events_initcCs|jj|dS)N)rZ unsubscribe)r rrr_hardware_events_cleanup;sz'SCSIHostPlugin._hardware_events_cleanupcs |j|rtt|j||dS)N)rrrr)r Zeventr)r rrr>s z(SCSIHostPlugin._hardware_events_callbackcstt|j||dS)N)rr_added_device_apply_tuning)r instance device_name)r rrrBsz)SCSIHostPlugin._added_device_apply_tuningcstt|j||dS)N)rr_removed_device_unapply_tuning)r r r!)r rrr"Esz-SCSIHostPlugin._removed_device_unapply_tuningcCsddiS)Nalpmr)rrrr_get_config_optionsHsz"SCSIHostPlugin._get_config_optionscCsd|_d|_dS)NTF)Z_has_static_tuningZ_has_dynamic_tuning)r r rrr_instance_initNszSCSIHostPlugin._instance_initcCsdS)Nr)r r rrr_instance_cleanupRsz SCSIHostPlugin._instance_cleanupcCstjjdt|dS)Nz/sys/class/scsi_host/Zlink_power_management_policy)ospathjoinstr)r rrrr_get_alpm_policy_fileUsz$SCSIHostPlugin._get_alpm_policy_filer#T)Z per_devicecCsd|dkr dS|j|}|s`tjj|rF|jj|||rs    PK$2]Wyq-plugins/__pycache__/repository.cpython-36.pycnu[3 s  PK$2]X7X71plugins/__pycache__/plugin_service.cpython-36.pycnu[3 szSysVHandler.disablecCsBtjdd|g\}}|dkr>|jdt|ddddkSdS)Nr*z--listrz%s:rr+)rrrstr)r rr rrr r r r(AszSysVHandler.is_enabledN)rrrrr$r(r r r r r):sr)c@s$eZdZddZddZddZdS) SysVRCHandlercCstjdd||dgdS)Nz sysv-rc-confz--levelr+)rr)r rr r r r rFszSysVRCHandler.enablecCstjdd||dgdS)Nz sysv-rc-confz--levelr,)rr)r rr r r r r$IszSysVRCHandler.disablecCsBtjdd|g\}}|dkr>|jdt|ddddkSdS)Nz sysv-rc-confz--listrz%s:rr-r+)rrrr.)r rr rrr r r r(LszSysVRCHandler.is_enabledN)rrrrr$r(r r r r r/Esr/c@sDeZdZddZddZddZddZd d Zd d Zd dZ dS) OpenRCHandlercCs&tjddg\}}|dkr"|jSdS)Nz rc-statusz-rr)rrstrip)r rrr r r rQszOpenRCHandler.runlevel_getcCstjd|dgdS)Nz rc-servicer)rr)r rr r r rUszOpenRCHandler.startcCstjd|dgdS)Nz rc-servicer")rr)r rr r r r"XszOpenRCHandler.stopcCstjdd||gdS)Nz rc-updateadd)rr)r rr r r r r[szOpenRCHandler.enablecCstjdd||gdS)Nz rc-updatedel)rr)r rr r r r r$^szOpenRCHandler.disablecCs"tjd|dgdgd\}}|dkS)Nz rc-servicer%r)r&)rr)r rrrr r r r'aszOpenRCHandler.is_runningcCs2tjdd|g\}}ttjdtj|d|S)Nz rc-updateZshowz\b)rrboolresearchescape)r rr rrr r r r(eszOpenRCHandler.is_enabledN) rrrrrr"rr$r'r(r r r r r0Psr0c@s\eZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ dS)SystemdHandlercCsdS)Nr )r r r r rkszSystemdHandler.runlevel_getcCstjdd|gdS)N systemctlZrestart)rr)r rr r r rnszSystemdHandler.startcCstjdd|gdS)Nr:r")rr)r rr r r r"qszSystemdHandler.stopcCstjdd|gdS)Nr:r)rr)r rr r r r rtszSystemdHandler.enablecCstjdd|gdS)Nr:r$)rr)r rr r r r r$wszSystemdHandler.disablecCs"tjdd|gdgd\}}|dkS)Nr:z is-activer)r&)rr)r rrrr r r r'zszSystemdHandler.is_runningcCs>tjdd|gdgd\}}|j}|dkr.dS|dkr:dSdS) Nr:z is-enabledr)r&ZenabledTZdisabledF)rrr1)r rr rrr%r r r r(~szSystemdHandler.is_enabledcCstjd||ftjj|s0tjd|dStj|}ytj|tj Wn2t k r~}ztjd||fdSd}~XnXt j |||j dS)NzCinstalling service configuration overlay file '%s' for service '%s'z)Unable to find service configuration '%s'z#Unable to create directory '%s': %s)loginfoospathexistserrorconstsSERVICE_SYSTEMD_CFG_PATHmakedirsZDEF_SERVICE_CFG_DIR_MODEOSErrorrcopyr)r rr dirpather r r rs   zSystemdHandler.cfg_installc Csntjd||ftj|}d|tjj|f}tj||j ytj |Wnt t fk rhYnXdS)NzEuninstalling service configuration overlay file '%s' for service '%s'z%s/%s) r;r<rArBr=r>basenamerunlinkrrmdirFileNotFoundErrorrD)r rr rFr>r r r rs  zSystemdHandler.cfg_uninstallcCs|dkr dSdtj|tjj|f}tjj|sHtjd||fdStjj|sjtjd||fdStj |}tj |}||kS)Nz%s/%sz.Unable to find service '%s' configuration '%s'Fz0Service '%s' configuration not installed in '%s') rArBr=r>rHr?r;r@rZ sha256sum)r rr r>Z sha256sum1Z sha256sum2r r r rs    zSystemdHandler.cfg_verifyN) rrrrrr"rr$r'r(rrrr r r r r8is r8csneZdZdZfddZddZddZdd Zd d Zd d Z ddZ ddZ ddZ e jfddZZS) ServicePlugina1 `service`:: Plug-in for handling sysvinit, sysv-rc, openrc and systemd services. + The syntax is as follows: + [subs="+quotes,+macros"] ---- [service] service.__service_name__=__commands__[,file:__file__] ---- + Supported service-handling `_commands_` are `start`, `stop`, `enable` and `disable`. The optional `file:__file__` directive installs an overlay configuration file `__file__`. Multiple commands must be comma (`,`) or semicolon (`;`) separated. If the directives conflict, the last one is used. + The service plugin supports configuration overlays only for systemd. In other init systems, this directive is ignored. The configuration overlay files are copied to `/etc/systemd/system/__service_name__.service.d/` directories. Upon profile unloading, the directory is removed if it is empty. + With systemd, the `start` command is implemented by `restart` in order to allow loading of the service configuration file overlay. + NOTE: With non-systemd init systems, the plug-in operates on the current runlevel only. + .Start and enable the `sendmail` service with an overlay file ==== ---- [service] service.sendmail=start,enable,file:${i:PROFILE_DIR}/tuned-sendmail.conf ---- The internal variable `${i:PROFILE_DIR}` points to the directory from which the profile is loaded. ==== cs&tt|j||d|_|j|_dS)NT)superrLrZ_has_dynamic_options_detect_init_system _init_handler)r argskwargs) __class__r r rszServicePlugin.__init__cCstj|dgd\}}|dkS)Nr)r&)rr)r Zcommandrrr r r _check_cmdszServicePlugin._check_cmdcCs|jddgrtjdtS|jdgr:tjdtS|jddgrXtjdtS|jd dgrvtjd tStjd dS) Nr:r%zdetected systemdr*zdetected generic sysvinitz update-rc.dz-hzdetected sysv-rcz rc-updatezdetected openrcz8Unable to detect your init system, disabling the plugin.) rSr;debugr8r)r/r0 exceptionsZNotSupportedPluginException)r r r r rNs     z!ServicePlugin._detect_init_systemcCstjd|}t}x~|D]v}|dkr,d|_q|dkrsz0ServicePlugin._instance_init..)Z_has_dynamic_tuningZ_has_static_tuning collections OrderedDictZoptionsitems _services_services_original)r instancer )r r _instance_inits zServicePlugin._instance_initcCsdS)Nr )r rfr r r _instance_cleanup szServicePlugin._instance_cleanupcCsT|r|jj|n|dk r&|jj||r:|jj||n|dk rP|jj||dS)N)rOrr"rr$)r rrrr r r r _process_service s zServicePlugin._process_servicecCs|jj}|dkr tjddSx|jjD]}|jj|d|}|jj|d}t|||dj ||j |d<|dj r|jj |d|dj |j |d|dj |dj|q,WdS)NzCannot detect runlevelrr)rOrr;r@rdrcr(r'rr rerrirr)r rfr r!r(r'r r r _instance_apply_statics   z$ServicePlugin._instance_apply_staticc CsH|jj}|dkr&tjtjddSd}x|jjD]}|jj|d|dj }|r~tj tj d|d|dj fnR|dk rtjtjd|d|dj fd}n"tj tj d|d|dj f|jj |d|}|jj|d} |jd |d|dj| |dkrd}|jd |d|dj||dkr8d}q8W|S) Nzcannot detect runlevelFTrrz'service '%s' configuration '%s' matchesz'service '%s' configuration '%s' differszservice '%s' configuration '%s'z %s runningz %s enabled)rOrr;r@rAZSTR_VERIFY_PROFILE_FAILrdrcrr r<ZSTR_VERIFY_PROFILE_OKZ STR_VERIFY_PROFILE_VALUE_MISSINGr(r'Z _verify_valuerr) r rfZignore_missingZdevicesr retr!Zret_cfg_verifyr(r'r r r _instance_verify_static$s( $""$"z%ServicePlugin._instance_verify_staticcCsLxFt|jjD]4\}}|jr.|jj||j|j||j|j|j qWdS)N) listrercr rOrrirrr )r rfZrollbackrr_r r r _instance_unapply_static<sz&ServicePlugin._instance_unapply_static)rrr__doc__rrSrNrZrgrhrirjrlrAZ ROLLBACK_SOFTrn __classcell__r r )rRr rLs(   rL)r9rraZ tuned.constsrAZ decoratorsr=r5Z tuned.logsZtunedZtuned.utils.commandsrZlogsgetr;rrrr r)r/r0r8ZPluginrLr r r r s"      BPK$2]ј 3plugins/__pycache__/plugin_eeepc_she.cpython-36.pycnu[3 s    PK$2]O=  :plugins/__pycache__/plugin_irqbalance.cpython-36.opt-1.pycnu[3 irqbalance sysconfig file is missing. Is irqbalance installed?z,Failed to read irqbalance sysconfig file: %s) openrIRQBALANCE_SYSCONFIG_FILEreadIOErrorerrnoENOENTlogwarnerror)r ferrr_read_irqbalance_sysconfig1s  z+IrqbalancePlugin._read_irqbalance_sysconfigcCsZy&ttjd}|j|WdQRXdStk rT}ztjd|dSd}~XnXdS)NwTz-Failed to write irqbalance sysconfig file: %sF)rrrwriterrr )r contentr!r"rrr_write_irqbalance_sysconfig<sz,IrqbalancePlugin._write_irqbalance_sysconfigcCs |d|S)NzIRQBALANCE_BANNED_CPUS=%s r)r sysconfigbanned_cpumaskrrr_write_banned_cpusEsz#IrqbalancePlugin._write_banned_cpuscCs8g}x(|jdD]}tjd|s|j|qWdj|S)N z\s*IRQBALANCE_BANNED_CPUS=)splitrematchappendjoin)r r(lineslinerrr_clear_banned_cpusHs  z#IrqbalancePlugin._clear_banned_cpuscCs2|jjdddgdgd\}}|dkr.tjddS)NZ systemctlz try-restartZ irqbalance)Z no_errorsrz.Failed to restart irqbalance. Is it installed?)_cmdZexecuterr)r Zretcodeoutrrr_restart_irqbalanceOs z$IrqbalancePlugin._restart_irqbalancecCs@|j}|dkrdS|j|}|j||}|j|r<|jdS)N)r#r3r*r'r7)r r)r&rrr_set_banned_cpusXs   z!IrqbalancePlugin._set_banned_cpuscCs4|j}|dkrdS|j|}|j|r0|jdS)N)r#r3r'r7)r r&rrr_restore_banned_cpusas   z%IrqbalancePlugin._restore_banned_cpusrF)Z per_devicec Csd}|dk rjt|jj|}t|j}|j|rB|jjt|}n(djdd|jD}tj d||f|sr|r~|dkr~dS|rdS|r|j |n|j dS)N,cSsg|] }t|qSr)str).0xrrr rsz1IrqbalancePlugin._banned_cpus..zGInvalid banned_cpus specified, '%s' does not match available cores '%s') setr5Zcpulist_unpackr issubsetZ cpulist2hexlistr0rr r8r9) r ZenablingvalueZverifyZignore_missingr)ZbannedZpresentZstr_cpusrrr _banned_cpusis     zIrqbalancePlugin._banned_cpus)__name__ __module__ __qualname____doc__rrr classmethodrr#r'r*r3r7r8r9rrC __classcell__rr)rrr s      r)rZ decoratorsrZtunedrZ tuned.logsrr r-ZlogsgetrZPluginrrrrrs    PK$2]~YY1plugins/__pycache__/plugin_rtentsk.cpython-36.pycnu[3 s   PK$2]s\\3plugins/__pycache__/plugin_net.cpython-36.opt-1.pycnu[3 Z!d?d@Z"ed<dkdAdBZ#edCd+d,dDdEZ$edCdldFdGZ%dHdIZ&dJdKZ'dLdMZ(dNdOZ)dPdQZ*dRdSZ+dTdUZ,dmdVdWZ-dXdYZ.e/dZd+d,d[d\Z0e/d]d+d,d^d_Z1e/d`d+d,dadbZ2e/dcd+d,dddeZ3e/dfd+d,dgdhZ4Z5S)nNetTuningPlugina `net`:: Configures network driver, hardware and Netfilter settings. Dynamic change of the interface speed according to the interface utilization is also supported. The dynamic tuning is controlled by the [option]`dynamic` and the global [option]`dynamic_tuning` option in `tuned-main.conf`. + The [option]`wake_on_lan` option sets wake-on-lan to the specified value as when using the `ethtool` utility. + .Set Wake-on-LAN for device eth0 on MagicPacket(TM) ==== ---- [net] devices=eth0 wake_on_lan=g ---- ==== + The [option]`coalesce` option allows changing coalescing settings for the specified network devices. The syntax is: + [subs="+quotes,+macros"] ---- coalesce=__param1__ __value1__ __param2__ __value2__ ... __paramN__ __valueN__ ---- Note that not all the coalescing parameters are supported by all network cards. For the list of coalescing parameters of your network device, use `ethtool -c device`. + .Setting coalescing parameters rx/tx-usecs for all network devices ==== ---- [net] coalesce=rx-usecs 3 tx-usecs 16 ---- ==== + The [option]`features` option allows changing the offload parameters and other features for the specified network devices. To query the features of your network device, use `ethtool -k device`. The syntax of the option is the same as the [option]`coalesce` option. + .Turn off TX checksumming, generic segmentation and receive offload ==== ---- [net] features=tx off gso off gro off ---- ==== The [option]`pause` option allows changing the pause parameters for the specified network devices. To query the pause parameters of your network device, use `ethtool -a device`. The syntax of the option is the same as the [option]`coalesce` option. + .Disable autonegotiation ==== ---- [net] pause=autoneg off ---- ==== + The [option]`ring` option allows changing the rx/tx ring parameters for the specified network devices. To query the ring parameters of your network device, use `ethtool -g device`. The syntax of the option is the same as the [option]`coalesce` option. + .Change the number of ring entries for the Rx/Tx rings to 1024/512 respectively ===== ----- [net] ring=rx 1024 tx 512 ----- ===== + The [option]`channels` option allows changing the numbers of channels for the specified network device. A channel is an IRQ and the set of queues that can trigger that IRQ. To query the channels parameters of your network device, use `ethtool -l device`. The syntax of the option is the same as the [option]`coalesce` option. + .Set the number of multi-purpose channels to 16 ===== ----- [net] channels=combined 16 ----- ===== + A network device either supports rx/tx or combined queue mode. The [option]`channels` option automatically adjusts the parameters based on the mode supported by the device as long as a valid configuration is requested. + The [option]`nf_conntrack_hashsize` option sets the size of the hash table which stores lists of conntrack entries by writing to `/sys/module/nf_conntrack/parameters/hashsize`. + .Adjust the size of the conntrack hash table ==== ---- [net] nf_conntrack_hashsize=131072 ---- ==== + The [option]`txqueuelen` option allows changing txqueuelen (the length of the transmit queue). It uses `ip` utility that is in package iproute recommended for TuneD, so the package needs to be installed for its correct functionality. To query the txqueuelen parameters of your network device use `ip link show` and the current value is shown after the qlen column. + .Adjust the length of the transmit queue ==== ---- [net] txqueuelen=5000 ---- ==== + The [option]`mtu` option allows changing MTU (Maximum Transmission Unit). It uses `ip` utility that is in package iproute recommended for TuneD, so the package needs to be installed for its correct functionality. To query the MTU parameters of your network device use `ip link show` and the current value is shown after the MTU column. + .Adjust the size of the MTU ==== ---- [net] mtu=9000 ---- ==== cs6tt|j||d|_d|_t|_i|_d|_dS)Ng?T) superr__init___load_smallest _level_stepsr_cmd_re_ip_link_show_use_ip)selfargskwargs) __class__ /usr/lib/python3.6/plugin_net.pyr s zNetTuningPlugin.__init__cCshd|_t|_t|_tjd}x.|jjdD]}|j|j r.|jj |j q.Wt j dt|jdS)NTz(?!.*/virtual/.*)netz devices: %s)Z_devices_supportedsetZ _free_devicesZ_assigned_devicesrecompile_hardware_inventoryZ get_devicesmatchZ device_pathaddZsys_namelogdebugstr)rZre_not_virtualdevicerrr _init_devicess  zNetTuningPlugin._init_devicescsfdd|DS)Ncsg|]}jjd|qS)r)rZ get_device).0x)rrr sz7NetTuningPlugin._get_device_objects..r)rZdevicesr)rr_get_device_objectssz#NetTuningPlugin._get_device_objectscCsXd|_|j|jdr.levelrreadwriterz%s: setting 100Mbpsdz%s: setting max speedz %s load: read %0.2f, write %0.2fz$%s idle: read %d, write %d, level %d)r(Zget_device_loadr*_init_stats_and_idle _update_stats _update_idler)r rinforZ set_speed set_max_speedr)rr+r loadZstatsZidlerrrr/s&     ($ z(NetTuningPlugin._instance_update_dynamiccCs2dddddddddddddddddddddddS)N)z adaptive-rxz adaptive-txzrx-usecsz rx-framesz rx-usecs-irqz rx-frames-irqztx-usecsz tx-framesz tx-usecs-irqz tx-frames-irqzstats-block-usecsz pkt-rate-lowz rx-usecs-lowz rx-frames-lowz tx-usecs-lowz tx-frames-lowz pkt-rate-highz rx-usecs-highzrx-frames-highz tx-usecs-highztx-frames-highzsample-intervalr)clsrrr_get_config_options_coalesces,z,NetTuningPlugin._get_config_options_coalescecCs ddddS)N)autonegrxtxr)r=rrr_get_config_options_pausesz)NetTuningPlugin._get_config_options_pausecCsdddddS)N)r@zrx-minizrx-jumborAr)r=rrr_get_config_options_ringsz(NetTuningPlugin._get_config_options_ringcCsdddddS)N)r@rAothercombinedr)r=rrr_get_config_options_channelssz,NetTuningPlugin._get_config_options_channelsc Csddddddddddd S)NT) r& wake_on_lannf_conntrack_hashsizefeaturescoalescepauseringchannels txqueuelenmtur)r=rrr_get_config_optionssz#NetTuningPlugin._get_config_optionscCsF|jt|j}ddgd|dgd|j|<dddd|j|<dS)Nrr)newmax)r3r4r5) _calc_speedrZ get_max_speedr*r))rr+r Z max_speedrrrr7sz$NetTuningPlugin._init_stats_and_idlecCs|j|d|j|d<}||j|d<ddt||D}||j|d<|j|d}ddt||D}||j|d<t|dt|d|j|d <t|d t|d |j|d <dS) NrSoldcSsg|]}|d|dqS)rrr)r"Znew_oldrrrr$(sz1NetTuningPlugin._update_stats..diffrTcSsg|] }t|qSr)rT)r"Zpairrrrr$-srr4rRr5)r*zipfloat)rr+r Znew_loadZold_loadrWZ old_max_loadZmax_loadrrrr8"s"zNetTuningPlugin._update_statscCsLxFdD]>}|j|||jkr6|j||d7<qd|j||<qWdS)Nr4r5rr)r4r5)r*r r))rr+r Z operationrrrr94s zNetTuningPlugin._update_idlecCsH||jkrD|j|ddkrDd|j|d<tjd|t|jdS)Nr3rz%s: setting max speed)r)rr:rr;)rr+r rrr_instance_unapply_dynamic<sz)NetTuningPlugin._instance_unapply_dynamiccCstd|dS)Ng333333?ig333333@g333333#A)r1)rZspeedrrrrUBszNetTuningPlugin._calc_speedcCs|jj|}ttjdd|j}t|}|ddkrPtjd|t|fdS|dkr^t St t t |ddd|dddS)Nz (:\s*)|(\s+)|(\s*;\s*)|(\s*,\s*) rRrzinvalid %s parameter: '%s'r) Z _variablesexpandrrsubsplitlenrerrordictlistrX)rr2contextvZlvrrr_parse_config_parametersKs  z(NetTuningPlugin._parse_config_parameterscCs||jjddddddddd d d d d dddddd|}dd|jdD}t|dkrXdStdddd|ddDDS)Nz adaptive-rx:z adaptive-tx:zrx-frames-low:zrx-frames-high:ztx-frames-low:ztx-frames-high:zlro:zrx:ztx:zsg:ztso:zufo:zgso:zgro:zrxvlan:ztxvlan:zntuple:zrxhash:)z Adaptive RX:z\s+TX:z rx-frame-low:zrx-frame-high:z tx-frame-low:ztx-frame-high:zlarge-receive-offload:zrx-checksumming:ztx-checksumming:zscatter-gather:ztcp-segmentation-offload:zudp-fragmentation-offload:zgeneric-segmentation-offload:zgeneric-receive-offload:zrx-vlan-offload:ztx-vlan-offload:zntuple-filters:zreceive-hashing:cSs2g|]*}tt|dkrtjdt| r|qS)rz \[fixed\]$)r`rrsearch)r"rerrrr$ssz. rRcSsg|]}t|dkr|qS)rR)r`)r"urrrr$xscSsg|]}tjdt|qS)z:\s*)rr_r)r"rerrrr$xsr)r multiple_re_replacer_r`rb)rr2Zvlrrr_parse_device_parametersZs0 z(NetTuningPlugin._parse_device_parameterscCsdS)Nz,/sys/module/nf_conntrack/parameters/hashsizer)rrrr_nf_conntrack_hashsize_pathzsz+NetTuningPlugin._nf_conntrack_hashsize_pathrGT)Z per_devicecCs^|dkr dStjddt|}tjdtd|s@tjddS|sZ|jjdd|d|g|S) N0dz^[z]+$zIncorrect 'wake_on_lan' value.ethtoolz-sZwol) rr^rr WOL_VALUESrwarnr execute)rr2r simremoverrr_set_wake_on_lan~s z NetTuningPlugin._set_wake_on_lanFc CsXd}y:tjdtd|jjd|gdtj}|r<|jd}Wntk rRYnX|S)Nz.*Wake-on:\s*([z]+).*ror)rrrpr rrSgroupIOError)rr ignore_missingr2mrrr_get_wake_on_lans(z NetTuningPlugin._get_wake_on_lanrHcCsN|dkr dSt|}|dkrF|sB|jj|j||r:tjgndd|SdSdS)NrF)Zno_error)r1r Z write_to_filerlerrnoENOENT)rr2rsrtZhashsizerrr_set_nf_conntrack_hashsizesz*NetTuningPlugin._set_nf_conntrack_hashsizecCs(|jj|j}t|dkr$t|SdS)Nr)r Z read_filerlr`r1)rr2rrr_get_nf_conntrack_hashsizes z*NetTuningPlugin._get_nf_conntrack_hashsizecCsz|js dSddg|}|jj|tjgdd\}}}|tj krRtjdd|_dS|rvtjdtjd||fdS|S) NZiplinkT) no_errorsZ return_errz0ip command not found, ignoring for other devicesFzProblem calling ip commandz(rc: %s, msg: '%s')) rr rrr|r}rrqr:r)rrZrcoutZerr_msgrrr _call_ip_links    zNetTuningPlugin._call_ip_linkNcCsdg}|r|j||j|S)NZshow)appendr)rr rrrr _ip_link_shows zNetTuningPlugin._ip_link_showrNcCsr|dkr dSy t|Wn"tk r:tjd|dSX|sn|jdd|d|g}|dkrntjd|dS|S)Nz$txqueuelen value '%s' is not integerrdevrNz%Cannot set txqueuelen for device '%s')r1 ValueErrorrrqr)rr2r rsrtresrrr_set_txqueuelens zNetTuningPlugin._set_txqueuelencCs(||jkrtjd||j|<|j|S)z@ Return regex for int arg value from "ip link show" command z.*\s+%s\s+(\d+))rrr)rargrrr_get_re_ip_link_shows z$NetTuningPlugin._get_re_ip_link_showcCs`|j|}|dkr(|s$tjd|dS|jdj|}|dkrV|sRtjd|dS|jdS)NzECannot get 'ip link show' result for txqueuelen value for device '%s'ZqlenzFCannot get txqueuelen value from 'ip link show' result for device '%s'r)rrr:rrgrw)rr ryrrrrr_get_txqueuelens zNetTuningPlugin._get_txqueuelenrOcCsr|dkr dSy t|Wn"tk r:tjd|dSX|sn|jdd|d|g}|dkrntjd|dS|S)Nzmtu value '%s' is not integerrrrOzCannot set mtu for device '%s')r1rrrqr)rr2r rsrtrrrr_set_mtus zNetTuningPlugin._set_mtucCs`|j|}|dkr(|s$tjd|dS|jdj|}|dkrV|sRtjd|dS|jdS)Nz>Cannot get 'ip link show' result for mtu value for device '%s'rOz?Cannot get mtu value from 'ip link show' result for device '%s'r)rrr:rrgrw)rr ryrrrrr_get_mtus zNetTuningPlugin._get_mtucCsl|dkr dSt|j}|j|j|j|jd}t||j}|j|shtjd|t ||fdSdS)NrIT)rJrKrLrMzunknown %s parameter(s): %sF) rkeysr>rBrCrFissubsetrrar)rrdrnZparamsZsupported_getterZ supportedrrr_check_parameters s   z!NetTuningPlugin._check_parameterscCsR|jjdddd|}|jddd}dd|D}td dd d|DDS) Nr?r@rA)Z AutonegotiateRXTXrhrcSs&g|]}|dkrtjd| r|qS)z \[fixed\])rrg)r"r#rrrr$sz;NetTuningPlugin._parse_pause_parameters..cSsg|]}t|dkr|qS)rR)r`)r"r#rrrr$ scSsg|]}tjd|qS)z:\s*)rr_)r"r#rrrr$ s)r rjr_rb)rslrrr_parse_pause_parameterss z'NetTuningPlugin._parse_pause_parameterscCsjtjd|tjd}|d}|jjddddd|}|jd }d d |D}d d d d |DD}t|S)Nz^Current hardware settings:$)flagsrr@zrx-minizrx-jumborA)rzRX MinizRX JumborrhcSsg|]}|dkr|qS)rr)r"r#rrrr$,sz:NetTuningPlugin._parse_ring_parameters..cSsg|]}t|dkr|qS)rR)r`)r"r#rrrr$-scSsg|]}tjd|qS)z:\s*)rr_)r"r#rrrr$-s)rr_ MULTILINEr rjrb)rrarrrr_parse_ring_parameters#s  z&NetTuningPlugin._parse_ring_parameterscCsjtjd|tjd}|d}|jjddddd|}|jd }d d |D}d d d d |DD}t|S)Nz^Current hardware settings:$)rrr@rArDrE)rrZOtherZCombinedrhcSsg|]}|dkr|qS)rr)r"r#rrrr$:sz>NetTuningPlugin._parse_channels_parameters..cSsg|]}t|dkr|qS)rR)r`)r"r#rrrr$;scSsg|]}tjd|qS)z:\s*)rr_)r"r#rrrr$;s)rr_rr rjrb)rrrrrrr_parse_channels_parameters1s  z*NetTuningPlugin._parse_channels_parameterscCszg}d|kr(|jd|dd|dgn,ttt|dt|d}|jd|gttt|ddd|dddS)NrEr@rrArR)extendrrTr1rbrcrX)rrdZ params_list dev_paramsZmod_params_listZcntrrr_replace_channels_parameters>s z,NetTuningPlugin._replace_channels_parametersc CsRt|j}t|j}||}x,|D]$}tjd|||f|j|dq&WdS)aFilter unsupported parameters and log warnings about it Positional parameters: context -- context of change parameters -- parameters to change device -- name of device on which should be parameters set dev_params -- dictionary of currently known parameters of device z-%s parameter %s is not supported by device %sN)rrrZwarningpop) rrdZ parametersr rZsupported_parametersZparameters_to_changeZunsupported_parametersparamrrr_check_device_supportGs    z%NetTuningPlugin._check_device_supportc Csdddddd}||}|jjd||g\}}|dksBt|dkrFdS|j|j|j|j|jd}||}||} |d kr|j||  rdS| S) Nz-cz-kz-az-gz-l)rJrIrKrLrMrorrJ)r rrr`rkrrrr) rrdr context2optoptretr2Zcontext2parserparserrnrrr_get_device_parameters^s  z&NetTuningPlugin._get_device_parametersc Cs|dkst|dkrdS|j||}|dks:|j|| r>iS|r|j|||||dkrt|tt|dkr|j||jj ||}| rt|dkrt j d|t|fdddd d d }||}|jj d ||g|jj |d gd|S)NrrMn/armzsetting %s: %sz-Cz-Kz-Az-Gz-L)rJrIrKrLrMroP)r)rrm) r`rfrrrnextiterrr dict2listrrrr) rrdr2r rsrrnrrrrr_set_device_parametersps   $z&NetTuningPlugin._set_device_parametersc s|j||d}|r|j||}|dks2t|dkr6dS|j|||||ddks^tdkrbdSfdd|jD}t|}|r|jj|jj|k} |j|| ||d| S|j j |dj |jj|n|j j |} |j|| |ddS) N)Z command_nameZ device_namerF)rcs g|]\}}|kr||fqSrr)r"rr2) params_setrrr$sz6NetTuningPlugin._custom_parameters..)r r\) Z _storage_keyrr`ritemsrbr rZ_log_verification_resultZ_storagerjoinget) rrdstartr2r verifyZ storage_keyZparams_currentZrelevant_params_currentroriginal_valuer)rr_custom_parameterss:     z"NetTuningPlugin._custom_parametersrIcCs|jd||||S)NrI)r)rrr2r rryrrr _featuresszNetTuningPlugin._featuresrJcCs|jd||||S)NrJ)r)rrr2r rryrrr _coalesceszNetTuningPlugin._coalescerKcCs|jd||||S)NrK)r)rrr2r rryrrr_pauseszNetTuningPlugin._pauserLcCs|jd||||S)NrL)r)rrr2r rryrrr_ringszNetTuningPlugin._ringrMcCs|jd||||S)NrM)r)rrr2r rryrrr _channelsszNetTuningPlugin._channels)F)N)F)F)N)6__name__ __module__ __qualname____doc__r r!r%r,r.r0r/ classmethodr>rBrCrFrPr7r8r9rZrUrfrkrlZ command_setruZ command_getr{r~rrrrrrrrrrrrrrrrrZcommand_customrrrrr __classcell__rr)rrrsd                    &r)r|rrZ decoratorsZ tuned.logsZtunedZtuned.utils.nettoolrZtuned.utils.commandsrosrZlogsrrrpZPluginrrrrrs    PK$2]]K0plugins/__pycache__/plugin_uncore.cpython-36.pycnu[3 dSXt j |d}t |dkrbd|_|}x|D]}|jj |qhWt jdt|jdS)NTFzuncore*rz devices: %s)Z_devices_supportedsetZ_assigned_devicesZ _free_devicesZ_is_tpmioslistdir SYSFS_DIROSErrorfnmatchfilterlenaddlogdebugstr)selfZdevicesZ tpmi_devicesdr#/usr/lib/python3.6/plugin_uncore.py _init_devices$s   zUncorePlugin._init_devicescCsd|_d|_dS)NTF)Z_has_static_tuningZ_has_dynamic_tuning)rinstancerrr_instance_init:szUncorePlugin._instance_initcCsdS)Nr)rrrrr_instance_cleanup>szUncorePlugin._instance_cleanupcCs2t|d|}tj|}t|dkr.t|SdS)N/r)r cmdZ read_filerint)rdev_dirfile sysfs_filevaluerrr_getAs   zUncorePlugin._getcCs(t|d|}tj|d|r$|SdS)Nrz%u)r rZ write_to_file)rrrr!r rrr_setHszUncorePlugin._setcCs dddS)N) max_freq_khz min_freq_khzr)clsrrr_get_config_optionsNsz UncorePlugin._get_config_optionsc Cs*y t|}Wn"tk r.tjd|dSXy4|j|d}|j|d}|j|d}|j|d}Wn"ttfk rtjddSX|tkr||krtjd|||fdS||krtjd|||f|}nT|t kr"||krtjd |||fdS||kr&tjd |||f|}ndS|S) Nzvalue '%s' is not integerinitial_max_freq_khzinitial_min_freq_khzr$r%z+fail to read inital uncore frequency valuesz/%s: max_freq_khz %d value below min_freq_khz %dzC%s: max_freq_khz %d value above initial_max_freq_khz - capped to %dz/%s: min_freq_khz %d value above max_freq_khz %dzC%s: min_freq_khz %d value below initial_max_freq_khz - capped to %d) r ValueErrorrerrorr"r IOErrorIS_MAXinfoIS_MIN) rdeviceZ min_or_maxr!Zfreq_khzr(r)r$r%rrr_validate_valueUs:        zUncorePlugin._validate_valuer$T)Z per_devicecCsB|j|t|}|dkrdS|r"|Stjd||f|j|d|S)Nz%s: set max_freq_khz %dr$)r1r-rrr#)rr!r0simremover$rrr_set_max_freq_khz|szUncorePlugin._set_max_freq_khzFc Cs`|rtjjt rdSy|j|d}Wn"ttfk rHtjddSXtj d||f|S)Nr$z$fail to read uncore frequency valuesz%s: get max_freq_khz %d) rpathisdirr r"r r,rr+r)rr0ignore_missingr$rrr_get_max_freq_khzs zUncorePlugin._get_max_freq_khzr%cCsB|j|t|}|dkrdS|r"|Stjd||f|j|d|S)Nz%s: set min_freq_khz %dr%)r1r/rrr#)rr!r0r2r3r%rrr_set_min_freq_khzszUncorePlugin._set_min_freq_khzc Cs`|rtjjt rdSy|j|d}Wn"ttfk rHtjddSXtj d||f|S)Nr%z$fail to read uncore frequency valuesz%s: get min_freq_khz %d) rr5r6r r"r r,rr+r)rr0r7r%rrr_get_min_freq_khzs zUncorePlugin._get_min_freq_khzN)F)F)__name__ __module__ __qualname____doc__rrrr"r# classmethodr'r1Z command_setr4Z command_getr8r9r:rrrrrs '   r)rZ decoratorsZ tuned.logsZtunedZtuned.utils.commandsrrr Zlogsgetrrr r/r-ZPluginrrrrrs   PK$2]X  1plugins/__pycache__/plugin_selinux.cpython-36.pycnu[3 s    PK$2]7PTT-plugins/__pycache__/base.cpython-36.opt-1.pycnu[3 d?Z&ejfd@dAZ'dBdCZ(dDdEZ)dFdGZ*dHdIZ+dJdKZ,dLdMZ-d|dOdPZ.d}dQdRZ/d~dSdTZ0ddUdVZ1dWdXZ2dYdZZ3d[d\Z4d]d^Z5d_d`Z6ddbdcZ7ddddeZ8dfdgZ9dhdiZ:djdkZ;ddldmZdrdsZ?dtduZ@ddvdwZAddxdyZBdzd{ZCdNS)Plugina Base class for all plugins. Plugins change various system settings in order to get desired performance or power saving. Plugins use Monitor objects to get information from the running system. Intentionally a lot of logic is included in the plugin to increase plugin flexibility. c Csn|j|jj|_||_||_||_||_||_t j |_ |j ||_ ||_d|_d|_|j|_t|_dS)zPlugin constructor.FN)create __class____name___storageZ_monitors_repositoryZ_hardware_inventory_device_matcher_device_matcher_udev_instance_factory collections OrderedDict _instances_init_commands _global_cfg _variables_has_dynamic_options_devices_inited#_get_config_options_used_by_dynamic_options_used_by_dynamicr_cmd) selfZmonitors_repositoryZstorage_factoryZhardware_inventoryZdevice_matcherZdevice_matcher_udevZinstance_factoryZ global_cfg variablesr/usr/lib/python3.6/base.py__init__s  zPlugin.__init__cCs |jdS)N)destroy_instances)rrrrcleanup,szPlugin.cleanupcCs|js|jd|_dS)NT)r _init_devices)rrrr init_devices/szPlugin.init_devicescCs|jjjddjdddS)N._)r __module__split)rrrrname4sz Plugin.namecCsiS)z-Default configuration options for the plugin.r)rrrr_get_config_options<szPlugin._get_config_optionscCsiS)z*Explanation of each config option functionr)clsrrrget_config_options_hintsAszPlugin.get_config_options_hintscCsgS)znList of config options used by dynamic tuning. Their previous values will be automatically saved and restored.r)rrrrrFsz*Plugin._get_config_options_used_by_dynamiccCsP|jj}x>|D]6}||ks$|jr2||||<qtjd||jjfqW|S)z3Merge provided options with plugin default options.z$Unknown option '%s' for plugin '%s'.)r(copyrlogwarnrr)roptionsZ effectivekeyrrr_get_effective_optionsKs   zPlugin._get_effective_optionscCs,t|tkr|St|j}|dkp*|dkS)Ntrue1)typeboolstrlower)rvaluerrr _option_boolVs  zPlugin._option_boolc CsF||jkrtd||j|}|jj|||||||}||j|<|S)z8Create new instance of the plugin and seize the devices.z.Plugin instance with name '%s' already exists.)r Exceptionr0r r) rr'devices_expressiondevices_udev_regex script_pre script_postr.Zeffective_optionsinstancerrrcreate_instance`s     zPlugin.create_instancecCsV|j|krtd||f|j|jkr2td||j|j}|j||j|j=dS)zDestroy existing instance.z9Plugin instance '%s' does not belong to this plugin '%s'.z+Plugin instance '%s' was already destroyed.N)Z_pluginr9r'r_destroy_instance)rr>rrrdestroy_instancels     zPlugin.destroy_instancecCs$tjd|j|jf|j|dS)zInitialize an instance.zinitializing instance %s (%s)N)r,debugr'_instance_init)rr>rrrinitialize_instancewszPlugin.initialize_instancecCsFx6t|jjD]$}tjd|j|jf|j|qW|jjdS)zDestroy all instances.zdestroying instance %s (%s)N)listrvaluesr,rBr'r@clear)rr>rrrr|szPlugin.destroy_instancescCs|j||j|dS)N)release_devices_instance_cleanup)rr>rrrr@s zPlugin._destroy_instancecCs tdS)N)NotImplementedError)rr>rrrrCszPlugin._instance_initcCs tdS)N)rJ)rr>rrrrIszPlugin._instance_cleanupcCsd|_t|_t|_dS)NF)_devices_supportedset_assigned_devices _free_devices)rrrrrszPlugin._init_devicescCsdS)zOverride this in a subclass to transform a list of device names (e.g. ['sda']) to a list of pyudev.Device objects, if your plugin supports itNr)rdevicesrrr_get_device_objectsszPlugin._get_device_objectscCsj|jdkrt|jj|j|S|j|}|dkrDtjd|jtS|j j|j|}tdd|DSdS)Nzsz0Plugin._get_matching_devices..) r;rLr Z match_listr:rPr,errorr'r )rr>rOZ udev_devicesrrr_get_matching_devicess  zPlugin._get_matching_devicescCs|js dStjd|j|j||j}t|dk|_|jsNtjd|jn`|j}|j|jkrn|d|j7}tj d|dj |f|j j ||j |O_ |j|8_dS)Nz assigning devices to instance %srz*instance %s: no matching devices availablez (%s)z!instance %s: assigning devices %sz, )rKr,rBr'rUrNlenactiver-infojoinassigned_devicesupdaterM)rr>Z to_assignr'rrrassign_free_devicess  zPlugin.assign_free_devicescCsV|js dS|j|jB|j@}d|_|jj|jj|j|8_|j|O_dS)NF)rKprocessed_devicesrZrMrWrGrN)rr>Z to_releaserrrrHs  zPlugin.release_devicescCs(|js dg}x|D]}|||qWdS)N)rK)rr>callbackrOdevicerrr_run_for_each_devices zPlugin._run_for_each_devicecCsdS)Nr)rr>enablingrrr_instance_pre_staticszPlugin._instance_pre_staticcCsdS)Nr)rr>rarrr_instance_post_staticszPlugin._instance_post_staticcCsn|dkr dSt|dkr0tjd|j|fdS|jdsHtjddStjj|}d}x|D]}tj } | j |j j |g} |t jkr| jd| j|tjd |t| ftjd tt| jyVt|g| ttd| |dd } | j\} } | jr$tjd || j| ddfd}Wq`ttfk rd}ztjd||fd}WYdd}~Xq`Xq`W|S)Nrz1Instance '%s': no device to call script '%s' for./zZscriptoprOrollbackZdir_nameretZdevrmZ argumentsprocouterrerrr_call_device_scriptsB         zPlugin._call_device_scriptcCs|js dS|jrZ|j||jd|j|j|d|j||j|d|j||jd|j|j r|j j t j t jr|j||j|j|jj|j|jjdS)zG Apply static and dynamic tuning if the plugin instance is active. NZapplyT)rWhas_static_tuningr{r<rZrb_instance_apply_staticrcr=has_dynamic_tuningrgetrnCFG_DYNAMIC_TUNINGCFG_DEF_DYNAMIC_TUNINGr`_instance_apply_dynamicr]r[rG)rr>rrrinstance_apply_tunings       zPlugin.instance_apply_tuningcCs|js dSt|jdkr.tjddj|j|jj}|jr|j ||j d|dkrXdS|j |||dkrndS|j ||j d|dkrdSdSdSdS)z< Verify static tuning if the plugin instance is active. Nrz)BUG: Some devices have not been tuned: %sz, ZverifyFT) rWrVrZr,rTrYr]r+r|r{r<_instance_verify_staticr=)rr>ignore_missingrOrrrinstance_verify_tunings zPlugin.instance_verify_tuningcCs<|js dS|jr8|jjtjtjr8|j||j|j j dS)z< Apply dynamic tuning if the plugin instance is active. N) rWr~rrrnrrr`_instance_update_dynamicr]r+)rr>rrrinstance_update_tuning$szPlugin.instance_update_tuningcCs|tjkrdS|jr8|jjtjtjr8|j||j|j |j r|j ||j d|j |d|j |d|j|||j|d|j ||jd|j |ddS)z8 Remove all tunings applied by the plugin instance. NZunapply)ruF)rnZ ROLLBACK_NONEr~rrrrr`_instance_unapply_dynamicr]r|r{r=rb_instance_unapply_staticrcr<)rr>rurrrinstance_unapply_tuning-s     zPlugin.instance_unapply_tuningcCs|j||j||jdS)N) _execute_all_non_device_commands_execute_all_device_commandsrZ)rr>rrrr}?s zPlugin._instance_apply_staticcCs2d}|j||dkrd}|j|||dkr.d}|S)NTF)_verify_all_non_device_commands_verify_all_device_commands)rr>rrOrvrrrrCs zPlugin._instance_verify_staticcCs|j||j|j|dS)N)_cleanup_all_device_commandsr] _cleanup_all_non_device_commands)rr>rurrrrKszPlugin._instance_unapply_staticcsFx4fddjDD]}jj|qWjdS)Ncs(g|] }jj|dkr|qS)N) _storage_get _commands)rQopt)r_r>rrrrSQsz2Plugin._instance_apply_dynamic..)r_check_and_save_valuerr)rr>r_Zoptionr)r_r>rrrPszPlugin._instance_apply_dynamiccCs tdS)N)rJ)rr>r_rrrrVsz Plugin._instance_unapply_dynamiccCs tdS)N)rJ)rr>r_rrrrYszPlugin._instance_update_dynamiccCstj|_|j|jdS)z Initialize commands. N)r rr_autoregister_commands_check_commands)rrrrr`s zPlugin._init_commandscCsx|jjD]}|jdrq t||}t|ds0q |jd}|jj|d|i}d|jkrd|d<||d<|jd|d<|jd|d<nBd |jkr||d <n.d|jkr||d<|jd|d<|jd|d<||j|<q Wtj t t |jj d d d |_dS) zd Register all commands marked using @command_set, @command_get, and @command_custom decorators. ___commandr'rLNcustom per_devicepriorityrcSs |ddS)Nr"rr)Z name_inforrrsz/Plugin._autoregister_commands..)r/) r__dict__rigetattrhasattrrrrr rsortediterrp)r member_namemember command_namerXrrrrhs*        zPlugin._autoregister_commandscCsJxDt|jjD]2\}}|jddr&qd|ks6d|krtd|qWdS)z2 Check if all commands are defined correctly. rFrrLz,Plugin command '%s' is not defined correctlyN)rErrpr TypeError)rrcommandrrrrs  zPlugin._check_commandsNcCsJt|j}|dkrdn|}|dkr&dn|}|dkr6dn|}d||||fS)Nz %s/%s/%s/%s)r3r)rZ instance_namer device_name class_namerrr _storage_keys  zPlugin._storage_keycCs&|j|j|d|}|jj||dS)Nr')rr'r rL)rr>rr7rr/rrr _storage_setszPlugin._storage_setcCs |j|j|d|}|jj|S)Nr')rr'r r)rr>rrr/rrrrszPlugin._storage_getcCs |j|j|d|}|jj|S)Nr')rr'r Zunset)rr>rrr/rrr_storage_unsetszPlugin._storage_unsetcCsVxPddt|jjDD]4}|jj|jj|dd}|dk r|j|||qWdS)NcSsg|]}|ds|qS)rr)rQrrrrrSsz;Plugin._execute_all_non_device_commands..r')rErrFrexpandr.r_execute_non_device_command)rr>r new_valuerrrrsz'Plugin._execute_all_non_device_commandscCshxbddt|jjDD]F}|jj|jj|dd}|dkrBqx|D]}|j||||qHWqWdS)NcSsg|]}|dr|qS)rr)rQrrrrrSsz7Plugin._execute_all_device_commands..r')rErrFrrr.r_execute_device_command)rr>rOrrr_rrrrs  z#Plugin._execute_all_device_commandscCsdd}xZddt|jjDD]>}|jj|jj|dd}|dk r|j||||dkrd}qW|S)NTcSsg|]}|ds|qS)rr)rQrrrrrSsz:Plugin._verify_all_non_device_commands..r'F)rErrFrrr.r_verify_non_device_command)rr>rrvrrrrrrsz&Plugin._verify_all_non_device_commandscCsnd}xdddt|jjDD]H}|jj|dd}|dkr>qx&|D]}|j|||||dkrDd}qDWqW|S)NTcSsg|]}|dr|qS)rr)rQrrrrrSsz6Plugin._verify_all_device_commands..r'F)rErrFr.r_verify_device_command)rr>rOrrvrrr_rrrrs  z"Plugin._verify_all_device_commandsc Cs|dk rt|}t|dkr |S|dd}|dd}|dkrP|dkrL|S|SyF|dkrtt|t|krn|SdSn |dkrt|t|kr|SdSWn*tk rtjd||||fYnX|S)Nr"<>zhcannot compare new value '%s' with current value '%s' by operator '%s', using '%s' directly as new value)rr)r5rVint ValueErrorr,r-)rr current_valueZnwsrtvalrrr_process_assignment_modifierss(   z$Plugin._process_assignment_modifiersFcCs&|dk r|d||dS|dSdS)Nr)rr)rrr_rrrr_get_current_valueszPlugin._get_current_valuecCs<|j||}|j||}|dk r8|dk r8|j|||||S)N)rrr)rr>rr_rrrrrrs   zPlugin._check_and_save_valuecCsR|ddk r"|dd||ddn,|j||||}|dk rN|d||ddddS)NrTFrL)simremove)r)rr>rr_rrrrrs  zPlugin._execute_device_commandcCsN|ddk r |dd|ddn*|j||d|}|dk rJ|d|ddddS)NrTFrL)rr)r)rr>rrrrrrs  z"Plugin._execute_non_device_commandcCs.|jjt|}tjd|r*tjdd|S|S)Nz\s*(0+,?)+([\da-fA-F]*,?)*\s*$z ^\s*(0+,?)+r)rZunquoter5rematchsub)rr7vrrr _norm_values zPlugin._norm_valuec Cs(|dkr dSd}|dkrN|rN|dkr6tjtj|ntjtj||fdS|dk r|j|}|j|}yt|t|k}Wntk ryt|dt|dk}Wn^tk rt|t|k}|st|j d}x"|D]}|j }||k}|rPqWYnXYnX|j |||||d|S)NFT|)r_) r,rXrnZ STR_VERIFY_PROFILE_VALUE_MISSINGZ'STR_VERIFY_PROFILE_DEVICE_VALUE_MISSINGrrrr5r&strip_log_verification_result) rr'rrrr_rvvalsrrrr _verify_value s8       zPlugin._verify_valuecCs|rL|dkr*tjtj|t|jfntjtj||t|jfdS|dkr|tjtj|t|jt|jfn(tjtj ||t|jt|jfdSdS)NTF) r,rXrnZSTR_VERIFY_PROFILE_VALUE_OKr5rZ"STR_VERIFY_PROFILE_DEVICE_VALUE_OKrTZSTR_VERIFY_PROFILE_VALUE_FAILZ$STR_VERIFY_PROFILE_DEVICE_VALUE_FAIL)rr'successrrr_rrrr-s((zPlugin._log_verification_resultcCsp|ddk r |dd||d|S|j|||d}|j||}|dkrHdS|d||dd}|j|d||||S)NrT)rrLFr')rrr)rr>rr_rrrrrrr<s  zPlugin._verify_device_commandcCsd|ddk r|dd|d|S|j|}|j||}|dkr@dS|d|dd}|j|d|||S)NrTrLFr')rrr)rr>rrrrrrrrFs   z!Plugin._verify_non_device_commandcCsZxTtddt|jjDD]4}|jj|dddk sF|d|jkr|j||qWdS)NcSsg|]}|ds|qS)rr)rQrrrrrSQsz;Plugin._cleanup_all_non_device_commands..r')reversedrErrFr.rr_cleanup_non_device_command)rr>rrrrrPs"$z'Plugin._cleanup_all_non_device_commandscCslxftddt|jjDD]F}|jj|dddk sF|d|jkrx|D]}|j||||qLWqWdS)NcSsg|]}|dr|qS)rr)rQrrrrrSVsz7Plugin._cleanup_all_device_commands..r')rrErrFr.rr_cleanup_device_command)rr>rOrrr_rrrrUs"$ z#Plugin._cleanup_all_device_commandscCs^|ddk r"|ddd|ddn8|j|||}|dk rL|d||d|d|j|||dS)NrFrL)rr)rr)rr>rr_r old_valuerrrr[s  zPlugin._cleanup_device_commandcCsV|ddk r |dddddn2|j||}|dk rF|d|ddd|j||dS)NrFrL)rr)rr)rr>rrrrrrds   z"Plugin._cleanup_non_device_command)NNN)N)N)N)NF)NN)N)N)F)F)Drr% __qualname____doc__rrr propertyr' classmethodr(r*rr0r8r?rArDrr@rCrIrrPrUr\rHr`rbrcrnZ ROLLBACK_SOFTr{rrrrr}rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr s|         #          !     r)rZ tuned.constsrnZtuned.profiles.variablesZtunedZ tuned.logsr Ztuned.utils.commandsrrj subprocessrrZlogsrr,objectrrrrrs   PK$2]FI0plugins/__pycache__/plugin_sysctl.cpython-36.pycnu[3 rzGFailed to read sysctl parameter '%s', multi-line values are unsupportedz&Value of sysctl parameter '%s' is '%s'zBFailed to read sysctl parameter '%s', the parameter does not existz(Failed to read sysctl parameter '%s': %s) rQr@rArr"rOr?r4rCrDrErF)r r*r=rGrIir+rJrrrr!s(     zSysctlPlugin._read_sysctlFcCs|j|}tjj|tkr,tjd|dSy6tjd||ft|d}|j |WdQRXdSt t fk r}zJ|j t j kr|rtjntj}|d||fntjd||t|fdSd}~XnXdS)Nz+Refusing to set deprecated sysctl option %sFz%Setting sysctl parameter '%s' to '%s'wTzIFailed to set sysctl parameter '%s' to '%s', the parameter does not existz/Failed to set sysctl parameter '%s' to '%s': %s)rQr2r=basenameDEPRECATED_SYSCTL_OPTIONSrr"r?r@writer4rCrDrErF)r r*r+r.r=rGrJZlog_funcrrrr&s&    zSysctlPlugin._write_sysctl)F)__name__ __module__ __qualname____doc__rrrr-r0r(Z ROLLBACK_SOFTrr)r8rBrQr!r& __classcell__rr)r rrs   r)rerRrZ decoratorsZ tuned.logsZtuned subprocessZtuned.utils.commandsrZ tuned.constsr(rDr2ZlogsrrrVr1ZPluginrrrrrs    PK$2]hh3plugins/__pycache__/plugin_cpu.cpython-36.opt-1.pycnu[3 d?d@dAZ%e&d=dpdBdCZ'dqdEdFZ(e$dGd>dHdIdJdKZ)e&dGdrdLdMZ*dNdOZ+dsdPdQZ,dRdSZ-e$dTd>d?dUdVZ.dWdXZ/dYdZZ0d[d\Z1e&dTdtd]d^Z2d_d`Z3dadbZ4e$dcd>d?dddeZ5e&dcdudfdgZ6e$dhd>d?didjZ7e&dhdvdkdlZ8Z9S)wCPULatencyPlugina `cpu`:: Sets the CPU governor to the value specified by the [option]`governor` option and dynamically changes the Power Management Quality of Service (PM QoS) CPU Direct Memory Access (DMA) latency according to the CPU load. `governor`::: The [option]`governor` option of the 'cpu' plug-in supports specifying CPU governors. Multiple governors are separated using '|'. The '|' character is meant to represent a logical 'or' operator. Note that the same syntax is used for the [option]`energy_perf_bias` option. *TuneD* will set the first governor that is available on the system. + For example, with the following profile, *TuneD* will set the 'ondemand' governor, if it is available. If it is not available, but the 'powersave' governor is available, 'powersave' will be set. If neither of them are available, the governor will not be changed. + .Specifying a CPU governor ==== ---- [cpu] governor=ondemand|powersave ---- ==== `sampling_down_factor`::: The sampling rate determines how frequently the governor checks to tune the CPU. The [option]`sampling_down_factor` is a tunable that multiplies the sampling rate when the CPU is at its highest clock frequency thereby delaying load evaluation and improving performance. Allowed values for sampling_down_factor are 1 to 100000. + .The recommended setting for jitter reduction ==== ---- [cpu] sampling_down_factor = 100 ---- ==== `energy_perf_bias`::: [option]`energy_perf_bias` supports managing energy vs. performance policy via x86 Model Specific Registers using the `x86_energy_perf_policy` tool. Multiple alternative Energy Performance Bias (EPB) values are supported. The alternative values are separated using the '|' character. The following EPB values are supported starting with kernel 4.13: "performance", "balance-performance", "normal", "balance-power" and "power". On newer processors is value writen straight to file (see rhbz#2095829) + .Specifying alternative Energy Performance Bias values ==== ---- [cpu] energy_perf_bias=powersave|power ---- *TuneD* will try to set EPB to 'powersave'. If that fails, it will try to set it to 'power'. ==== `energy_performance_preference`::: [option]`energy_performance_preference` supports managing energy vs. performance hints on newer Intel and AMD processors with active P-State CPU scaling drivers (intel_pstate or amd-pstate). Multiple alternative Energy Performance Preferences (EPP) values are supported. The alternative values are separated using the '|' character. Available values can be found in `energy_performance_available_preferences` file in `CPUFreq` policy directory in `sysfs`. in + .Specifying alternative Energy Performance Hints values ==== ---- [cpu] energy_performance_preference=balance_power|power ---- *TuneD* will try to set EPP to 'balance_power'. If that fails, it will try to set it to 'power'. ==== `latency_low, latency_high, load_threshold`::: + If the CPU load is lower than the value specified by the[option]`load_threshold` option, the latency is set to the value specified either by the [option]`latency_high` option or by the [option]`latency_low` option. + `force_latency`::: You can also force the latency to a specific value and prevent it from dynamically changing further. To do so, set the [option]`force_latency` option to the required latency value. + The maximum latency value can be specified in several ways: + * by a numerical value in microseconds (for example, `force_latency=10`) * as the kernel CPU idle level ID of the maximum C-state allowed (for example, force_latency = cstate.id:1) * as a case sensitive name of the maximum C-state allowed (for example, force_latency = cstate.name:C1) * by using 'None' as a fallback value to prevent errors when alternative C-state IDs/names do not exist. When 'None' is used in the alternatives pipeline, all the alternatives that follow 'None' are ignored. + It is also possible to specify multiple fallback values separated by '|' as the C-state names and/or IDs may not be available on some systems. + .Specifying fallback C-state values ==== ---- [cpu] force_latency=cstate.name:C6|cstate.id:4|10 ---- This configuration tries to obtain and set the latency of C-state named C6. If the C-state C6 does not exist, kernel CPU idle level ID 4 (state4) latency is searched for in sysfs. Finally, if the state4 directory in sysfs is not found, the last latency fallback value is `10` us. The value is encoded and written into the kernel's PM QoS file `/dev/cpu_dma_latency`. ==== + .Specifying fallback C-state values using 'None'. ==== ---- [cpu] force_latency=cstate.name:XYZ|None ---- In this case, if C-state with the name `XYZ` does not exist [option]`force_latency`, no latency value will be written into the kernel's PM QoS file, and no errors will be reported due to the presence of 'None'. ==== `min_perf_pct, max_perf_pct, no_turbo`::: These options set the internals of the Intel P-State driver exposed via the kernel's `sysfs` interface. + .Adjusting the configuration of the Intel P-State driver ==== ---- [cpu] min_perf_pct=100 ---- Limit the minimum P-State that will be requested by the driver. It states it as a percentage of the max (non-turbo) performance level. ==== + `pm_qos_resume_latency_us`::: This option allow to set specific latency for all cpus or specific ones. ==== ---- [cpu] pm_qos_resume_latency_us=n/a ---- Special value that disables C-states completely. ==== ---- [cpu] pm_qos_resume_latency_us=0 ---- Allows all C-states. ==== ---- [cpu] pm_qos_resume_latency_us=100 ---- Allows any C-state with a resume latency less than value. csrtt|j||d|_d|_d|_d|_d|_d|_d|_ d|_ d|_ d|_ d|_ d|_i|_t|_d|_dS)NTx86_64F)superr__init__ _has_pm_qos_archZ_is_x86 _is_intel_is_amd_has_energy_perf_bias_has_intel_pstate_has_amd_pstate_has_pm_qos_resume_latency_us_min_perf_pct_save_max_perf_pct_save_no_turbo_save_governors_mapr_cmd_flags)selfargskwargs) __class__ /usr/lib/python3.6/plugin_cpu.pyr s zCPULatencyPlugin.__init__cCs>d|_t|_x"|jjdD]}|jj|jqWt|_dS)NTcpu)Z_devices_supportedsetZ _free_devices_hardware_inventoryZ get_devicesaddZsys_nameZ_assigned_devices)rdevicerrr _init_devicess zCPULatencyPlugin._init_devicescsfdd|DS)Ncsg|]}jjd|qS)r)r Z get_device).0x)rrr sz8CPULatencyPlugin._get_device_objects..r)rZdevicesr)rr_get_device_objectssz$CPULatencyPlugin._get_device_objectsc Csddddddddddddd S)Ng?di) load_threshold latency_low latency_high force_latencygovernorsampling_down_factorenergy_perf_bias min_perf_pct max_perf_pctno_turbopm_qos_resume_latency_usenergy_performance_preferencer)rrrr_get_config_optionssz$CPULatencyPlugin._get_config_optionscCsdddddg}tj|_|j|krttj}|jjd}|dkrFd|_n|d ksV|d kr^d|_nd|_t j d |nt j d |j|jr|j |j |jr|j dS) NrZi686Zi585Zi486Zi386Z vendor_idZ GenuineIntelTZ AuthenticAMDZ HygonGenuinez$We are running on an x86 %s platformzWe are running on %s (non x86))platformmachiner procfscpuinfotagsgetr r loginfo_check_energy_perf_bias_check_intel_pstate_check_amd_pstate)rZ intel_archsrZvendorrrr _check_archs"   zCPULatencyPlugin._check_archcCsbd|_d}|jjddgtj|gd\}}|dkr@|dkr@d|_n|dkrTtjd n tjd dS) NFrx86_energy_perf_policyz-r)Z no_errorsrTzgunable to run x86_energy_perf_policy tool, ignoring CPU energy performance bias, is the tool installed?zXyour CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias)rrexecuteerrnoENOENTr<warning)rZretcode_unsupportedretcodeoutrrrr>s z(CPULatencyPlugin._check_energy_perf_biascCs"tjjd|_|jrtjddS)Nz$/sys/devices/system/cpu/intel_pstatezintel_pstate detected)ospathexistsrr<r=)rrrrr?sz$CPULatencyPlugin._check_intel_pstatecCs"tjjd|_|jrtjddS)Nz"/sys/devices/system/cpu/amd_pstatezamd-pstate detected)rJrKrLrr<r=)rrrrr@#sz"CPULatencyPlugin._check_amd_pstatecCs$|jdkrtjjjdg|_|jS)Nflags)rr8r9r:r;)rrrr_get_cpuinfo_flags(s z#CPULatencyPlugin._get_cpuinfo_flagscCs t|}|jjt|jddS)NrrC)strrZ is_cpu_onlinereplace)rr"Zsdrrr_is_cpu_online-szCPULatencyPlugin._is_cpu_onlinecCstjjd|S)Nz3/sys/devices/system/cpu/%s/cpufreq/scaling_governor)rJrKrL)rr"rrr_cpu_has_scaling_governor1sz*CPULatencyPlugin._cpu_has_scaling_governorcCs<|j|stjd|dS|j|s8tjd|dSdS)Nz'%s' is not online, skippingFz.there is no scaling governor fo '%s', skippingT)rQr<debugrR)rr"rrr_check_cpu_can_change_governor4s  z/CPULatencyPlugin._check_cpu_can_change_governorcCsd|_d|_t|jjd|krd|_ytjtj tj |_ Wn*t k rht jdtj d|_YnXd|_|jddkr|jddkr|jjdd|_d|_nd|_|jnd|_t jd|jyt|jd|_Wntk rd|_YnXdS) NTFrz-Unable to open '%s', disabling PM_QoS controlr,r3loadzILatency settings from non-first CPU plugin instance '%s' will be ignored.)Z_has_static_tuningZ_has_dynamic_tuninglistZ _instancesvalues_first_instancerJopenconstsZPATH_CPU_DMA_LATENCYO_WRONLY_cpu_latency_fdOSErrorr<errorr _latencyoptions_monitors_repositoryZcreate _load_monitorrAr=nameZassigned_devices _first_device IndexError)rinstancerrr_instance_init=s*  zCPULatencyPlugin._instance_initcCs4|jr0|jrtj|j|jdk r0|jj|jdS)N)rXr rJcloser\rbradelete)rrfrrr_instance_cleanup[s   z"CPULatencyPlugin._instance_cleanupcCs|jjd|djS)Nz'/sys/devices/system/cpu/intel_pstate/%s)r read_filestrip)rattrrrr_get_intel_pstate_attrbsz'CPULatencyPlugin._get_intel_pstate_attrcCs|dk r|jjd||dS)Nz'/sys/devices/system/cpu/intel_pstate/%s)r write_to_file)rrmvalrrr_set_intel_pstate_attresz'CPULatencyPlugin._set_intel_pstate_attrcCs&|dkr dS|j|}|j|||S)N)rnrq)rrmvaluevrrr_getset_intel_pstate_attris   z*CPULatencyPlugin._getset_intel_pstate_attrcstt|j||jsdS|jj|jd}|dk r>|j||jr|jj|jd}|j d||_ |jj|jd}|j d||_ |jj|jd}|j d||_ dS)Nr,r0r1r2) rr_instance_apply_staticrXZ _variablesexpandr` _set_latencyrrtrrr)rrfZforce_latency_valueZ new_value)rrrrups(       z'CPULatencyPlugin._instance_apply_staticcsLtt|j|||jrH|jrH|jd|j|jd|j|jd|jdS)Nr0r1r2) rr_instance_unapply_staticrXrrqrrr)rrfZrollback)rrrrxs  z)CPULatencyPlugin._instance_unapply_staticcCs|j||dS)N)_instance_update_dynamic)rrfr"rrr_instance_apply_dynamicsz(CPULatencyPlugin._instance_apply_dynamiccCsP||jkrdS|jjd}||jdkr<|j|jdn|j|jddS)Nsystemr)r+r*)rdrbZget_loadr`rw)rrfr"rUrrrrys  z)CPULatencyPlugin._instance_update_dynamiccCsdS)Nr)rrfr"rrr_instance_unapply_dynamicsz*CPULatencyPlugin._instance_unapply_dynamicc Cs&yt|Sttfk r dSXdS)N)int ValueError TypeError)rsrrr_str2intszCPULatencyPlugin._str2intcCsi|_xztjtD]l}td|}|jj|dddd}|jj|dddd}|dk r|dk r|j|}|dk r||j|j<qWdS)Nz/%s/rcT)err_retno_errorlatency)cstates_latencyrJlistdircpuidle_states_pathrrkrrl)rdZ cstate_pathrcrrrr_read_cstates_latencys  z&CPULatencyPlugin._read_cstates_latencyFcCshtjd||jdkr*tjd|j|jj|d}|rR|dkrRtjddStjdt||S)Nz)getting latency for cstate with name '%s'zreading cstates latency tablerz"skipping latency 0 as set by paramz!cstate name mapped to latency: %s)r<rSrrr;rO)rrcno_zerorrrr_get_latency_by_cstate_names    z,CPULatencyPlugin._get_latency_by_cstate_namecCstjdt||j|}|dkr2tjddStdd|}|j|jj|ddd}|rt|dkrttjddStjd t||S) Nz'getting latency for cstate with ID '%s'zcstate ID is invalidz /%s/latencyzstate%dT)rrrz"skipping latency 0 as set by paramzcstate ID mapped to latency: %s)r<rSrOrrrrk)rZlidrZ latency_pathrrrr_get_latency_by_cstate_ids    z*CPULatencyPlugin._get_latency_by_cstate_idc Cs`d|_t|jd}tjd||fx.|D]$}yt|}tjd|Wntk rH|dddkr|j|dddd}n|dd d kr|j|d d}n|dd d kr|j|d ddd}nn|dd dkr|j|d d}nJ|dkrtjddS|r.|dkr.tjdntjdt|d}YnX|dk r.Pq.W|dfS)N|z#parsing latency '%s', allow_na '%s'z+parsed directly specified latency value: %drzcstate.id_no_zero:T)r z cstate.id:zcstate.name_no_zero: z cstate.name:noneNonezlatency 'none' specifiedzn/azlatency 'n/a' specifiedzinvalid latency specified: '%s'F)rr)NT) rrOsplitr<rSr}r~rr)rrallow_naZ latenciesrrr_parse_latencys6    zCPULatencyPlugin._parse_latencycCsp|j|\}}| rl|jrl|dkr4tjdd|_n8|j|krltjd|tjd|}tj |j |||_dS)Nztunable to evaluate latency value (probably wrong settings in the 'cpu' section of current profile), disabling PM QoSFzsetting new cpu latency %di) rr r<r^r_r=structpackrJwriter\)rrskipZ latency_binrrrrws    zCPULatencyPlugin._set_latencycCs|jjd|jjS)Nz>/sys/devices/system/cpu/%s/cpufreq/scaling_available_governors)rrkrlr)rr"rrr_get_available_governorssz)CPULatencyPlugin._get_available_governorsr-T) per_devicecCs|j|sdSt|}|jd}dd|D}x&|D]}t|dkr4tjddSq4W|j|}x~|D]^}||kr|stjd||f|jj d|||rt j gndd Pqf|sftj d ||fqfWtj d d j|d}|S) NrcSsg|] }|jqSr)rl)r$r-rrrr&sz2CPULatencyPlugin._set_governor..rz.The 'governor' option contains an empty value.z!setting governor '%s' on cpu '%s'z3/sys/devices/system/cpu/%s/cpufreq/scaling_governorF)rz7Ignoring governor '%s' on cpu '%s', it is not supportedz.None of the scaling governors is supported: %sz, )rTrOrlenr<r^rr=rrorErFrSwarnjoin)rZ governorsr"simremover-Zavailable_governorsrrr _set_governors2        zCPULatencyPlugin._set_governorcCsTd}|j|sdS|jjd||dj}t|dkr:|}|dkrPtjd||S)Nz3/sys/devices/system/cpu/%s/cpufreq/scaling_governor)rrz*could not get current governor on cpu '%s')rTrrkrlrr<r^)rr"ignore_missingr-datarrr _get_governors  zCPULatencyPlugin._get_governorondemandcCsd|S)Nz7/sys/devices/system/cpu/cpufreq/%s/sampling_down_factorr)rr-rrr_sampling_down_factor_path%sz+CPULatencyPlugin._sampling_down_factor_pathr.r)rZprioritycCsd}||jkr|jjd|j|<|j|}|dkrFtjd|dS|t|jjkr||j|<|j|}tj j |stjd||fdSt |}|stj d||f|j j|||rtjgndd|S)NzIignoring sampling_down_factor setting for CPU '%s', cannot match governorzTignoring sampling_down_factor setting for CPU '%s', governor '%s' doesn't support itz6setting sampling_down_factor to '%s' for governor '%s'F)r)rclearrr<rSrVrWrrJrKrLrOr=rrorErF)rr.r"rrrpr-rKrrr_set_sampling_down_factor(s&       z*CPULatencyPlugin._set_sampling_down_factorcCsD|j||d}|dkrdS|j|}tjj|s4dS|jj|jS)N)r)rrrJrKrLrrkrl)rr"rr-rKrrr_get_sampling_down_factorCs  z*CPULatencyPlugin._get_sampling_down_factorcCs*|jjdd|t|gdd\}}}||fS)NrBz-cT)Z return_err)rrDrO)rcpu_idrrrHrIerr_msgrrr_try_set_energy_perf_biasMs z*CPULatencyPlugin._try_set_energy_perf_biascCsd||r dndfS)Nz>/sys/devices/system/cpu/cpufreq/policy%s/energy_performance_%sZavailable_preferencesZ preferencer)rrZ availablerrr_pstate_preference_pathVsz(CPULatencyPlugin._pstate_preference_pathcCsd|S)Nz4/sys/devices/system/cpu/cpu%s/power/energy_perf_biasr)rrrrr_energy_perf_bias_pathYsz'CPULatencyPlugin._energy_perf_bias_pathr/c Cs||j|stjd|dS|jd}|jd}tj|jkr|j|}t j j |r|sxT|D]>}|j }|j j|||rtjgnddr^tjd||fPq^Wtjd|t|Stjd|dSn|jrt|slx|D]|}|j }tjd ||f|j||\} } | d kr,tjd||fPq| d krHtjd | Pqtjd ||fqWtjd|t|SdSdS) Nz%s is not online, skippingrrF)rz5energy_perf_bias successfully set to '%s' on cpu '%s'zPFailed to set energy_perf_bias on cpu '%s'. Is the value in the profile correct?zXFailed to set energy_perf_bias on cpu '%s' because energy_perf_bias file does not exist.z2Trying to set energy_perf_bias to '%s' on cpu '%s'rz"Failed to set energy_perf_bias: %szHCould not set energy_perf_bias to '%s' on cpu '%s', trying another value)rQr<rSlstriprrZCFG_CPU_EPP_FLAGrNrrJrKrLrlrrorErFr=r^rOrr) rr/r"rrrvalsenergy_perf_bias_pathrprHrrrr_set_energy_perf_bias\sX              z&CPULatencyPlugin._set_energy_perf_biascCsjy t|}WnXtk rd}z|j| rBdS|dksZ|dkrp|dkrptjd||fdS|s|jj|j|||rt j gndd|S) Nz%s is not online, skippingT)rzn/arzr?r@rNrQrRrTrgrjrnrqrtrurZZ ROLLBACK_SOFTrxrzryr|rrrrrrwrZ command_setrZ command_getrrrrrrrrrrrrrrrrrr __classcell__rr)rrrsn,            8   r)rCrZ decoratorsZ tuned.logsZtunedZtuned.utils.commandsrZ tuned.constsrZrJrErr6r8Zlogsr;r<rZPluginrrrrrs    PK$2]5;+plugins/__pycache__/__init__.cpython-36.pycnu[3 sPK$2]X  7plugins/__pycache__/plugin_selinux.cpython-36.opt-1.pycnu[3 s    PK$2]7PTT'plugins/__pycache__/base.cpython-36.pycnu[3 d?Z&ejfd@dAZ'dBdCZ(dDdEZ)dFdGZ*dHdIZ+dJdKZ,dLdMZ-d|dOdPZ.d}dQdRZ/d~dSdTZ0ddUdVZ1dWdXZ2dYdZZ3d[d\Z4d]d^Z5d_d`Z6ddbdcZ7ddddeZ8dfdgZ9dhdiZ:djdkZ;ddldmZdrdsZ?dtduZ@ddvdwZAddxdyZBdzd{ZCdNS)Plugina Base class for all plugins. Plugins change various system settings in order to get desired performance or power saving. Plugins use Monitor objects to get information from the running system. Intentionally a lot of logic is included in the plugin to increase plugin flexibility. c Csn|j|jj|_||_||_||_||_||_t j |_ |j ||_ ||_d|_d|_|j|_t|_dS)zPlugin constructor.FN)create __class____name___storageZ_monitors_repositoryZ_hardware_inventory_device_matcher_device_matcher_udev_instance_factory collections OrderedDict _instances_init_commands _global_cfg _variables_has_dynamic_options_devices_inited#_get_config_options_used_by_dynamic_options_used_by_dynamicr_cmd) selfZmonitors_repositoryZstorage_factoryZhardware_inventoryZdevice_matcherZdevice_matcher_udevZinstance_factoryZ global_cfg variablesr/usr/lib/python3.6/base.py__init__s  zPlugin.__init__cCs |jdS)N)destroy_instances)rrrrcleanup,szPlugin.cleanupcCs|js|jd|_dS)NT)r _init_devices)rrrr init_devices/szPlugin.init_devicescCs|jjjddjdddS)N._)r __module__split)rrrrname4sz Plugin.namecCsiS)z-Default configuration options for the plugin.r)rrrr_get_config_options<szPlugin._get_config_optionscCsiS)z*Explanation of each config option functionr)clsrrrget_config_options_hintsAszPlugin.get_config_options_hintscCsgS)znList of config options used by dynamic tuning. Their previous values will be automatically saved and restored.r)rrrrrFsz*Plugin._get_config_options_used_by_dynamiccCsP|jj}x>|D]6}||ks$|jr2||||<qtjd||jjfqW|S)z3Merge provided options with plugin default options.z$Unknown option '%s' for plugin '%s'.)r(copyrlogwarnrr)roptionsZ effectivekeyrrr_get_effective_optionsKs   zPlugin._get_effective_optionscCs,t|tkr|St|j}|dkp*|dkS)Ntrue1)typeboolstrlower)rvaluerrr _option_boolVs  zPlugin._option_boolc CsF||jkrtd||j|}|jj|||||||}||j|<|S)z8Create new instance of the plugin and seize the devices.z.Plugin instance with name '%s' already exists.)r Exceptionr0r r) rr'devices_expressiondevices_udev_regex script_pre script_postr.Zeffective_optionsinstancerrrcreate_instance`s     zPlugin.create_instancecCsV|j|krtd||f|j|jkr2td||j|j}|j||j|j=dS)zDestroy existing instance.z9Plugin instance '%s' does not belong to this plugin '%s'.z+Plugin instance '%s' was already destroyed.N)Z_pluginr9r'r_destroy_instance)rr>rrrdestroy_instancels     zPlugin.destroy_instancecCs$tjd|j|jf|j|dS)zInitialize an instance.zinitializing instance %s (%s)N)r,debugr'_instance_init)rr>rrrinitialize_instancewszPlugin.initialize_instancecCsFx6t|jjD]$}tjd|j|jf|j|qW|jjdS)zDestroy all instances.zdestroying instance %s (%s)N)listrvaluesr,rBr'r@clear)rr>rrrr|szPlugin.destroy_instancescCs|j||j|dS)N)release_devices_instance_cleanup)rr>rrrr@s zPlugin._destroy_instancecCs tdS)N)NotImplementedError)rr>rrrrCszPlugin._instance_initcCs tdS)N)rJ)rr>rrrrIszPlugin._instance_cleanupcCsd|_t|_t|_dS)NF)_devices_supportedset_assigned_devices _free_devices)rrrrrszPlugin._init_devicescCsdS)zOverride this in a subclass to transform a list of device names (e.g. ['sda']) to a list of pyudev.Device objects, if your plugin supports itNr)rdevicesrrr_get_device_objectsszPlugin._get_device_objectscCsj|jdkrt|jj|j|S|j|}|dkrDtjd|jtS|j j|j|}tdd|DSdS)Nzsz0Plugin._get_matching_devices..) r;rLr Z match_listr:rPr,errorr'r )rr>rOZ udev_devicesrrr_get_matching_devicess  zPlugin._get_matching_devicescCs|js dStjd|j|j||j}t|dk|_|jsNtjd|jn`|j}|j|jkrn|d|j7}tj d|dj |f|j j ||j |O_ |j|8_dS)Nz assigning devices to instance %srz*instance %s: no matching devices availablez (%s)z!instance %s: assigning devices %sz, )rKr,rBr'rUrNlenactiver-infojoinassigned_devicesupdaterM)rr>Z to_assignr'rrrassign_free_devicess  zPlugin.assign_free_devicescCsV|js dS|j|jB|j@}d|_|jj|jj|j|8_|j|O_dS)NF)rKprocessed_devicesrZrMrWrGrN)rr>Z to_releaserrrrHs  zPlugin.release_devicescCs(|js dg}x|D]}|||qWdS)N)rK)rr>callbackrOdevicerrr_run_for_each_devices zPlugin._run_for_each_devicecCsdS)Nr)rr>enablingrrr_instance_pre_staticszPlugin._instance_pre_staticcCsdS)Nr)rr>rarrr_instance_post_staticszPlugin._instance_post_staticcCsn|dkr dSt|dkr0tjd|j|fdS|jdsHtjddStjj|}d}x|D]}tj } | j |j j |g} |t jkr| jd| j|tjd |t| ftjd tt| jyVt|g| ttd| |dd } | j\} } | jr$tjd || j| ddfd}Wq`ttfk rd}ztjd||fd}WYdd}~Xq`Xq`W|S)Nrz1Instance '%s': no device to call script '%s' for./zZscriptoprOrollbackZdir_nameretZdevrmZ argumentsprocouterrerrr_call_device_scriptsB         zPlugin._call_device_scriptcCs|js dS|jrZ|j||jd|j|j|d|j||j|d|j||jd|j|j r|j j t j t jr|j||j|j|jj|j|jjdS)zG Apply static and dynamic tuning if the plugin instance is active. NZapplyT)rWhas_static_tuningr{r<rZrb_instance_apply_staticrcr=has_dynamic_tuningrgetrnCFG_DYNAMIC_TUNINGCFG_DEF_DYNAMIC_TUNINGr`_instance_apply_dynamicr]r[rG)rr>rrrinstance_apply_tunings       zPlugin.instance_apply_tuningcCs|js dSt|jdkr.tjddj|j|jj}|jr|j ||j d|dkrXdS|j |||dkrndS|j ||j d|dkrdSdSdSdS)z< Verify static tuning if the plugin instance is active. Nrz)BUG: Some devices have not been tuned: %sz, ZverifyFT) rWrVrZr,rTrYr]r+r|r{r<_instance_verify_staticr=)rr>ignore_missingrOrrrinstance_verify_tunings zPlugin.instance_verify_tuningcCs<|js dS|jr8|jjtjtjr8|j||j|j j dS)z< Apply dynamic tuning if the plugin instance is active. N) rWr~rrrnrrr`_instance_update_dynamicr]r+)rr>rrrinstance_update_tuning$szPlugin.instance_update_tuningcCs|tjkrdS|jr8|jjtjtjr8|j||j|j |j r|j ||j d|j |d|j |d|j|||j|d|j ||jd|j |ddS)z8 Remove all tunings applied by the plugin instance. NZunapply)ruF)rnZ ROLLBACK_NONEr~rrrrr`_instance_unapply_dynamicr]r|r{r=rb_instance_unapply_staticrcr<)rr>rurrrinstance_unapply_tuning-s     zPlugin.instance_unapply_tuningcCs|j||j||jdS)N) _execute_all_non_device_commands_execute_all_device_commandsrZ)rr>rrrr}?s zPlugin._instance_apply_staticcCs2d}|j||dkrd}|j|||dkr.d}|S)NTF)_verify_all_non_device_commands_verify_all_device_commands)rr>rrOrvrrrrCs zPlugin._instance_verify_staticcCs|j||j|j|dS)N)_cleanup_all_device_commandsr] _cleanup_all_non_device_commands)rr>rurrrrKszPlugin._instance_unapply_staticcsFx4fddjDD]}jj|qWjdS)Ncs(g|] }jj|dkr|qS)N) _storage_get _commands)rQopt)r_r>rrrrSQsz2Plugin._instance_apply_dynamic..)r_check_and_save_valuerr)rr>r_Zoptionr)r_r>rrrPszPlugin._instance_apply_dynamiccCs tdS)N)rJ)rr>r_rrrrVsz Plugin._instance_unapply_dynamiccCs tdS)N)rJ)rr>r_rrrrYszPlugin._instance_update_dynamiccCstj|_|j|jdS)z Initialize commands. N)r rr_autoregister_commands_check_commands)rrrrr`s zPlugin._init_commandscCsx|jjD]}|jdrq t||}t|ds0q |jd}|jj|d|i}d|jkrd|d<||d<|jd|d<|jd|d<nBd |jkr||d <n.d|jkr||d<|jd|d<|jd|d<||j|<q Wtj t t |jj d d d |_dS) zd Register all commands marked using @command_set, @command_get, and @command_custom decorators. ___commandr'rLNcustom per_devicepriorityrcSs |ddS)Nr"rr)Z name_inforrrsz/Plugin._autoregister_commands..)r/) r__dict__rigetattrhasattrrrrr rsortediterrp)r member_namemember command_namerXrrrrhs*        zPlugin._autoregister_commandscCsJxDt|jjD]2\}}|jddr&qd|ks6d|krtd|qWdS)z2 Check if all commands are defined correctly. rFrrLz,Plugin command '%s' is not defined correctlyN)rErrpr TypeError)rrcommandrrrrs  zPlugin._check_commandsNcCsJt|j}|dkrdn|}|dkr&dn|}|dkr6dn|}d||||fS)Nz %s/%s/%s/%s)r3r)rZ instance_namer device_name class_namerrr _storage_keys  zPlugin._storage_keycCs&|j|j|d|}|jj||dS)Nr')rr'r rL)rr>rr7rr/rrr _storage_setszPlugin._storage_setcCs |j|j|d|}|jj|S)Nr')rr'r r)rr>rrr/rrrrszPlugin._storage_getcCs |j|j|d|}|jj|S)Nr')rr'r Zunset)rr>rrr/rrr_storage_unsetszPlugin._storage_unsetcCsVxPddt|jjDD]4}|jj|jj|dd}|dk r|j|||qWdS)NcSsg|]}|ds|qS)rr)rQrrrrrSsz;Plugin._execute_all_non_device_commands..r')rErrFrexpandr.r_execute_non_device_command)rr>r new_valuerrrrsz'Plugin._execute_all_non_device_commandscCshxbddt|jjDD]F}|jj|jj|dd}|dkrBqx|D]}|j||||qHWqWdS)NcSsg|]}|dr|qS)rr)rQrrrrrSsz7Plugin._execute_all_device_commands..r')rErrFrrr.r_execute_device_command)rr>rOrrr_rrrrs  z#Plugin._execute_all_device_commandscCsdd}xZddt|jjDD]>}|jj|jj|dd}|dk r|j||||dkrd}qW|S)NTcSsg|]}|ds|qS)rr)rQrrrrrSsz:Plugin._verify_all_non_device_commands..r'F)rErrFrrr.r_verify_non_device_command)rr>rrvrrrrrrsz&Plugin._verify_all_non_device_commandscCsnd}xdddt|jjDD]H}|jj|dd}|dkr>qx&|D]}|j|||||dkrDd}qDWqW|S)NTcSsg|]}|dr|qS)rr)rQrrrrrSsz6Plugin._verify_all_device_commands..r'F)rErrFr.r_verify_device_command)rr>rOrrvrrr_rrrrs  z"Plugin._verify_all_device_commandsc Cs|dk rt|}t|dkr |S|dd}|dd}|dkrP|dkrL|S|SyF|dkrtt|t|krn|SdSn |dkrt|t|kr|SdSWn*tk rtjd||||fYnX|S)Nr"<>zhcannot compare new value '%s' with current value '%s' by operator '%s', using '%s' directly as new value)rr)r5rVint ValueErrorr,r-)rr current_valueZnwsrtvalrrr_process_assignment_modifierss(   z$Plugin._process_assignment_modifiersFcCs&|dk r|d||dS|dSdS)Nr)rr)rrr_rrrr_get_current_valueszPlugin._get_current_valuecCs<|j||}|j||}|dk r8|dk r8|j|||||S)N)rrr)rr>rr_rrrrrrs   zPlugin._check_and_save_valuecCsR|ddk r"|dd||ddn,|j||||}|dk rN|d||ddddS)NrTFrL)simremove)r)rr>rr_rrrrrs  zPlugin._execute_device_commandcCsN|ddk r |dd|ddn*|j||d|}|dk rJ|d|ddddS)NrTFrL)rr)r)rr>rrrrrrs  z"Plugin._execute_non_device_commandcCs.|jjt|}tjd|r*tjdd|S|S)Nz\s*(0+,?)+([\da-fA-F]*,?)*\s*$z ^\s*(0+,?)+r)rZunquoter5rematchsub)rr7vrrr _norm_values zPlugin._norm_valuec Cs(|dkr dSd}|dkrN|rN|dkr6tjtj|ntjtj||fdS|dk r|j|}|j|}yt|t|k}Wntk ryt|dt|dk}Wn^tk rt|t|k}|st|j d}x"|D]}|j }||k}|rPqWYnXYnX|j |||||d|S)NFT|)r_) r,rXrnZ STR_VERIFY_PROFILE_VALUE_MISSINGZ'STR_VERIFY_PROFILE_DEVICE_VALUE_MISSINGrrrr5r&strip_log_verification_result) rr'rrrr_rvvalsrrrr _verify_value s8       zPlugin._verify_valuecCs|rL|dkr*tjtj|t|jfntjtj||t|jfdS|dkr|tjtj|t|jt|jfn(tjtj ||t|jt|jfdSdS)NTF) r,rXrnZSTR_VERIFY_PROFILE_VALUE_OKr5rZ"STR_VERIFY_PROFILE_DEVICE_VALUE_OKrTZSTR_VERIFY_PROFILE_VALUE_FAILZ$STR_VERIFY_PROFILE_DEVICE_VALUE_FAIL)rr'successrrr_rrrr-s((zPlugin._log_verification_resultcCsp|ddk r |dd||d|S|j|||d}|j||}|dkrHdS|d||dd}|j|d||||S)NrT)rrLFr')rrr)rr>rr_rrrrrrr<s  zPlugin._verify_device_commandcCsd|ddk r|dd|d|S|j|}|j||}|dkr@dS|d|dd}|j|d|||S)NrTrLFr')rrr)rr>rrrrrrrrFs   z!Plugin._verify_non_device_commandcCsZxTtddt|jjDD]4}|jj|dddk sF|d|jkr|j||qWdS)NcSsg|]}|ds|qS)rr)rQrrrrrSQsz;Plugin._cleanup_all_non_device_commands..r')reversedrErrFr.rr_cleanup_non_device_command)rr>rrrrrPs"$z'Plugin._cleanup_all_non_device_commandscCslxftddt|jjDD]F}|jj|dddk sF|d|jkrx|D]}|j||||qLWqWdS)NcSsg|]}|dr|qS)rr)rQrrrrrSVsz7Plugin._cleanup_all_device_commands..r')rrErrFr.rr_cleanup_device_command)rr>rOrrr_rrrrUs"$ z#Plugin._cleanup_all_device_commandscCs^|ddk r"|ddd|ddn8|j|||}|dk rL|d||d|d|j|||dS)NrFrL)rr)rr)rr>rr_r old_valuerrrr[s  zPlugin._cleanup_device_commandcCsV|ddk r |dddddn2|j||}|dk rF|d|ddd|j||dS)NrFrL)rr)rr)rr>rrrrrrds   z"Plugin._cleanup_non_device_command)NNN)N)N)N)NF)NN)N)N)F)F)Drr% __qualname____doc__rrr propertyr' classmethodr(r*rr0r8r?rArDrr@rCrIrrPrUr\rHr`rbrcrnZ ROLLBACK_SOFTr{rrrrr}rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr s|         #          !     r)rZ tuned.constsrnZtuned.profiles.variablesZtunedZ tuned.logsr Ztuned.utils.commandsrrj subprocessrrZlogsrr,objectrrrrrs   PK$2]|plugins/plugin_scheduler.pynu[# code for cores isolation was inspired by Tuna implementation # perf code was borrowed from kernel/tools/perf/python/twatch.py # thanks to Arnaldo Carvalho de Melo from . import base from .decorators import * import tuned.logs import re from subprocess import * import threading import perf import select import tuned.consts as consts import procfs from tuned.utils.commands import commands import errno import os import collections import math # Check existence of scheduler API in os module try: os.SCHED_FIFO except AttributeError: import schedutils log = tuned.logs.get() class SchedulerParams(object): def __init__(self, cmd, cmdline = None, scheduler = None, priority = None, affinity = None, cgroup = None): self._cmd = cmd self.cmdline = cmdline self.scheduler = scheduler self.priority = priority self.affinity = affinity self.cgroup = cgroup @property def affinity(self): if self._affinity is None: return None else: return self._cmd.bitmask2cpulist(self._affinity) @affinity.setter def affinity(self, value): if value is None: self._affinity = None else: self._affinity = self._cmd.cpulist2bitmask(value) class IRQAffinities(object): def __init__(self): self.irqs = {} self.default = None # IRQs that don't support changing CPU affinity: self.unchangeable = [] class SchedulerUtils(object): """ Class encapsulating scheduler implementation in os module """ _dict_schedcfg2schedconst = { "f": "SCHED_FIFO", "b": "SCHED_BATCH", "r": "SCHED_RR", "o": "SCHED_OTHER", "i": "SCHED_IDLE", } def __init__(self): # {"f": os.SCHED_FIFO...} self._dict_schedcfg2num = dict((k, getattr(os, name)) for k, name in self._dict_schedcfg2schedconst.items()) # { os.SCHED_FIFO: "SCHED_FIFO"... } self._dict_num2schedconst = dict((getattr(os, name), name) for name in self._dict_schedcfg2schedconst.values()) def sched_cfg_to_num(self, str_scheduler): return self._dict_schedcfg2num.get(str_scheduler) # Reimplementation of schedstr from schedutils for logging purposes def sched_num_to_const(self, scheduler): return self._dict_num2schedconst.get(scheduler) def get_scheduler(self, pid): return os.sched_getscheduler(pid) def set_scheduler(self, pid, sched, prio): os.sched_setscheduler(pid, sched, os.sched_param(prio)) def get_affinity(self, pid): return os.sched_getaffinity(pid) def set_affinity(self, pid, affinity): os.sched_setaffinity(pid, affinity) def get_priority(self, pid): return os.sched_getparam(pid).sched_priority def get_priority_min(self, sched): return os.sched_get_priority_min(sched) def get_priority_max(self, sched): return os.sched_get_priority_max(sched) class SchedulerUtilsSchedutils(SchedulerUtils): """ Class encapsulating scheduler implementation in schedutils module """ def __init__(self): # { "f": schedutils.SCHED_FIFO... } self._dict_schedcfg2num = dict((k, getattr(schedutils, name)) for k, name in self._dict_schedcfg2schedconst.items()) # { schedutils.SCHED_FIFO: "SCHED_FIFO"... } self._dict_num2schedconst = dict((getattr(schedutils, name), name) for name in self._dict_schedcfg2schedconst.values()) def get_scheduler(self, pid): return schedutils.get_scheduler(pid) def set_scheduler(self, pid, sched, prio): schedutils.set_scheduler(pid, sched, prio) def get_affinity(self, pid): return schedutils.get_affinity(pid) def set_affinity(self, pid, affinity): schedutils.set_affinity(pid, affinity) def get_priority(self, pid): return schedutils.get_priority(pid) def get_priority_min(self, sched): return schedutils.get_priority_min(sched) def get_priority_max(self, sched): return schedutils.get_priority_max(sched) class SchedulerPlugin(base.Plugin): r""" `scheduler`:: Allows tuning of scheduling priorities, process/thread/IRQ affinities, and CPU isolation. + To prevent processes/threads/IRQs from using certain CPUs, use the [option]`isolated_cores` option. It changes process/thread affinities, IRQs affinities and it sets `default_smp_affinity` for IRQs. The CPU affinity mask is adjusted for all processes and threads matching [option]`ps_whitelist` option subject to success of the `sched_setaffinity()` system call. The default setting of the [option]`ps_whitelist` regular expression is `.*` to match all processes and thread names. To exclude certain processes and threads use [option]`ps_blacklist` option. The value of this option is also interpreted as a regular expression and process/thread names (`ps -eo cmd`) are matched against that expression. Profile rollback allows all matching processes and threads to run on all CPUs and restores the IRQ settings prior to the profile application. + Multiple regular expressions for [option]`ps_whitelist` and [option]`ps_blacklist` options are allowed and separated by `;`. Quoted semicolon `\;` is taken literally. + .Isolate CPUs 2-4 ==== ---- [scheduler] isolated_cores=2-4 ps_blacklist=.*pmd.*;.*PMD.*;^DPDK;.*qemu-kvm.* ---- Isolate CPUs 2-4 while ignoring processes and threads matching `ps_blacklist` regular expressions. ==== The [option]`irq_process` option controls whether the scheduler plugin applies the `isolated_cores` parameter to IRQ affinities. The default value is `true`, which means that the scheduler plugin will move all possible IRQs away from the isolated cores. When `irq_process` is set to `false`, the plugin will not change any IRQ affinities. ==== The [option]`default_irq_smp_affinity` option controls the values *TuneD* writes to `/proc/irq/default_smp_affinity`. The file specifies default affinity mask that applies to all non-active IRQs. Once an IRQ is allocated/activated its affinity bitmask will be set to the default mask. + The following values are supported: + -- `calc`:: Content of `/proc/irq/default_smp_affinity` will be calculated from the `isolated_cores` parameter. Non-isolated cores are calculated as an inversion of the `isolated_cores`. Then the intersection of the non-isolated cores and the previous content of `/proc/irq/default_smp_affinity` is written to `/proc/irq/default_smp_affinity`. If the intersection is an empty set, then just the non-isolated cores are written to `/proc/irq/default_smp_affinity`. This behavior is the default if the parameter `default_irq_smp_affinity` is omitted. `ignore`:: *TuneD* will not touch `/proc/irq/default_smp_affinity`. explicit cpulist:: The cpulist (such as 1,3-4) is unpacked and written directly to `/proc/irq/default_smp_affinity`. -- + .An explicit CPU list to set the default IRQ smp affinity to CPUs 0 and 2 ==== ---- [scheduler] isolated_cores=1,3 default_irq_smp_affinity=0,2 ---- ==== To adjust scheduling policy, priority and affinity for a group of processes/threads, use the following syntax. + [subs="+quotes,+macros"] ---- group.__groupname__=__rule_prio__:__sched__:__prio__:__affinity__:__regex__ ---- + where `__rule_prio__` defines internal *TuneD* priority of the rule. Rules are sorted based on priority. This is needed for inheritence to be able to reorder previously defined rules. Equal `__rule_prio__` rules should be processed in the order they were defined. However, this is Python interpreter dependant. To disable an inherited rule for `__groupname__` use: + [subs="+quotes,+macros"] ---- group.__groupname__= ---- + `__sched__` must be one of: *`f`* for FIFO, *`b`* for batch, *`r`* for round robin, *`o`* for other, *`*`* do not change. + `__affinity__` is CPU affinity in hexadecimal. Use `*` for no change. + `__prio__` scheduling priority (see `chrt -m`). + `__regex__` is Python regular expression. It is matched against the output of + [subs="+quotes,+macros"] ---- ps -eo cmd ---- + Any given process name may match more than one group. In such a case, the priority and scheduling policy are taken from the last matching `__regex__`. + .Setting scheduling policy and priorities to kernel threads and watchdog ==== ---- [scheduler] group.kthreads=0:*:1:*:\[.*\]$ group.watchdog=0:f:99:*:\[watchdog.*\] ---- ==== + The scheduler plug-in uses perf event loop to catch newly created processes. By default it listens to `perf.RECORD_COMM` and `perf.RECORD_EXIT` events. By setting [option]`perf_process_fork` option to `true`, `perf.RECORD_FORK` events will be also listened to. In other words, child processes created by the `fork()` system call will be processed. Since child processes inherit CPU affinity from their parents, the scheduler plug-in usually does not need to explicitly process these events. As processing perf events can pose a significant CPU overhead, the [option]`perf_process_fork` option parameter is set to `false` by default. Due to this, child processes are not processed by the scheduler plug-in. + The CPU overhead of the scheduler plugin can be mitigated by using the scheduler [option]`runtime` option and setting it to `0`. This will completely disable the dynamic scheduler functionality and the perf events will not be monitored and acted upon. The disadvantage ot this approach is the procees/thread tuning will be done only at profile application. + .Disabling the scheduler dynamic functionality ==== ---- [scheduler] runtime=0 isolated_cores=1,3 ---- ==== + NOTE: For perf events, memory mapped buffer is used. Under heavy load the buffer may overflow. In such cases the `scheduler` plug-in may start missing events and failing to process some newly created processes. Increasing the buffer size may help. The buffer size can be set with the [option]`perf_mmap_pages` option. The value of this parameter has to expressed in powers of 2. If it is not the power of 2, the nearest higher power of 2 value is calculated from it and this calculated value used. If the [option]`perf_mmap_pages` option is omitted, the default kernel value is used. + The scheduler plug-in supports process/thread confinement using cgroups v1. + [option]`cgroup_mount_point` option specifies the path to mount the cgroup filesystem or where *TuneD* expects it to be mounted. If unset, `/sys/fs/cgroup/cpuset` is expected. + If [option]`cgroup_groups_init` option is set to `1` *TuneD* will create (and remove) all cgroups defined with the `cgroup*` options. This is the default behavior. If it is set to `0` the cgroups need to be preset by other means. + If [option]`cgroup_mount_point_init` option is set to `1`, *TuneD* will create (and remove) the cgroup mountpoint. It implies `cgroup_groups_init = 1`. If set to `0` the cgroups mount point needs to be preset by other means. This is the default behavior. + The [option]`cgroup_for_isolated_cores` option is the cgroup name used for the [option]`isolated_cores` option functionality. For example, if a system has 4 CPUs, `isolated_cores=1` means that all processes/threads will be moved to CPUs 0,2-3. The scheduler plug-in will isolate the specified core by writing the calculated CPU affinity to the `cpuset.cpus` control file of the specified cgroup and move all the matching processes/threads to this group. If this option is unset, classic cpuset affinity using `sched_setaffinity()` will be used. + [option]`cgroup.__cgroup_name__` option defines affinities for arbitrary cgroups. Even hierarchic cgroups can be used, but the hieararchy needs to be specified in the correct order. Also *TuneD* does not do any sanity checks here, with the exception that it forces the cgroup to be under [option]`cgroup_mount_point`. + The syntax of the scheduler option starting with `group.` has been augmented to use `cgroup.__cgroup_name__` instead of the hexadecimal `__affinity__`. The matching processes will be moved to the cgroup `__cgroup_name__`. It is also possible to use cgroups which have not been defined by the [option]`cgroup.` option as described above, i.e. cgroups not managed by *TuneD*. + All cgroup names are sanitized by replacing all all dots (`.`) with slashes (`/`). This is to prevent the plug-in from writing outside [option]`cgroup_mount_point`. + .Using cgroups v1 with the scheduler plug-in ==== ---- [scheduler] cgroup_mount_point=/sys/fs/cgroup/cpuset cgroup_mount_point_init=1 cgroup_groups_init=1 cgroup_for_isolated_cores=group cgroup.group1=2 cgroup.group2=0,2 group.ksoftirqd=0:f:2:cgroup.group1:ksoftirqd.* ps_blacklist=ksoftirqd.*;rcuc.*;rcub.*;ktimersoftd.* isolated_cores=1 ---- Cgroup `group1` has the affinity set to CPU 2 and the cgroup `group2` to CPUs 0,2. Given a 4 CPU setup, the [option]`isolated_cores=1` option causes all processes/threads to be moved to CPU cores 0,2-3. Processes/threads that are blacklisted by the [option]`ps_blacklist` regular expression will not be moved. The scheduler plug-in will isolate the specified core by writing the CPU affinity 0,2-3 to the `cpuset.cpus` control file of the `group` and move all the matching processes/threads to this cgroup. ==== Option [option]`cgroup_ps_blacklist` allows excluding processes which belong to the blacklisted cgroups. The regular expression specified by this option is matched against cgroup hierarchies from `/proc/PID/cgroups`. Cgroups v1 hierarchies from `/proc/PID/cgroups` are separated by commas ',' prior to regular expression matching. The following is an example of content against which the regular expression is matched against: `10:hugetlb:/,9:perf_event:/,8:blkio:/` + Multiple regular expressions can be separated by semicolon ';'. The semicolon represents a logical 'or' operator. + .Cgroup-based exclusion of processes from the scheduler ==== ---- [scheduler] isolated_cores=1 cgroup_ps_blacklist=:/daemons\b ---- The scheduler plug-in will move all processes away from core 1 except processes which belong to cgroup '/daemons'. The '\b' is a regular expression metacharacter that matches a word boundary. ---- [scheduler] isolated_cores=1 cgroup_ps_blacklist=\b8:blkio: ---- The scheduler plug-in will exclude all processes which belong to a cgroup with hierarchy-ID 8 and controller-list blkio. ==== Recent kernels moved some `sched_` and `numa_balancing_` kernel run-time parameters from `/proc/sys/kernel`, managed by the `sysctl` utility, to `debugfs`, typically mounted under `/sys/kernel/debug`. TuneD provides an abstraction mechanism for the following parameters via the scheduler plug-in: [option]`sched_min_granularity_ns`, [option]`sched_latency_ns`, [option]`sched_wakeup_granularity_ns`, [option]`sched_tunable_scaling`, [option]`sched_migration_cost_ns`, [option]`sched_nr_migrate`, [option]`numa_balancing_scan_delay_ms`, [option]`numa_balancing_scan_period_min_ms`, [option]`numa_balancing_scan_period_max_ms` and [option]`numa_balancing_scan_size_mb`. Based on the kernel used, TuneD will write the specified value to the correct location. + .Set tasks' "cache hot" value for migration decisions. ==== ---- [scheduler] sched_migration_cost_ns=500000 ---- On the old kernels, this is equivalent to: ---- [sysctl] kernel.sched_migration_cost_ns=500000 ---- that is, value `500000` will be written to `/proc/sys/kernel/sched_migration_cost_ns`. However, on more recent kernels, the value `500000` will be written to `/sys/kernel/debug/sched/migration_cost_ns`. ==== """ def __init__(self, monitor_repository, storage_factory, hardware_inventory, device_matcher, device_matcher_udev, plugin_instance_factory, global_cfg, variables): super(SchedulerPlugin, self).__init__(monitor_repository, storage_factory, hardware_inventory, device_matcher, device_matcher_udev, plugin_instance_factory, global_cfg, variables) self._has_dynamic_options = True self._daemon = consts.CFG_DEF_DAEMON self._sleep_interval = int(consts.CFG_DEF_SLEEP_INTERVAL) if global_cfg is not None: self._daemon = global_cfg.get_bool(consts.CFG_DAEMON, consts.CFG_DEF_DAEMON) self._sleep_interval = int(global_cfg.get(consts.CFG_SLEEP_INTERVAL, consts.CFG_DEF_SLEEP_INTERVAL)) self._cmd = commands() # helper variable utilized for showing hint only once that the error may be caused by Secure Boot self._secure_boot_hint = None # paths cache for sched_ and numa_ tunings self._sched_knob_paths_cache = {} # default is to whitelist all and blacklist none self._ps_whitelist = ".*" self._ps_blacklist = "" self._cgroup_ps_blacklist_re = "" self._cpus = perf.cpu_map() self._scheduler_storage_key = self._storage_key( command_name = "scheduler") self._irq_process = True self._irq_storage_key = self._storage_key( command_name = "irq") self._evlist = None try: self._scheduler_utils = SchedulerUtils() except AttributeError: self._scheduler_utils = SchedulerUtilsSchedutils() def _calc_mmap_pages(self, mmap_pages): if mmap_pages is None: return None try: mp = int(mmap_pages) except ValueError: return 0 if mp <= 0: return 0 # round up to the nearest power of two value return int(2 ** math.ceil(math.log(mp, 2))) def _instance_init(self, instance): instance._evlist = None instance._has_dynamic_tuning = False instance._has_static_tuning = True # this is hack, runtime_tuning should be covered by dynamic_tuning configuration # TODO: add per plugin dynamic tuning configuration and use dynamic_tuning configuration # instead of runtime_tuning instance._runtime_tuning = True # FIXME: do we want to do this here? # recover original values in case of crash self._scheduler_original = self._storage.get( self._scheduler_storage_key, {}) if len(self._scheduler_original) > 0: log.info("recovering scheduling settings from previous run") self._restore_ps_affinity() self._scheduler_original = {} self._storage.unset(self._scheduler_storage_key) self._cgroups_original_affinity = dict() # calculated by isolated_cores setter self._affinity = None self._cgroup_affinity_initialized = False self._cgroup = None self._cgroups = collections.OrderedDict([(self._sanitize_cgroup_path(option[7:]), self._variables.expand(affinity)) for option, affinity in instance.options.items() if option[:7] == "cgroup." and len(option) > 7]) instance._scheduler = instance.options perf_mmap_pages_raw = self._variables.expand(instance.options["perf_mmap_pages"]) perf_mmap_pages = self._calc_mmap_pages(perf_mmap_pages_raw) if perf_mmap_pages == 0: log.error("Invalid 'perf_mmap_pages' value specified: '%s', using default kernel value" % perf_mmap_pages_raw) perf_mmap_pages = None if perf_mmap_pages is not None and str(perf_mmap_pages) != perf_mmap_pages_raw: log.info("'perf_mmap_pages' value has to be power of two, specified: '%s', using: '%d'" % (perf_mmap_pages_raw, perf_mmap_pages)) for k in instance._scheduler: instance._scheduler[k] = self._variables.expand(instance._scheduler[k]) if self._cmd.get_bool(instance._scheduler.get("runtime", 1)) == "0": instance._runtime_tuning = False instance._terminate = threading.Event() if self._daemon and instance._runtime_tuning: try: instance._threads = perf.thread_map() evsel = perf.evsel(type = perf.TYPE_SOFTWARE, config = perf.COUNT_SW_DUMMY, task = 1, comm = 1, mmap = 0, freq = 0, wakeup_events = 1, watermark = 1, sample_type = perf.SAMPLE_TID | perf.SAMPLE_CPU) evsel.open(cpus = self._cpus, threads = instance._threads) instance._evlist = perf.evlist(self._cpus, instance._threads) instance._evlist.add(evsel) if perf_mmap_pages is None: instance._evlist.mmap() else: instance._evlist.mmap(pages = perf_mmap_pages) # no perf except: instance._runtime_tuning = False def _instance_cleanup(self, instance): if instance._evlist: for fd in instance._evlist.get_pollfd(): os.close(fd.name) @classmethod def _get_config_options(cls): return { "isolated_cores": None, "cgroup_mount_point": consts.DEF_CGROUP_MOUNT_POINT, "cgroup_mount_point_init": False, "cgroup_groups_init": True, "cgroup_for_isolated_cores": None, "cgroup_ps_blacklist": None, "ps_whitelist": None, "ps_blacklist": None, "irq_process": True, "default_irq_smp_affinity": "calc", "perf_mmap_pages": None, "perf_process_fork": "false", "sched_min_granularity_ns": None, "sched_latency_ns": None, "sched_wakeup_granularity_ns": None, "sched_tunable_scaling": None, "sched_migration_cost_ns": None, "sched_nr_migrate": None, "numa_balancing_scan_delay_ms": None, "numa_balancing_scan_period_min_ms": None, "numa_balancing_scan_period_max_ms": None, "numa_balancing_scan_size_mb": None } def _sanitize_cgroup_path(self, value): return str(value).replace(".", "/") if value is not None else None # Raises OSError, IOError def _get_cmdline(self, process): if not isinstance(process, procfs.process): pid = process process = procfs.process(pid) cmdline = procfs.process_cmdline(process) if self._is_kthread(process): cmdline = "[" + cmdline + "]" return cmdline # Raises OSError, IOError def get_processes(self): ps = procfs.pidstats() ps.reload_threads() processes = {} for proc in ps.values(): try: cmd = self._get_cmdline(proc) pid = proc["pid"] processes[pid] = cmd if "threads" in proc: for pid in proc["threads"].keys(): cmd = self._get_cmdline(proc) processes[pid] = cmd except (OSError, IOError) as e: if e.errno == errno.ENOENT \ or e.errno == errno.ESRCH: continue else: raise return processes # Raises OSError # Raises SystemError with old (pre-0.4) python-schedutils # instead of OSError # If PID doesn't exist, errno == ESRCH def _get_rt(self, pid): scheduler = self._scheduler_utils.get_scheduler(pid) sched_str = self._scheduler_utils.sched_num_to_const(scheduler) priority = self._scheduler_utils.get_priority(pid) log.debug("Read scheduler policy '%s' and priority '%d' of PID '%d'" % (sched_str, priority, pid)) return (scheduler, priority) def _set_rt(self, pid, sched, prio): sched_str = self._scheduler_utils.sched_num_to_const(sched) log.debug("Setting scheduler policy to '%s' and priority to '%d' of PID '%d'." % (sched_str, prio, pid)) try: prio_min = self._scheduler_utils.get_priority_min(sched) prio_max = self._scheduler_utils.get_priority_max(sched) if prio < prio_min or prio > prio_max: log.error("Priority for %s must be in range %d - %d. '%d' was given." % (sched_str, prio_min, prio_max, prio)) # Workaround for old (pre-0.4) python-schedutils which raised # SystemError instead of OSError except (SystemError, OSError) as e: log.error("Failed to get allowed priority range: %s" % e) try: self._scheduler_utils.set_scheduler(pid, sched, prio) except (SystemError, OSError) as e: if hasattr(e, "errno") and e.errno == errno.ESRCH: log.debug("Failed to set scheduling parameters of PID %d, the task vanished." % pid) else: log.error("Failed to set scheduling parameters of PID %d: %s" % (pid, e)) # process is a procfs.process object # Raises OSError, IOError def _is_kthread(self, process): return process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0 # Return codes: # 0 - Affinity is fixed # 1 - Affinity is changeable # -1 - Task vanished # -2 - Error def _affinity_changeable(self, pid): try: process = procfs.process(pid) if process["stat"].is_bound_to_cpu(): if process["stat"]["state"] == "Z": log.debug("Affinity of zombie task with PID %d cannot be changed, the task's affinity mask is fixed." % pid) elif self._is_kthread(process): log.debug("Affinity of kernel thread with PID %d cannot be changed, the task's affinity mask is fixed." % pid) else: log.warn("Affinity of task with PID %d cannot be changed, the task's affinity mask is fixed." % pid) return 0 else: return 1 except (OSError, IOError) as e: if e.errno == errno.ENOENT or e.errno == errno.ESRCH: log.debug("Failed to get task info for PID %d, the task vanished." % pid) return -1 else: log.error("Failed to get task info for PID %d: %s" % (pid, e)) return -2 except (AttributeError, KeyError) as e: log.error("Failed to get task info for PID %d: %s" % (pid, e)) return -2 def _store_orig_process_rt(self, pid, scheduler, priority): try: params = self._scheduler_original[pid] except KeyError: params = SchedulerParams(self._cmd) self._scheduler_original[pid] = params if params.scheduler is None and params.priority is None: params.scheduler = scheduler params.priority = priority def _tune_process_rt(self, pid, sched, prio): cont = True if sched is None and prio is None: return cont try: (prev_sched, prev_prio) = self._get_rt(pid) if sched is None: sched = prev_sched self._set_rt(pid, sched, prio) self._store_orig_process_rt(pid, prev_sched, prev_prio) except (SystemError, OSError) as e: if hasattr(e, "errno") and e.errno == errno.ESRCH: log.debug("Failed to read scheduler policy of PID %d, the task vanished." % pid) if pid in self._scheduler_original: del self._scheduler_original[pid] cont = False else: log.error("Refusing to set scheduler and priority of PID %d, reading original scheduling parameters failed: %s" % (pid, e)) return cont def _is_cgroup_affinity(self, affinity): return str(affinity)[:7] == "cgroup." def _store_orig_process_affinity(self, pid, affinity, is_cgroup = False): try: params = self._scheduler_original[pid] except KeyError: params = SchedulerParams(self._cmd) self._scheduler_original[pid] = params if params.affinity is None and params.cgroup is None: if is_cgroup: params.cgroup = affinity else: params.affinity = affinity def _get_cgroup_affinity(self, pid): # we cannot use procfs, because it uses comma ',' delimiter which # can be ambiguous for l in self._cmd.read_file("%s/%s/%s" % (consts.PROCFS_MOUNT_POINT, str(pid), "cgroup"), no_error = True).split("\n"): try: cgroup = l.split(":cpuset:")[1][1:] return cgroup if cgroup != "" else "/" except IndexError: pass return "/" # it can be arbitrary cgroup even cgroup we didn't set, but it needs to be # under "cgroup_mount_point" def _set_cgroup(self, pid, cgroup): cgroup = self._sanitize_cgroup_path(cgroup) path = self._cgroup_mount_point if cgroup != "/": path = "%s/%s" % (path, cgroup) self._cmd.write_to_file("%s/tasks" % path, str(pid), no_error = True) def _parse_cgroup_affinity(self, cgroup): # "cgroup.CGROUP" cgroup = cgroup[7:] # this should be faster than string comparison is_cgroup = not isinstance(cgroup, list) and len(cgroup) > 0 return is_cgroup, cgroup def _tune_process_affinity(self, pid, affinity, intersect = False): cont = True if affinity is None: return cont try: (is_cgroup, cgroup) = self._parse_cgroup_affinity(affinity) if is_cgroup: prev_affinity = self._get_cgroup_affinity(pid) self._set_cgroup(pid, cgroup) else: prev_affinity = self._get_affinity(pid) if intersect: affinity = self._get_intersect_affinity( prev_affinity, affinity, affinity) self._set_affinity(pid, affinity) self._store_orig_process_affinity(pid, prev_affinity, is_cgroup) except (SystemError, OSError) as e: if hasattr(e, "errno") and e.errno == errno.ESRCH: log.debug("Failed to read affinity of PID %d, the task vanished." % pid) if pid in self._scheduler_original: del self._scheduler_original[pid] cont = False else: log.error("Refusing to set CPU affinity of PID %d, reading original affinity failed: %s" % (pid, e)) return cont #tune process and store previous values def _tune_process(self, pid, cmd, sched, prio, affinity): cont = self._tune_process_rt(pid, sched, prio) if not cont: return cont = self._tune_process_affinity(pid, affinity) if not cont or pid not in self._scheduler_original: return self._scheduler_original[pid].cmdline = cmd def _convert_sched_params(self, str_scheduler, str_priority): scheduler = self._scheduler_utils.sched_cfg_to_num(str_scheduler) if scheduler is None and str_scheduler != "*": log.error("Invalid scheduler: %s. Scheduler and priority will be ignored." % str_scheduler) return (None, None) else: try: priority = int(str_priority) except ValueError: log.error("Invalid priority: %s. Scheduler and priority will be ignored." % str_priority) return (None, None) return (scheduler, priority) def _convert_affinity(self, str_affinity): if str_affinity == "*": affinity = None elif self._is_cgroup_affinity(str_affinity): affinity = str_affinity else: affinity = self._cmd.hex2cpulist(str_affinity) if not affinity: log.error("Invalid affinity: %s. It will be ignored." % str_affinity) affinity = None return affinity def _convert_sched_cfg(self, vals): (rule_prio, scheduler, priority, affinity, regex) = vals (scheduler, priority) = self._convert_sched_params( scheduler, priority) affinity = self._convert_affinity(affinity) return (rule_prio, scheduler, priority, affinity, regex) def _cgroup_create_group(self, cgroup): path = "%s/%s" % (self._cgroup_mount_point, cgroup) try: os.mkdir(path, consts.DEF_CGROUP_MODE) except OSError as e: log.error("Unable to create cgroup '%s': %s" % (path, e)) if (not self._cmd.write_to_file("%s/%s" % (path, "cpuset.mems"), self._cmd.read_file("%s/%s" % (self._cgroup_mount_point, "cpuset.mems"), no_error = True), no_error = True)): log.error("Unable to initialize 'cpuset.mems ' for cgroup '%s'" % path) def _cgroup_initialize_groups(self): if self._cgroup is not None and not self._cgroup in self._cgroups: self._cgroup_create_group(self._cgroup) for cg in self._cgroups: self._cgroup_create_group(cg) def _cgroup_initialize(self): log.debug("Initializing cgroups settings") try: os.makedirs(self._cgroup_mount_point, consts.DEF_CGROUP_MODE) except OSError as e: log.error("Unable to create cgroup mount point: %s" % e) (ret, out) = self._cmd.execute(["mount", "-t", "cgroup", "-o", "cpuset", "cpuset", self._cgroup_mount_point]) if ret != 0: log.error("Unable to mount '%s'" % self._cgroup_mount_point) def _remove_dir(self, cgroup): try: os.rmdir(cgroup) except OSError as e: log.error("Unable to remove directory '%s': %s" % (cgroup, e)) def _cgroup_finalize_groups(self): for cg in reversed(self._cgroups): self._remove_dir("%s/%s" % (self._cgroup_mount_point, cg)) if self._cgroup is not None and not self._cgroup in self._cgroups: self._remove_dir("%s/%s" % (self._cgroup_mount_point, self._cgroup)) def _cgroup_finalize(self): log.debug("Removing cgroups settings") (ret, out) = self._cmd.execute(["umount", self._cgroup_mount_point]) if ret != 0: log.error("Unable to umount '%s'" % self._cgroup_mount_point) return False self._remove_dir(self._cgroup_mount_point) d = os.path.dirname(self._cgroup_mount_point) if (d != "/"): self._remove_dir(d) def _cgroup_set_affinity_one(self, cgroup, affinity, backup = False): if affinity != "": log.debug("Setting cgroup '%s' affinity to '%s'" % (cgroup, affinity)) else: log.debug("Skipping cgroup '%s', empty affinity requested" % cgroup) return path = "%s/%s/%s" % (self._cgroup_mount_point, cgroup, "cpuset.cpus") if backup: orig_affinity = self._cmd.read_file(path, err_ret = "ERR", no_error = True).strip() if orig_affinity != "ERR": self._cgroups_original_affinity[cgroup] = orig_affinity else: log.error("Refusing to set affinity of cgroup '%s', reading original affinity failed" % cgroup) return if not self._cmd.write_to_file(path, affinity, no_error = True): log.error("Unable to set affinity '%s' for cgroup '%s'" % (affinity, cgroup)) def _cgroup_set_affinity(self): if self._cgroup_affinity_initialized: return log.debug("Setting cgroups affinities") if self._affinity is not None and self._cgroup is not None and not self._cgroup in self._cgroups: self._cgroup_set_affinity_one(self._cgroup, self._affinity, backup = True) for cg in self._cgroups.items(): self._cgroup_set_affinity_one(cg[0], cg[1], backup = True) self._cgroup_affinity_initialized = True def _cgroup_restore_affinity(self): log.debug("Restoring cgroups affinities") for cg in self._cgroups_original_affinity.items(): self._cgroup_set_affinity_one(cg[0], cg[1]) def _instance_apply_static(self, instance): # need to get "cgroup_mount_point_init", "cgroup_mount_point", "cgroup_groups_init", # "cgroup", and initialize mount point and cgroups before super class implementation call self._cgroup_mount_point = self._variables.expand(instance.options["cgroup_mount_point"]) self._cgroup_mount_point_init = self._cmd.get_bool(self._variables.expand( instance.options["cgroup_mount_point_init"])) == "1" self._cgroup_groups_init = self._cmd.get_bool(self._variables.expand( instance.options["cgroup_groups_init"])) == "1" self._cgroup = self._sanitize_cgroup_path(self._variables.expand( instance.options["cgroup_for_isolated_cores"])) if self._cgroup_mount_point_init: self._cgroup_initialize() if self._cgroup_groups_init or self._cgroup_mount_point_init: self._cgroup_initialize_groups() super(SchedulerPlugin, self)._instance_apply_static(instance) self._cgroup_set_affinity() try: ps = self.get_processes() except (OSError, IOError) as e: log.error("error applying tuning, cannot get information about running processes: %s" % e) return sched_cfg = [(option, str(value).split(":", 4)) for option, value in instance._scheduler.items()] buf = [(option, self._convert_sched_cfg(vals)) for option, vals in sched_cfg if re.match(r"group\.", option) and len(vals) == 5] sched_cfg = sorted(buf, key=lambda option_vals: option_vals[1][0]) sched_all = dict() # for runtime tuning instance._sched_lookup = {} for option, (rule_prio, scheduler, priority, affinity, regex) \ in sched_cfg: try: r = re.compile(regex) except re.error as e: log.error("error compiling regular expression: '%s'" % str(regex)) continue processes = [(pid, cmd) for pid, cmd in ps.items() if re.search(r, cmd) is not None] #cmd - process name, option - group name sched = dict([(pid, (cmd, option, scheduler, priority, affinity, regex)) for pid, cmd in processes]) sched_all.update(sched) # make any contained regexes non-capturing: replace "(" with "(?:", # unless the "(" is preceded by "\" or followed by "?" regex = re.sub(r"(? 0: data = self._cmd.read_file("%s/%s/%s" % (self._cgroup_mount_point, cgroup, "tasks"), err_ret = " ", no_error = True) if data not in ["", " "]: for l in data.split("\n"): self._cmd.write_to_file("%s/%s" % (self._cgroup_mount_point, "tasks"), l, no_error = True) cnt -= 1 if cnt == 0: log.warn("Unable to cleanup tasks from cgroup '%s'" % cgroup) def _cgroup_cleanup_tasks(self): if self._cgroup is not None and not self._cgroup in self._cgroups: self._cgroup_cleanup_tasks_one(self._cgroup) for cg in self._cgroups: self._cgroup_cleanup_tasks_one(cg) def _instance_unapply_static(self, instance, rollback = consts.ROLLBACK_SOFT): super(SchedulerPlugin, self)._instance_unapply_static(instance, rollback) if self._daemon and instance._runtime_tuning: instance._terminate.set() instance._thread.join() self._restore_ps_affinity() self._cgroup_restore_affinity() self._cgroup_cleanup_tasks() if self._cgroup_groups_init or self._cgroup_mount_point_init: self._cgroup_finalize_groups() if self._cgroup_mount_point_init: self._cgroup_finalize() def _cgroup_verify_affinity_one(self, cgroup, affinity): log.debug("Verifying cgroup '%s' affinity" % cgroup) path = "%s/%s/%s" % (self._cgroup_mount_point, cgroup, "cpuset.cpus") current_affinity = self._cmd.read_file(path, err_ret = "ERR", no_error = True) if current_affinity == "ERR": return True current_affinity = self._cmd.cpulist2string(self._cmd.cpulist_pack(current_affinity)) affinity = self._cmd.cpulist2string(self._cmd.cpulist_pack(affinity)) affinity_description = "cgroup '%s' affinity" % cgroup if current_affinity == affinity: log.info(consts.STR_VERIFY_PROFILE_VALUE_OK % (affinity_description, current_affinity)) return True else: log.error(consts.STR_VERIFY_PROFILE_VALUE_FAIL % (affinity_description, current_affinity, affinity)) return False def _cgroup_verify_affinity(self): log.debug("Veryfying cgroups affinities") ret = True if self._affinity is not None and self._cgroup is not None and not self._cgroup in self._cgroups: ret = ret and self._cgroup_verify_affinity_one(self._cgroup, self._affinity) for cg in self._cgroups.items(): ret = ret and self._cgroup_verify_affinity_one(cg[0], cg[1]) return ret def _instance_verify_static(self, instance, ignore_missing, devices): ret1 = super(SchedulerPlugin, self)._instance_verify_static(instance, ignore_missing, devices) ret2 = self._cgroup_verify_affinity() return ret1 and ret2 def _add_pid(self, instance, pid, r): try: cmd = self._get_cmdline(pid) except (OSError, IOError) as e: if e.errno == errno.ENOENT \ or e.errno == errno.ESRCH: log.debug("Failed to get cmdline of PID %d, the task vanished." % pid) else: log.error("Failed to get cmdline of PID %d: %s" % (pid, e)) return v = self._cmd.re_lookup(instance._sched_lookup, cmd, r) if v is not None and not pid in self._scheduler_original: log.debug("tuning new process '%s' with PID '%d' by '%s'" % (cmd, pid, str(v))) (sched, prio, affinity) = v self._tune_process(pid, cmd, sched, prio, affinity) self._storage.set(self._scheduler_storage_key, self._scheduler_original) def _remove_pid(self, instance, pid): if pid in self._scheduler_original: del self._scheduler_original[pid] log.debug("removed PID %d from the rollback database" % pid) self._storage.set(self._scheduler_storage_key, self._scheduler_original) def _thread_code(self, instance): r = self._cmd.re_lookup_compile(instance._sched_lookup) poll = select.poll() # Store the file objects in a local variable so that they don't # go out of scope too soon. This is a workaround for # python3-perf bug rhbz#1659445. fds = instance._evlist.get_pollfd() for fd in fds: poll.register(fd) while not instance._terminate.is_set(): # timeout to poll in milliseconds if len(poll.poll(self._sleep_interval * 1000)) > 0 and not instance._terminate.is_set(): read_events = True while read_events: read_events = False for cpu in self._cpus: event = instance._evlist.read_on_cpu(cpu) if event: read_events = True if event.type == perf.RECORD_COMM or \ (self._perf_process_fork_value and event.type == perf.RECORD_FORK): self._add_pid(instance, int(event.tid), r) elif event.type == perf.RECORD_EXIT: self._remove_pid(instance, int(event.tid)) @command_custom("cgroup_ps_blacklist", per_device = False) def _cgroup_ps_blacklist(self, enabling, value, verify, ignore_missing): # currently unsupported if verify: return None if enabling and value is not None: self._cgroup_ps_blacklist_re = "|".join(["(%s)" % v for v in re.split(r"(?= 0: if not sim: self._cmd.write_to_file(self._cache_threshold_path, threshold, \ no_error = [errno.ENOENT] if remove else False) return threshold else: return None @command_get("avc_cache_threshold") def _get_avc_cache_threshold(self): value = self._cmd.read_file(self._cache_threshold_path) if len(value) > 0: return int(value) return None PK$2]ڜ==plugins/plugin_modules.pynu[import re import os.path from . import base from .decorators import * import tuned.logs from subprocess import * from tuned.utils.commands import commands import tuned.consts as consts log = tuned.logs.get() class ModulesPlugin(base.Plugin): """ `modules`:: Plug-in for applying custom kernel modules options. + This plug-in can set parameters to kernel modules. It creates `/etc/modprobe.d/tuned.conf` file. The syntax is `_module_=_option1=value1 option2=value2..._` where `_module_` is the module name and `_optionx=valuex_` are module options which may or may not be present. + .Load module `netrom` with module parameter `nr_ndevs=2` ==== ---- [modules] netrom=nr_ndevs=2 ---- ==== Modules can also be forced to load/reload by using an additional `+r` option prefix. + .(Re)load module `netrom` with module parameter `nr_ndevs=2` ==== ---- [modules] netrom=+r nr_ndevs=2 ---- ==== The `+r` switch will also cause *TuneD* to try and remove `netrom` module (if loaded) and try and (re)insert it with the specified parameters. The `+r` can be followed by an optional comma (`+r,`) for better readability. + When using `+r` the module will be loaded immediately by the *TuneD* daemon itself rather than waiting for the OS to load it with the specified parameters. """ def __init__(self, *args, **kwargs): super(ModulesPlugin, self).__init__(*args, **kwargs) self._has_dynamic_options = True self._cmd = commands() def _instance_init(self, instance): instance._has_dynamic_tuning = False instance._has_static_tuning = True instance._modules = instance.options def _instance_cleanup(self, instance): pass def _reload_modules(self, modules): for module in modules: retcode, out = self._cmd.execute(["modprobe", "-r", module]) if retcode < 0: log.warn("'modprobe' command not found, cannot reload kernel modules, reboot is required") return elif retcode > 0: log.debug("cannot remove kernel module '%s': %s" % (module, out.strip())) retcode, out = self._cmd.execute(["modprobe", module]) if retcode != 0: log.warn("cannot insert/reinsert module '%s', reboot is required: %s" % (module, out.strip())) def _instance_apply_static(self, instance): self._clear_modprobe_file() s = "" retcode = 0 skip_check = False reload_list = [] for option, value in list(instance._modules.items()): module = self._variables.expand(option) v = self._variables.expand(value) if not skip_check: retcode, out = self._cmd.execute(["modinfo", module]) if retcode < 0: skip_check = True log.warn("'modinfo' command not found, not checking kernel modules") elif retcode > 0: log.error("kernel module '%s' not found, skipping it" % module) if skip_check or retcode == 0: if len(v) > 1 and v[0:2] == "+r": v = re.sub(r"^\s*\+r\s*,?\s*", "", v) reload_list.append(module) if len(v) > 0: s += "options " + module + " " + v + "\n" else: log.debug("module '%s' doesn't have any option specified, not writing it to modprobe.d" % module) self._cmd.write_to_file(consts.MODULES_FILE, s) l = len(reload_list) if l > 0: self._reload_modules(reload_list) if len(instance._modules) != l: log.info(consts.STR_HINT_REBOOT) def _unquote_path(self, path): return str(path).replace("/", "") def _instance_verify_static(self, instance, ignore_missing, devices): ret = True # not all modules exports all their parameteters through sysfs, so hardcode check with ignore_missing ignore_missing = True r = re.compile(r"\s+") for option, value in list(instance._modules.items()): module = self._variables.expand(option) v = self._variables.expand(value) v = re.sub(r"^\s*\+r\s*,?\s*", "", v) mpath = "/sys/module/%s" % module if not os.path.exists(mpath): ret = False log.error(consts.STR_VERIFY_PROFILE_FAIL % "module '%s' is not loaded" % module) else: log.info(consts.STR_VERIFY_PROFILE_OK % "module '%s' is loaded" % module) l = r.split(v) for item in l: arg = item.split("=") if len(arg) != 2: log.warn("unrecognized module option for module '%s': %s" % (module, item)) else: if self._verify_value(arg[0], arg[1], self._cmd.read_file(mpath + "/parameters/" + self._unquote_path(arg[0]), err_ret = None, no_error = True), ignore_missing) == False: ret = False return ret def _instance_unapply_static(self, instance, rollback = consts.ROLLBACK_SOFT): if rollback == consts.ROLLBACK_FULL: self._clear_modprobe_file() def _clear_modprobe_file(self): s = self._cmd.read_file(consts.MODULES_FILE, no_error = True) l = s.split("\n") i = j = 0 ll = len(l) r = re.compile(r"^\s*#") while i < ll: if r.search(l[i]) is None: j = i i = ll i += 1 s = "\n".join(l[0:j]) if len(s) > 0: s += "\n" self._cmd.write_to_file(consts.MODULES_FILE, s) PK$2]ssplugins/plugin_uncore.pynu[from . import hotplug from .decorators import * import tuned.logs from tuned.utils.commands import commands import os import fnmatch log = tuned.logs.get() cmd = commands() SYSFS_DIR = "/sys/devices/system/cpu/intel_uncore_frequency/" IS_MIN = 0 IS_MAX = 1 class UncorePlugin(hotplug.Plugin): """ `uncore`:: `max_freq_khz, min_freq_khz`::: Limit the maximum and minumum uncore frequency. Those options are Intel specific and correspond directly to `sysfs` files exposed by Intel uncore frequency driver. ==== ---- [uncore] max_freq_khz=4000000 ---- Using this options *TuneD* will limit maximum frequency of all uncore units on the Intel system to 4 GHz. ==== """ def _init_devices(self): self._devices_supported = True self._assigned_devices = set() self._free_devices = set() self._is_tpmi = False try: devices = os.listdir(SYSFS_DIR) except OSError: return # For new TPMI interface use only uncore devices tpmi_devices = fnmatch.filter(devices, 'uncore*') if len(tpmi_devices) > 0: self._is_tpmi = True # Not used at present but can be usefull in future devices = tpmi_devices for d in devices: self._free_devices.add(d) log.debug("devices: %s", str(self._free_devices)) def _instance_init(self, instance): instance._has_static_tuning = True instance._has_dynamic_tuning = False def _instance_cleanup(self, instance): pass def _get(self, dev_dir, file): sysfs_file = SYSFS_DIR + dev_dir + "/" + file value = cmd.read_file(sysfs_file) if len(value) > 0: return int(value) return None def _set(self, dev_dir, file, value): sysfs_file = SYSFS_DIR + dev_dir + "/" + file if cmd.write_to_file(sysfs_file, "%u" % value): return value return None @classmethod def _get_config_options(cls): return { "max_freq_khz": None, "min_freq_khz": None, } def _validate_value(self, device, min_or_max, value): try: freq_khz = int(value) except ValueError: log.error("value '%s' is not integer" % value) return None try: initial_max_freq_khz = self._get(device, "initial_max_freq_khz") initial_min_freq_khz = self._get(device, "initial_min_freq_khz") max_freq_khz = self._get(device, "max_freq_khz") min_freq_khz = self._get(device, "min_freq_khz") except (OSError, IOError): log.error("fail to read inital uncore frequency values") return None if min_or_max == IS_MAX: if freq_khz < min_freq_khz: log.error("%s: max_freq_khz %d value below min_freq_khz %d" % (device, freq_khz, min_freq_khz)) return None if freq_khz > initial_max_freq_khz: log.info("%s: max_freq_khz %d value above initial_max_freq_khz - capped to %d" % (device, freq_khz, initial_max_freq_khz)) freq_khz = initial_max_freq_khz elif min_or_max == IS_MIN: if freq_khz > max_freq_khz: log.error("%s: min_freq_khz %d value above max_freq_khz %d" % (device, freq_khz, max_freq_khz)) return None if freq_khz < initial_min_freq_khz: log.info("%s: min_freq_khz %d value below initial_max_freq_khz - capped to %d" % (device, freq_khz, initial_min_freq_khz)) freq_khz = initial_min_freq_khz else: return None return freq_khz @command_set("max_freq_khz", per_device = True) def _set_max_freq_khz(self, value, device, sim, remove): max_freq_khz = self._validate_value(device, IS_MAX, value) if max_freq_khz is None: return None if sim: return max_freq_khz log.debug("%s: set max_freq_khz %d" % (device, max_freq_khz)) return self._set(device, "max_freq_khz", max_freq_khz) @command_get("max_freq_khz") def _get_max_freq_khz(self, device, ignore_missing=False): if ignore_missing and not os.path.isdir(SYSFS_DIR): return None try: max_freq_khz = self._get(device, "max_freq_khz") except (OSError, IOError): log.error("fail to read uncore frequency values") return None log.debug("%s: get max_freq_khz %d" % (device, max_freq_khz)) return max_freq_khz @command_set("min_freq_khz", per_device = True) def _set_min_freq_khz(self, value, device, sim, remove): min_freq_khz = self._validate_value(device, IS_MIN, value) if min_freq_khz is None: return None if sim: return min_freq_khz log.debug("%s: set min_freq_khz %d" % (device, min_freq_khz)) return self._set(device, "min_freq_khz", min_freq_khz) @command_get("min_freq_khz") def _get_min_freq_khz(self, device, ignore_missing=False): if ignore_missing and not os.path.isdir(SYSFS_DIR): return None try: min_freq_khz = self._get(device, "min_freq_khz") except (OSError, IOError): log.error("fail to read uncore frequency values") return None log.debug("%s: get min_freq_khz %d" % (device, min_freq_khz)) return min_freq_khz PK$2]י4Q Q plugins/plugin_scsi_host.pynu[import errno from . import hotplug from .decorators import * import tuned.logs import tuned.consts as consts from tuned.utils.commands import commands import os import re log = tuned.logs.get() class SCSIHostPlugin(hotplug.Plugin): """ `scsi_host`:: Tunes options for SCSI hosts. + The plug-in sets Aggressive Link Power Management (ALPM) to the value specified by the [option]`alpm` option. The option takes one of three values: `min_power`, `medium_power` and `max_performance`. + NOTE: ALPM is only available on SATA controllers that use the Advanced Host Controller Interface (AHCI). + .ALPM setting when extended periods of idle time are expected ==== ---- [scsi_host] alpm=min_power ---- ==== """ def __init__(self, *args, **kwargs): super(SCSIHostPlugin, self).__init__(*args, **kwargs) self._cmd = commands() def _init_devices(self): super(SCSIHostPlugin, self)._init_devices() self._devices_supported = True self._free_devices = set() for device in self._hardware_inventory.get_devices("scsi"): if self._device_is_supported(device): self._free_devices.add(device.sys_name) self._assigned_devices = set() def _get_device_objects(self, devices): return [self._hardware_inventory.get_device("scsi", x) for x in devices] @classmethod def _device_is_supported(cls, device): return device.device_type == "scsi_host" def _hardware_events_init(self): self._hardware_inventory.subscribe(self, "scsi", self._hardware_events_callback) def _hardware_events_cleanup(self): self._hardware_inventory.unsubscribe(self) def _hardware_events_callback(self, event, device): if self._device_is_supported(device): super(SCSIHostPlugin, self)._hardware_events_callback(event, device) def _added_device_apply_tuning(self, instance, device_name): super(SCSIHostPlugin, self)._added_device_apply_tuning(instance, device_name) def _removed_device_unapply_tuning(self, instance, device_name): super(SCSIHostPlugin, self)._removed_device_unapply_tuning(instance, device_name) @classmethod def _get_config_options(cls): return { "alpm" : None, } def _instance_init(self, instance): instance._has_static_tuning = True instance._has_dynamic_tuning = False def _instance_cleanup(self, instance): pass def _get_alpm_policy_file(self, device): return os.path.join("/sys/class/scsi_host/", str(device), "link_power_management_policy") @command_set("alpm", per_device = True) def _set_alpm(self, policy, device, sim, remove): if policy is None: return None policy_file = self._get_alpm_policy_file(device) if not sim: if os.path.exists(policy_file): self._cmd.write_to_file(policy_file, policy, \ no_error = [errno.ENOENT] if remove else False) else: log.info("ALPM control file ('%s') not found, skipping ALPM setting for '%s'" % (policy_file, str(device))) return None return policy @command_get("alpm") def _get_alpm(self, device, ignore_missing=False): policy_file = self._get_alpm_policy_file(device) policy = self._cmd.read_file(policy_file, no_error = True).strip() return policy if policy != "" else None PK$2]KjUUplugins/plugin_rtentsk.pynu[from . import base from .decorators import * import tuned.logs from tuned.utils.commands import commands import glob import socket import time log = tuned.logs.get() class RTENTSKPlugin(base.Plugin): """ `rtentsk`:: Plugin for avoiding interruptions due to static key IPIs due to opening socket with timestamping enabled (by opening a socket ourselves the static key is kept enabled). """ def _instance_init(self, instance): instance._has_static_tuning = True instance._has_dynamic_tuning = False # SO_TIMESTAMP nor SOF_TIMESTAMPING_OPT_TX_SWHW is defined by # the socket class SO_TIMESTAMP = 29 # see include/uapi/asm-generic/socket.h #define SO_TIMESTAMP 0x4012 # parisc! SOF_TIMESTAMPING_OPT_TX_SWHW = (1<<14) # see include/uapi/linux/net_tstamp.h s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) s.setsockopt(socket.SOL_SOCKET, SO_TIMESTAMP, SOF_TIMESTAMPING_OPT_TX_SWHW) self.rtentsk_socket = s log.info("opened SOF_TIMESTAMPING_OPT_TX_SWHW socket") def _instance_cleanup(self, instance): s = self.rtentsk_socket s.close() PK$2][aƽ:e:eplugins/plugin_bootloader.pynu[from . import base from .decorators import * import tuned.logs from . import exceptions from tuned.utils.commands import commands import tuned.consts as consts import os import re import tempfile from time import sleep log = tuned.logs.get() class BootloaderPlugin(base.Plugin): """ `bootloader`:: Adds options to the kernel command line. This plug-in supports the GRUB 2 boot loader and the Boot Loader Specification (BLS). + NOTE: *TuneD* will not remove or replace kernel command line parameters added via other methods like *grubby*. *TuneD* will manage the kernel command line parameters added via *TuneD*. Please refer to your platform bootloader documentation about how to identify and manage kernel command line parameters set outside of *TuneD*. + Customized non-standard location of the GRUB 2 configuration file can be specified by the [option]`grub2_cfg_file` option. + The kernel options are added to the current GRUB configuration and its templates. Reboot the system for the kernel option to take effect. + Switching to another profile or manually stopping the `tuned` service removes the additional options. If you shut down or reboot the system, the kernel options persist in the [filename]`grub.cfg` file and grub environment files. + The kernel options can be specified by the following syntax: + [subs="+quotes,+macros"] ---- cmdline__suffix__=__arg1__ __arg2__ ... __argN__ ---- + Or with an alternative, but equivalent syntax: + [subs="+quotes,+macros"] ---- cmdline__suffix__=+__arg1__ __arg2__ ... __argN__ ---- + Where __suffix__ can be arbitrary (even empty) alphanumeric string which should be unique across all loaded profiles. It is recommended to use the profile name as the __suffix__ (for example, [option]`cmdline_my_profile`). If there are multiple [option]`cmdline` options with the same suffix, during the profile load/merge the value which was assigned previously will be used. This is the same behavior as any other plug-in options. The final kernel command line is constructed by concatenating all the resulting [option]`cmdline` options. + It is also possible to remove kernel options by the following syntax: + [subs="+quotes,+macros"] ---- cmdline__suffix__=-__arg1__ __arg2__ ... __argN__ ---- + Such kernel options will not be concatenated and thus removed during the final kernel command line construction. + .Modifying the kernel command line ==== For example, to add the [option]`quiet` kernel option to a *TuneD* profile, include the following lines in the [filename]`tuned.conf` file: ---- [bootloader] cmdline_my_profile=+quiet ---- An example of a custom profile `my_profile` that adds the [option]`isolcpus=2` option to the kernel command line: ---- [bootloader] cmdline_my_profile=isolcpus=2 ---- An example of a custom profile `my_profile` that removes the [option]`rhgb quiet` options from the kernel command line (if previously added by *TuneD*): ---- [bootloader] cmdline_my_profile=-rhgb quiet ---- ==== + .Modifying the kernel command line, example with inheritance ==== For example, to add the [option]`rhgb quiet` kernel options to a *TuneD* profile `profile_1`: ---- [bootloader] cmdline_profile_1=+rhgb quiet ---- In the child profile `profile_2` drop the [option]`quiet` option from the kernel command line: ---- [main] include=profile_1 [bootloader] cmdline_profile_2=-quiet ---- The final kernel command line will be [option]`rhgb`. In case the same [option]`cmdline` suffix as in the `profile_1` is used: ---- [main] include=profile_1 [bootloader] cmdline_profile_1=-quiet ---- It will result in the empty kernel command line because the merge executes and the [option]`cmdline_profile_1` gets redefined to just [option]`-quiet`. Thus there is nothing to remove in the final kernel command line processing. ==== + The [option]`initrd_add_img=IMAGE` adds an initrd overlay file `IMAGE`. If the `IMAGE` file name begins with '/', the absolute path is used. Otherwise, the current profile directory is used as the base directory for the `IMAGE`. + The [option]`initrd_add_dir=DIR` creates an initrd image from the directory `DIR` and adds the resulting image as an overlay. If the `DIR` directory name begins with '/', the absolute path is used. Otherwise, the current profile directory is used as the base directory for the `DIR`. + The [option]`initrd_dst_img=PATHNAME` sets the name and location of the resulting initrd image. Typically, it is not necessary to use this option. By default, the location of initrd images is `/boot` and the name of the image is taken as the basename of `IMAGE` or `DIR`. This can be overridden by setting [option]`initrd_dst_img`. + The [option]`initrd_remove_dir=VALUE` removes the source directory from which the initrd image was built if `VALUE` is true. Only 'y', 'yes', 't', 'true' and '1' (case insensitive) are accepted as true values for this option. Other values are interpreted as false. + .Adding an overlay initrd image ==== ---- [bootloader] initrd_remove_dir=True initrd_add_dir=/tmp/tuned-initrd.img ---- This creates an initrd image from the `/tmp/tuned-initrd.img` directory and and then removes the `tuned-initrd.img` directory from `/tmp`. ==== + The [option]`skip_grub_config=VALUE` does not change grub configuration if `VALUE` is true. However, [option]`cmdline` options are still processed, and the result is used to verify the current cmdline. Only 'y', 'yes', 't', 'true' and '1' (case insensitive) are accepted as true values for this option. Other values are interpreted as false. + .Do not change grub configuration ==== ---- [bootloader] skip_grub_config=True cmdline=+systemd.cpu_affinity=1 ---- ==== """ def __init__(self, *args, **kwargs): if not os.path.isfile(consts.GRUB2_TUNED_TEMPLATE_PATH): raise exceptions.NotSupportedPluginException("Required GRUB2 template not found, disabling plugin.") super(BootloaderPlugin, self).__init__(*args, **kwargs) self._cmd = commands() def _instance_init(self, instance): instance._has_dynamic_tuning = False instance._has_static_tuning = True # controls grub2_cfg rewrites in _instance_post_static self.update_grub2_cfg = False self._skip_grub_config_val = False self._initrd_remove_dir = False self._initrd_dst_img_val = None self._cmdline_val = "" self._initrd_val = "" self._grub2_cfg_file_names = self._get_grub2_cfg_files() self._bls = self._bls_enabled() self._rpm_ostree = self._rpm_ostree_status() is not None def _instance_cleanup(self, instance): pass @classmethod def _get_config_options(cls): return { "grub2_cfg_file": None, "initrd_dst_img": None, "initrd_add_img": None, "initrd_add_dir": None, "initrd_remove_dir": None, "cmdline": None, "skip_grub_config": None, } @staticmethod def _options_to_dict(options, omit=""): """ Returns dict created from options e.g.: _options_to_dict("A=A A=B A B=A C=A", "A=B B=A B=B") returns {'A': ['A', None], 'C': ['A']} """ d = {} omit = omit.split() for o in options.split(): if o not in omit: arr = o.split('=', 1) d.setdefault(arr[0], []).append(arr[1] if len(arr) > 1 else None) return d @staticmethod def _dict_to_options(d): return " ".join([k + "=" + v1 if v1 is not None else k for k, v in d.items() for v1 in v]) def _rpm_ostree_status(self): """ Returns status of rpm-ostree transactions or None if not run on rpm-ostree system """ (rc, out, err) = self._cmd.execute(['rpm-ostree', 'status'], return_err=True) log.debug("rpm-ostree status output stdout:\n%s\nstderr:\n%s" % (out, err)) if rc != 0: return None splited = out.split() if len(splited) < 2 or splited[0] != "State:": log.warn("Exceptional format of rpm-ostree status result:\n%s" % out) return None return splited[1] def _wait_till_idle(self): sleep_cycles = 10 sleep_secs = 1.0 for i in range(sleep_cycles): if self._rpm_ostree_status() == "idle": return True sleep(sleep_secs) if self._rpm_ostree_status() == "idle": return True return False def _rpm_ostree_kargs(self, append={}, delete={}): """ Method for appending or deleting rpm-ostree karg returns None if rpm-ostree not present or is run on not ostree system or tuple with new kargs, appended kargs and deleted kargs """ (rc, out, err) = self._cmd.execute(['rpm-ostree', 'kargs'], return_err=True) log.debug("rpm-ostree output stdout:\n%s\nstderr:\n%s" % (out, err)) if rc != 0: return None, None, None kargs = self._options_to_dict(out) if not self._wait_till_idle(): log.error("Cannot wait for transaction end") return None, None, None deleted = {} delete_params = self._dict_to_options(delete).split() # Deleting kargs, e.g. deleting added kargs by profile for k, val in delete.items(): for v in val: kargs[k].remove(v) deleted[k] = val appended = {} append_params = self._dict_to_options(append).split() # Appending kargs, e.g. new kargs by profile or restoring kargs replaced by profile for k, val in append.items(): if kargs.get(k): # If there is karg that we add with new value we want to delete it # and store old value for restoring after profile unload log.debug("adding rpm-ostree kargs %s: %s for delete" % (k, kargs[k])) deleted.setdefault(k, []).extend(kargs[k]) delete_params.extend([k + "=" + v if v is not None else k for v in kargs[k]]) kargs[k] = [] kargs.setdefault(k, []).extend(val) appended[k] = val if append_params == delete_params: log.info("skipping rpm-ostree kargs - append == deleting (%s)" % append_params) return kargs, appended, deleted log.info("rpm-ostree kargs - appending: '%s'; deleting: '%s'" % (append_params, delete_params)) (rc, _, err) = self._cmd.execute(['rpm-ostree', 'kargs'] + ['--append=%s' % v for v in append_params] + ['--delete=%s' % v for v in delete_params], return_err=True) if rc != 0: log.error("Something went wrong with rpm-ostree kargs\n%s" % (err)) return self._options_to_dict(out), None, None else: return kargs, appended, deleted def _get_effective_options(self, options): """Merge provided options with plugin default options and merge all cmdline.* options.""" effective = self._get_config_options().copy() cmdline_keys = [] for key in options: if str(key).startswith("cmdline"): cmdline_keys.append(key) elif key in effective: effective[key] = options[key] else: log.warn("Unknown option '%s' for plugin '%s'." % (key, self.__class__.__name__)) cmdline = "" for key in cmdline_keys: val = options[key] if val is None or val == "": continue op = val[0] op1 = val[1:2] vals = val[1:].strip() if op == "+" or (op == "\\" and op1 in ["\\", "+", "-"]): if vals != "": cmdline += " " + vals elif op == "-": if vals != "": for p in vals.split(): regex = re.escape(p) cmdline = re.sub(r"(\A|\s)" + regex + r"(?=\Z|\s)", r"", cmdline) else: cmdline += " " + val cmdline = cmdline.strip() if cmdline != "": effective["cmdline"] = cmdline return effective def _get_grub2_cfg_files(self): cfg_files = [] for f in consts.GRUB2_CFG_FILES: if os.path.exists(f): cfg_files.append(f) return cfg_files def _bls_enabled(self): grub2_default_env = self._cmd.read_file(consts.GRUB2_DEFAULT_ENV_FILE, no_error = True) if len(grub2_default_env) <= 0: log.info("cannot read '%s'" % consts.GRUB2_DEFAULT_ENV_FILE) return False return re.search(r"^\s*GRUB_ENABLE_BLSCFG\s*=\s*\"?\s*[tT][rR][uU][eE]\s*\"?\s*$", grub2_default_env, flags = re.MULTILINE) is not None def _patch_bootcmdline(self, d): return self._cmd.add_modify_option_in_file(consts.BOOT_CMDLINE_FILE, d) def _remove_grub2_tuning(self): self._patch_bootcmdline({consts.BOOT_CMDLINE_TUNED_VAR : "", consts.BOOT_CMDLINE_INITRD_ADD_VAR : ""}) if not self._grub2_cfg_file_names: log.info("cannot find grub.cfg to patch") return for f in self._grub2_cfg_file_names: self._cmd.add_modify_option_in_file(f, {r"set\s+" + consts.GRUB2_TUNED_VAR : "", r"set\s+" + consts.GRUB2_TUNED_INITRD_VAR : ""}, add = False) if self._initrd_dst_img_val is not None: log.info("removing initrd image '%s'" % self._initrd_dst_img_val) self._cmd.unlink(self._initrd_dst_img_val) def _get_rpm_ostree_changes(self): f = self._cmd.read_file(consts.BOOT_CMDLINE_FILE) appended = re.search(consts.BOOT_CMDLINE_TUNED_VAR + r"=\"(.*)\"", f, flags=re.MULTILINE) appended = appended[1] if appended else "" deleted = re.search(consts.BOOT_CMDLINE_KARGS_DELETED_VAR + r"=\"(.*)\"", f, flags=re.MULTILINE) deleted = deleted[1] if deleted else "" return appended, deleted def _remove_rpm_ostree_tuning(self): appended, deleted = self._get_rpm_ostree_changes() self._rpm_ostree_kargs(append=self._options_to_dict(deleted), delete=self._options_to_dict(appended)) self._patch_bootcmdline({consts.BOOT_CMDLINE_TUNED_VAR: "", consts.BOOT_CMDLINE_KARGS_DELETED_VAR: ""}) def _instance_unapply_static(self, instance, rollback = consts.ROLLBACK_SOFT): if rollback == consts.ROLLBACK_FULL and not self._skip_grub_config_val: if self._rpm_ostree: log.info("removing rpm-ostree tuning previously added by Tuned") self._remove_rpm_ostree_tuning() else: log.info("removing grub2 tuning previously added by Tuned") self._remove_grub2_tuning() self._update_grubenv({"tuned_params" : "", "tuned_initrd" : ""}) def _grub2_cfg_unpatch(self, grub2_cfg): log.debug("unpatching grub.cfg") cfg = re.sub(r"^\s*set\s+" + consts.GRUB2_TUNED_VAR + "\\s*=.*\n", "", grub2_cfg, flags = re.MULTILINE) grub2_cfg = re.sub(r" *\$" + consts.GRUB2_TUNED_VAR, "", cfg, flags = re.MULTILINE) cfg = re.sub(r"^\s*set\s+" + consts.GRUB2_TUNED_INITRD_VAR + "\\s*=.*\n", "", grub2_cfg, flags = re.MULTILINE) grub2_cfg = re.sub(r" *\$" + consts.GRUB2_TUNED_INITRD_VAR, "", cfg, flags = re.MULTILINE) cfg = re.sub(consts.GRUB2_TEMPLATE_HEADER_BEGIN + r"\n", "", grub2_cfg, flags = re.MULTILINE) return re.sub(consts.GRUB2_TEMPLATE_HEADER_END + r"\n+", "", cfg, flags = re.MULTILINE) def _grub2_cfg_patch_initial(self, grub2_cfg, d): log.debug("initial patching of grub.cfg") s = r"\1\n\n" + consts.GRUB2_TEMPLATE_HEADER_BEGIN + "\n" for opt in d: s += r"set " + self._cmd.escape(opt) + "=\"" + self._cmd.escape(d[opt]) + "\"\n" s += consts.GRUB2_TEMPLATE_HEADER_END + r"\n" grub2_cfg = re.sub(r"^(\s*###\s+END\s+[^#]+/00_header\s+### *)\n", s, grub2_cfg, flags = re.MULTILINE) d2 = {"linux" : consts.GRUB2_TUNED_VAR, "initrd" : consts.GRUB2_TUNED_INITRD_VAR} for i in d2: # add TuneD parameters to all kernels grub2_cfg = re.sub(r"^(\s*" + i + r"(16|efi)?\s+.*)$", r"\1 $" + d2[i], grub2_cfg, flags = re.MULTILINE) # remove TuneD parameters from rescue kernels grub2_cfg = re.sub(r"^(\s*" + i + r"(?:16|efi)?\s+\S+rescue.*)\$" + d2[i] + r" *(.*)$", r"\1\2", grub2_cfg, flags = re.MULTILINE) # fix whitespaces in rescue kernels grub2_cfg = re.sub(r"^(\s*" + i + r"(?:16|efi)?\s+\S+rescue.*) +$", r"\1", grub2_cfg, flags = re.MULTILINE) return grub2_cfg def _grub2_default_env_patch(self): grub2_default_env = self._cmd.read_file(consts.GRUB2_DEFAULT_ENV_FILE) if len(grub2_default_env) <= 0: log.info("cannot read '%s'" % consts.GRUB2_DEFAULT_ENV_FILE) return False d = {"GRUB_CMDLINE_LINUX_DEFAULT" : consts.GRUB2_TUNED_VAR, "GRUB_INITRD_OVERLAY" : consts.GRUB2_TUNED_INITRD_VAR} write = False for i in d: if re.search(r"^[^#]*\b" + i + r"\s*=.*\\\$" + d[i] + r"\b.*$", grub2_default_env, flags = re.MULTILINE) is None: write = True if grub2_default_env[-1] != "\n": grub2_default_env += "\n" grub2_default_env += i + "=\"${" + i + ":+$" + i + r" }\$" + d[i] + "\"\n" if write: log.debug("patching '%s'" % consts.GRUB2_DEFAULT_ENV_FILE) self._cmd.write_to_file(consts.GRUB2_DEFAULT_ENV_FILE, grub2_default_env) return True def _grub2_default_env_unpatch(self): grub2_default_env = self._cmd.read_file(consts.GRUB2_DEFAULT_ENV_FILE) if len(grub2_default_env) <= 0: log.info("cannot read '%s'" % consts.GRUB2_DEFAULT_ENV_FILE) return False write = False if re.search(r"^GRUB_CMDLINE_LINUX_DEFAULT=\"\$\{GRUB_CMDLINE_LINUX_DEFAULT:\+\$GRUB_CMDLINE_LINUX_DEFAULT \}\\\$" + consts.GRUB2_TUNED_VAR + "\"$", grub2_default_env, flags = re.MULTILINE): write = True cfg = re.sub(r"^GRUB_CMDLINE_LINUX_DEFAULT=\"\$\{GRUB_CMDLINE_LINUX_DEFAULT:\+\$GRUB_CMDLINE_LINUX_DEFAULT \}\\\$" + consts.GRUB2_TUNED_VAR + "\"$\n", "", grub2_default_env, flags = re.MULTILINE) if cfg[-1] != "\n": cfg += "\n" if write: log.debug("unpatching '%s'" % consts.GRUB2_DEFAULT_ENV_FILE) self._cmd.write_to_file(consts.GRUB2_DEFAULT_ENV_FILE, cfg) return True def _grub2_cfg_patch(self, d): log.debug("patching grub.cfg") if not self._grub2_cfg_file_names: log.info("cannot find grub.cfg to patch") return False for f in self._grub2_cfg_file_names: grub2_cfg = self._cmd.read_file(f) if len(grub2_cfg) <= 0: log.info("cannot patch %s" % f) continue log.debug("adding boot command line parameters to '%s'" % f) grub2_cfg_new = grub2_cfg patch_initial = False for opt in d: (grub2_cfg_new, nsubs) = re.subn(r"\b(set\s+" + opt + r"\s*=).*$", r"\1" + "\"" + self._cmd.escape(d[opt]) + "\"", grub2_cfg_new, flags = re.MULTILINE) if nsubs < 1 or re.search(r"\$" + opt, grub2_cfg, flags = re.MULTILINE) is None: patch_initial = True # workaround for rhbz#1442117 if len(re.findall(r"\$" + consts.GRUB2_TUNED_VAR, grub2_cfg, flags = re.MULTILINE)) != \ len(re.findall(r"\$" + consts.GRUB2_TUNED_INITRD_VAR, grub2_cfg, flags = re.MULTILINE)): patch_initial = True if patch_initial: grub2_cfg_new = self._grub2_cfg_patch_initial(self._grub2_cfg_unpatch(grub2_cfg), d) self._cmd.write_to_file(f, grub2_cfg_new) if self._bls: self._grub2_default_env_unpatch() else: self._grub2_default_env_patch() return True def _rpm_ostree_update(self): appended, _ = self._get_rpm_ostree_changes() _cmdline_dict = self._options_to_dict(self._cmdline_val, appended) if not _cmdline_dict: return None (_, _, d) = self._rpm_ostree_kargs(append=_cmdline_dict) if d is None: return self._patch_bootcmdline({consts.BOOT_CMDLINE_TUNED_VAR : self._cmdline_val, consts.BOOT_CMDLINE_KARGS_DELETED_VAR : self._dict_to_options(d)}) def _grub2_update(self): self._grub2_cfg_patch({consts.GRUB2_TUNED_VAR : self._cmdline_val, consts.GRUB2_TUNED_INITRD_VAR : self._initrd_val}) self._patch_bootcmdline({consts.BOOT_CMDLINE_TUNED_VAR : self._cmdline_val, consts.BOOT_CMDLINE_INITRD_ADD_VAR : self._initrd_val}) def _has_bls(self): return os.path.exists(consts.BLS_ENTRIES_PATH) def _update_grubenv(self, d): log.debug("updating grubenv, setting %s" % str(d)) l = ["%s=%s" % (str(option), str(value)) for option, value in d.items()] (rc, out) = self._cmd.execute(["grub2-editenv", "-", "set"] + l) if rc != 0: log.warn("cannot update grubenv: '%s'" % out) return False return True def _bls_entries_patch_initial(self): machine_id = self._cmd.get_machine_id() if machine_id == "": return False log.debug("running kernel update hook '%s' to patch BLS entries" % consts.KERNEL_UPDATE_HOOK_FILE) (rc, out) = self._cmd.execute([consts.KERNEL_UPDATE_HOOK_FILE, "add"], env = {"KERNEL_INSTALL_MACHINE_ID" : machine_id}) if rc != 0: log.warn("cannot patch BLS entries: '%s'" % out) return False return True def _bls_update(self): log.debug("updating BLS") if self._has_bls() and \ self._update_grubenv({"tuned_params" : self._cmdline_val, "tuned_initrd" : self._initrd_val}) and \ self._bls_entries_patch_initial(): return True return False def _init_initrd_dst_img(self, name): if self._initrd_dst_img_val is None: self._initrd_dst_img_val = os.path.join(consts.BOOT_DIR, os.path.basename(name)) def _check_petitboot(self): return os.path.isdir(consts.PETITBOOT_DETECT_DIR) def _install_initrd(self, img): if self._rpm_ostree: log.warn("Detected rpm-ostree which doesn't support initrd overlays.") return False if self._check_petitboot(): log.warn("Detected Petitboot which doesn't support initrd overlays. The initrd overlay will be ignored by bootloader.") log.info("installing initrd image as '%s'" % self._initrd_dst_img_val) img_name = os.path.basename(self._initrd_dst_img_val) if not self._cmd.copy(img, self._initrd_dst_img_val): return False self.update_grub2_cfg = True curr_cmdline = self._cmd.read_file("/proc/cmdline").rstrip() initrd_grubpath = "/" lc = len(curr_cmdline) if lc: path = re.sub(r"^\s*BOOT_IMAGE=\s*(?:\([^)]*\))?(\S*/).*$", "\\1", curr_cmdline) if len(path) < lc: initrd_grubpath = path self._initrd_val = os.path.join(initrd_grubpath, img_name) return True @command_custom("grub2_cfg_file") def _grub2_cfg_file(self, enabling, value, verify, ignore_missing): # nothing to verify if verify: return None if enabling and value is not None: self._grub2_cfg_file_names = [str(value)] @command_custom("initrd_dst_img") def _initrd_dst_img(self, enabling, value, verify, ignore_missing): # nothing to verify if verify: return None if enabling and value is not None: self._initrd_dst_img_val = str(value) if self._initrd_dst_img_val == "": return False if self._initrd_dst_img_val[0] != "/": self._initrd_dst_img_val = os.path.join(consts.BOOT_DIR, self._initrd_dst_img_val) @command_custom("initrd_remove_dir") def _initrd_remove_dir(self, enabling, value, verify, ignore_missing): # nothing to verify if verify: return None if enabling and value is not None: self._initrd_remove_dir = self._cmd.get_bool(value) == "1" @command_custom("initrd_add_img", per_device = False, priority = 10) def _initrd_add_img(self, enabling, value, verify, ignore_missing): # nothing to verify if verify: return None if enabling and value is not None: src_img = str(value) self._init_initrd_dst_img(src_img) if src_img == "": return False if not self._install_initrd(src_img): return False @command_custom("initrd_add_dir", per_device = False, priority = 10) def _initrd_add_dir(self, enabling, value, verify, ignore_missing): # nothing to verify if verify: return None if enabling and value is not None: src_dir = str(value) self._init_initrd_dst_img(src_dir) if src_dir == "": return False if not os.path.isdir(src_dir): log.error("error: cannot create initrd image, source directory '%s' doesn't exist" % src_dir) return False log.info("generating initrd image from directory '%s'" % src_dir) (fd, tmpfile) = tempfile.mkstemp(prefix = "tuned-bootloader-", suffix = ".tmp") log.debug("writing initrd image to temporary file '%s'" % tmpfile) os.close(fd) (rc, out) = self._cmd.execute("find . | cpio -co > %s" % tmpfile, cwd = src_dir, shell = True) log.debug("cpio log: %s" % out) if rc != 0: log.error("error generating initrd image") self._cmd.unlink(tmpfile, no_error = True) return False self._install_initrd(tmpfile) self._cmd.unlink(tmpfile) if self._initrd_remove_dir: log.info("removing directory '%s'" % src_dir) self._cmd.rmtree(src_dir) @command_custom("cmdline", per_device = False, priority = 10) def _cmdline(self, enabling, value, verify, ignore_missing): v = self._variables.expand(self._cmd.unquote(value)) if verify: if self._rpm_ostree: rpm_ostree_kargs = self._rpm_ostree_kargs()[0] cmdline = self._dict_to_options(rpm_ostree_kargs) else: cmdline = self._cmd.read_file("/proc/cmdline") if len(cmdline) == 0: return None cmdline_set = set(cmdline.split()) value_set = set(v.split()) missing_set = value_set - cmdline_set if len(missing_set) == 0: log.info(consts.STR_VERIFY_PROFILE_VALUE_OK % ("cmdline", str(value_set))) return True else: cmdline_dict = {v.split("=", 1)[0]: v for v in cmdline_set} for m in missing_set: arg = m.split("=", 1)[0] if not arg in cmdline_dict: log.error(consts.STR_VERIFY_PROFILE_CMDLINE_FAIL_MISSING % (arg, m)) else: log.error(consts.STR_VERIFY_PROFILE_CMDLINE_FAIL % (cmdline_dict[arg], m)) present_set = value_set & cmdline_set log.info("expected arguments that are present in cmdline: %s"%(" ".join(present_set),)) return False if enabling and value is not None: log.info("installing additional boot command line parameters to grub2") self.update_grub2_cfg = True self._cmdline_val = v @command_custom("skip_grub_config", per_device = False, priority = 10) def _skip_grub_config(self, enabling, value, verify, ignore_missing): if verify: return None if enabling and value is not None: if self._cmd.get_bool(value) == "1": log.info("skipping any modification of grub config") self._skip_grub_config_val = True def _instance_post_static(self, instance, enabling): if enabling and self._skip_grub_config_val: if len(self._initrd_val) > 0: log.warn("requested changes to initrd will not be applied!") if len(self._cmdline_val) > 0: log.warn("requested changes to cmdline will not be applied!") # ensure that the desired cmdline is always written to BOOT_CMDLINE_FILE (/etc/tuned/bootcmdline) self._patch_bootcmdline({consts.BOOT_CMDLINE_TUNED_VAR : self._cmdline_val, consts.BOOT_CMDLINE_INITRD_ADD_VAR : self._initrd_val}) elif enabling and self.update_grub2_cfg: if self._rpm_ostree: self._rpm_ostree_update() else: self._grub2_update() self._bls_update() self.update_grub2_cfg = False PK$2]?nOccplugins/exceptions.pynu[import tuned.exceptions class NotSupportedPluginException(tuned.exceptions.TunedException): pass PK$2]Jq))plugins/plugin_service.pynu[from . import base import collections import tuned.consts as consts from .decorators import * import os import re import tuned.logs from tuned.utils.commands import commands log = tuned.logs.get() cmd = commands() class Service(): def __init__(self, start = None, enable = None, cfg_file = None, runlevel = None): self.enable = enable self.start = start self.cfg_file = cfg_file self.runlevel = runlevel class InitHandler(): def runlevel_get(self): (retcode, out) = cmd.execute(["runlevel"]) return out.split()[-1] if retcode == 0 else None def daemon_reload(self): cmd.execute(["telinit", "q"]) def cfg_install(self, name, cfg_file): pass def cfg_uninstall(self, name, cfg_file): pass def cfg_verify(self, name, cfg_file): return None # no enable/disable class SysVBasicHandler(InitHandler): def start(self, name): cmd.execute(["service", name, "start"]) def stop(self, name): cmd.execute(["service", name, "stop"]) def enable(self, name, runlevel): raise NotImplementedError() def disable(self, name, runlevel): raise NotImplementedError() def is_running(self, name): (retcode, out) = cmd.execute(["service", name, "status"], no_errors = [0]) return retcode == 0 def is_enabled(self, name, runlevel): raise NotImplementedError() class SysVHandler(SysVBasicHandler): def enable(self, name, runlevel): cmd.execute(["chkconfig", "--level", runlevel, name, "on"]) def disable(self, name, runlevel): cmd.execute(["chkconfig", "--level", runlevel, name, "off"]) def is_enabled(self, name, runlevel): (retcode, out) = cmd.execute(["chkconfig", "--list", name]) return out.split("%s:" % str(runlevel))[1][:2] == "on" if retcode == 0 else None class SysVRCHandler(SysVBasicHandler): def enable(self, name, runlevel): cmd.execute(["sysv-rc-conf", "--level", runlevel, name, "on"]) def disable(self, name, runlevel): cmd.execute(["sysv-rc-conf", "--level", runlevel, name, "off"]) def is_enabled(self, name, runlevel): (retcode, out) = cmd.execute(["sysv-rc-conf", "--list", name]) return out.split("%s:" % str(runlevel))[1][:2] == "on" if retcode == 0 else None class OpenRCHandler(InitHandler): def runlevel_get(self): (retcode, out) = cmd.execute(["rc-status", "-r"]) return out.strip() if retcode == 0 else None def start(self, name): cmd.execute(["rc-service", name, "start"]) def stop(self, name): cmd.execute(["rc-service", name, "stop"]) def enable(self, name, runlevel): cmd.execute(["rc-update", "add", name, runlevel]) def disable(self, name, runlevel): cmd.execute(["rc-update", "del", name, runlevel]) def is_running(self, name): (retcode, out) = cmd.execute(["rc-service", name, "status"], no_errors = [0]) return retcode == 0 def is_enabled(self, name, runlevel): (retcode, out) = cmd.execute(["rc-update", "show", runlevel]) return bool(re.search(r"\b" + re.escape(name) + r"\b", out)) class SystemdHandler(InitHandler): # runlevel not used def runlevel_get(self): return "" def start(self, name): cmd.execute(["systemctl", "restart", name]) def stop(self, name): cmd.execute(["systemctl", "stop", name]) def enable(self, name, runlevel): cmd.execute(["systemctl", "enable", name]) def disable(self, name, runlevel): cmd.execute(["systemctl", "disable", name]) def is_running(self, name): (retcode, out) = cmd.execute(["systemctl", "is-active", name], no_errors = [0]) return retcode == 0 def is_enabled(self, name, runlevel): (retcode, out) = cmd.execute(["systemctl", "is-enabled", name], no_errors = [0]) status = out.strip() return True if status == "enabled" else False if status =="disabled" else None def cfg_install(self, name, cfg_file): log.info("installing service configuration overlay file '%s' for service '%s'" % (cfg_file, name)) if not os.path.exists(cfg_file): log.error("Unable to find service configuration '%s'" % cfg_file) return dirpath = consts.SERVICE_SYSTEMD_CFG_PATH % name try: os.makedirs(dirpath, consts.DEF_SERVICE_CFG_DIR_MODE) except OSError as e: log.error("Unable to create directory '%s': %s" % (dirpath, e)) return cmd.copy(cfg_file, dirpath) self.daemon_reload() def cfg_uninstall(self, name, cfg_file): log.info("uninstalling service configuration overlay file '%s' for service '%s'" % (cfg_file, name)) dirpath = consts.SERVICE_SYSTEMD_CFG_PATH % name path = "%s/%s" % (dirpath, os.path.basename(cfg_file)) cmd.unlink(path) self.daemon_reload() # remove the service dir if empty, do not check for errors try: os.rmdir(dirpath) except (FileNotFoundError, OSError): pass def cfg_verify(self, name, cfg_file): if cfg_file is None: return None path = "%s/%s" % (consts.SERVICE_SYSTEMD_CFG_PATH % name, os.path.basename(cfg_file)) if not os.path.exists(cfg_file): log.error("Unable to find service '%s' configuration '%s'" % (name, cfg_file)) return False if not os.path.exists(path): log.error("Service '%s' configuration not installed in '%s'" % (name, path)) return False sha256sum1 = cmd.sha256sum(cfg_file) sha256sum2 = cmd.sha256sum(path) return sha256sum1 == sha256sum2 class ServicePlugin(base.Plugin): """ `service`:: Plug-in for handling sysvinit, sysv-rc, openrc and systemd services. + The syntax is as follows: + [subs="+quotes,+macros"] ---- [service] service.__service_name__=__commands__[,file:__file__] ---- + Supported service-handling `_commands_` are `start`, `stop`, `enable` and `disable`. The optional `file:__file__` directive installs an overlay configuration file `__file__`. Multiple commands must be comma (`,`) or semicolon (`;`) separated. If the directives conflict, the last one is used. + The service plugin supports configuration overlays only for systemd. In other init systems, this directive is ignored. The configuration overlay files are copied to `/etc/systemd/system/__service_name__.service.d/` directories. Upon profile unloading, the directory is removed if it is empty. + With systemd, the `start` command is implemented by `restart` in order to allow loading of the service configuration file overlay. + NOTE: With non-systemd init systems, the plug-in operates on the current runlevel only. + .Start and enable the `sendmail` service with an overlay file ==== ---- [service] service.sendmail=start,enable,file:${i:PROFILE_DIR}/tuned-sendmail.conf ---- The internal variable `${i:PROFILE_DIR}` points to the directory from which the profile is loaded. ==== """ def __init__(self, *args, **kwargs): super(ServicePlugin, self).__init__(*args, **kwargs) self._has_dynamic_options = True self._init_handler = self._detect_init_system() def _check_cmd(self, command): (retcode, out) = cmd.execute(command, no_errors = [0]) return retcode == 0 def _detect_init_system(self): if self._check_cmd(["systemctl", "status"]): log.debug("detected systemd") return SystemdHandler() elif self._check_cmd(["chkconfig"]): log.debug("detected generic sysvinit") return SysVHandler() elif self._check_cmd(["update-rc.d", "-h"]): log.debug("detected sysv-rc") return SysVRCHandler() elif self._check_cmd(["rc-update", "-h"]): log.debug("detected openrc") return OpenRCHandler() else: raise exceptions.NotSupportedPluginException("Unable to detect your init system, disabling the plugin.") def _parse_service_options(self, name, val): l = re.split(r"\s*[,;]\s*", val) service = Service() for i in l: if i == "enable": service.enable = True elif i == "disable": service.enable = False elif i == "start": service.start = True elif i == "stop": service.start = False elif i[:5] == "file:": service.cfg_file = i[5:] else: log.error("service '%s': invalid service option: '%s'" % (name, i)) return service def _instance_init(self, instance): instance._has_dynamic_tuning = False instance._has_static_tuning = True self._services = collections.OrderedDict([(option[8:], self._parse_service_options(option[8:], self._variables.expand(value))) for option, value in instance.options.items() if option[:8] == "service." and len(option) > 8]) instance._services_original = {} def _instance_cleanup(self, instance): pass def _process_service(self, name, start, enable, runlevel): if start: self._init_handler.start(name) elif start is not None: self._init_handler.stop(name) if enable: self._init_handler.enable(name, runlevel) elif enable is not None: self._init_handler.disable(name, runlevel) def _instance_apply_static(self, instance): runlevel = self._init_handler.runlevel_get() if runlevel is None: log.error("Cannot detect runlevel") return for service in self._services.items(): is_enabled = self._init_handler.is_enabled(service[0], runlevel) is_running = self._init_handler.is_running(service[0]) instance._services_original[service[0]] = Service(is_running, is_enabled, service[1].cfg_file, runlevel) if service[1].cfg_file: self._init_handler.cfg_install(service[0], service[1].cfg_file) self._process_service(service[0], service[1].start, service[1].enable, runlevel) def _instance_verify_static(self, instance, ignore_missing, devices): runlevel = self._init_handler.runlevel_get() if runlevel is None: log.error(consts.STR_VERIFY_PROFILE_FAIL % "cannot detect runlevel") return False ret = True for service in self._services.items(): ret_cfg_verify = self._init_handler.cfg_verify(service[0], service[1].cfg_file) if ret_cfg_verify: log.info(consts.STR_VERIFY_PROFILE_OK % "service '%s' configuration '%s' matches" % (service[0], service[1].cfg_file)) elif ret_cfg_verify is not None: log.error(consts.STR_VERIFY_PROFILE_FAIL % "service '%s' configuration '%s' differs" % (service[0], service[1].cfg_file)) ret = False else: log.info(consts.STR_VERIFY_PROFILE_VALUE_MISSING % "service '%s' configuration '%s'" % (service[0], service[1].cfg_file)) is_enabled = self._init_handler.is_enabled(service[0], runlevel) is_running = self._init_handler.is_running(service[0]) if self._verify_value("%s running" % service[0], service[1].start, is_running, ignore_missing) is False: ret = False if self._verify_value("%s enabled" % service[0], service[1].enable, is_enabled, ignore_missing) is False: ret = False return ret def _instance_unapply_static(self, instance, rollback = consts.ROLLBACK_SOFT): for name, value in list(instance._services_original.items()): if value.cfg_file: self._init_handler.cfg_uninstall(name, value.cfg_file) self._process_service(name, value.start, value.enable, value.runlevel) PK$2]8:n:nplugins/plugin_cpu.pynu[from . import hotplug from .decorators import * import tuned.logs from tuned.utils.commands import commands import tuned.consts as consts import os import errno import struct import errno import platform import procfs log = tuned.logs.get() cpuidle_states_path = "/sys/devices/system/cpu/cpu0/cpuidle" class CPULatencyPlugin(hotplug.Plugin): """ `cpu`:: Sets the CPU governor to the value specified by the [option]`governor` option and dynamically changes the Power Management Quality of Service (PM QoS) CPU Direct Memory Access (DMA) latency according to the CPU load. `governor`::: The [option]`governor` option of the 'cpu' plug-in supports specifying CPU governors. Multiple governors are separated using '|'. The '|' character is meant to represent a logical 'or' operator. Note that the same syntax is used for the [option]`energy_perf_bias` option. *TuneD* will set the first governor that is available on the system. + For example, with the following profile, *TuneD* will set the 'ondemand' governor, if it is available. If it is not available, but the 'powersave' governor is available, 'powersave' will be set. If neither of them are available, the governor will not be changed. + .Specifying a CPU governor ==== ---- [cpu] governor=ondemand|powersave ---- ==== `sampling_down_factor`::: The sampling rate determines how frequently the governor checks to tune the CPU. The [option]`sampling_down_factor` is a tunable that multiplies the sampling rate when the CPU is at its highest clock frequency thereby delaying load evaluation and improving performance. Allowed values for sampling_down_factor are 1 to 100000. + .The recommended setting for jitter reduction ==== ---- [cpu] sampling_down_factor = 100 ---- ==== `energy_perf_bias`::: [option]`energy_perf_bias` supports managing energy vs. performance policy via x86 Model Specific Registers using the `x86_energy_perf_policy` tool. Multiple alternative Energy Performance Bias (EPB) values are supported. The alternative values are separated using the '|' character. The following EPB values are supported starting with kernel 4.13: "performance", "balance-performance", "normal", "balance-power" and "power". On newer processors is value writen straight to file (see rhbz#2095829) + .Specifying alternative Energy Performance Bias values ==== ---- [cpu] energy_perf_bias=powersave|power ---- *TuneD* will try to set EPB to 'powersave'. If that fails, it will try to set it to 'power'. ==== `energy_performance_preference`::: [option]`energy_performance_preference` supports managing energy vs. performance hints on newer Intel and AMD processors with active P-State CPU scaling drivers (intel_pstate or amd-pstate). Multiple alternative Energy Performance Preferences (EPP) values are supported. The alternative values are separated using the '|' character. Available values can be found in `energy_performance_available_preferences` file in `CPUFreq` policy directory in `sysfs`. in + .Specifying alternative Energy Performance Hints values ==== ---- [cpu] energy_performance_preference=balance_power|power ---- *TuneD* will try to set EPP to 'balance_power'. If that fails, it will try to set it to 'power'. ==== `latency_low, latency_high, load_threshold`::: + If the CPU load is lower than the value specified by the[option]`load_threshold` option, the latency is set to the value specified either by the [option]`latency_high` option or by the [option]`latency_low` option. + `force_latency`::: You can also force the latency to a specific value and prevent it from dynamically changing further. To do so, set the [option]`force_latency` option to the required latency value. + The maximum latency value can be specified in several ways: + * by a numerical value in microseconds (for example, `force_latency=10`) * as the kernel CPU idle level ID of the maximum C-state allowed (for example, force_latency = cstate.id:1) * as a case sensitive name of the maximum C-state allowed (for example, force_latency = cstate.name:C1) * by using 'None' as a fallback value to prevent errors when alternative C-state IDs/names do not exist. When 'None' is used in the alternatives pipeline, all the alternatives that follow 'None' are ignored. + It is also possible to specify multiple fallback values separated by '|' as the C-state names and/or IDs may not be available on some systems. + .Specifying fallback C-state values ==== ---- [cpu] force_latency=cstate.name:C6|cstate.id:4|10 ---- This configuration tries to obtain and set the latency of C-state named C6. If the C-state C6 does not exist, kernel CPU idle level ID 4 (state4) latency is searched for in sysfs. Finally, if the state4 directory in sysfs is not found, the last latency fallback value is `10` us. The value is encoded and written into the kernel's PM QoS file `/dev/cpu_dma_latency`. ==== + .Specifying fallback C-state values using 'None'. ==== ---- [cpu] force_latency=cstate.name:XYZ|None ---- In this case, if C-state with the name `XYZ` does not exist [option]`force_latency`, no latency value will be written into the kernel's PM QoS file, and no errors will be reported due to the presence of 'None'. ==== `min_perf_pct, max_perf_pct, no_turbo`::: These options set the internals of the Intel P-State driver exposed via the kernel's `sysfs` interface. + .Adjusting the configuration of the Intel P-State driver ==== ---- [cpu] min_perf_pct=100 ---- Limit the minimum P-State that will be requested by the driver. It states it as a percentage of the max (non-turbo) performance level. ==== + `pm_qos_resume_latency_us`::: This option allow to set specific latency for all cpus or specific ones. ==== ---- [cpu] pm_qos_resume_latency_us=n/a ---- Special value that disables C-states completely. ==== ---- [cpu] pm_qos_resume_latency_us=0 ---- Allows all C-states. ==== ---- [cpu] pm_qos_resume_latency_us=100 ---- Allows any C-state with a resume latency less than value. """ def __init__(self, *args, **kwargs): super(CPULatencyPlugin, self).__init__(*args, **kwargs) self._has_pm_qos = True self._arch = "x86_64" self._is_x86 = False self._is_intel = False self._is_amd = False self._has_energy_perf_bias = False self._has_intel_pstate = False self._has_amd_pstate = False self._has_pm_qos_resume_latency_us = None self._min_perf_pct_save = None self._max_perf_pct_save = None self._no_turbo_save = None self._governors_map = {} self._cmd = commands() self._flags = None def _init_devices(self): self._devices_supported = True self._free_devices = set() # current list of devices for device in self._hardware_inventory.get_devices("cpu"): self._free_devices.add(device.sys_name) self._assigned_devices = set() def _get_device_objects(self, devices): return [self._hardware_inventory.get_device("cpu", x) for x in devices] @classmethod def _get_config_options(self): return { "load_threshold" : 0.2, "latency_low" : 100, "latency_high" : 1000, "force_latency" : None, "governor" : None, "sampling_down_factor" : None, "energy_perf_bias" : None, "min_perf_pct" : None, "max_perf_pct" : None, "no_turbo" : None, "pm_qos_resume_latency_us": None, "energy_performance_preference" : None, } def _check_arch(self): intel_archs = [ "x86_64", "i686", "i585", "i486", "i386" ] self._arch = platform.machine() if self._arch in intel_archs: # Possible other x86 vendors (from arch/x86/kernel/cpu/*): # "CentaurHauls", "CyrixInstead", "Geode by NSC", "HygonGenuine", "GenuineTMx86", # "TransmetaCPU", "UMC UMC UMC" cpu = procfs.cpuinfo() vendor = cpu.tags.get("vendor_id") if vendor == "GenuineIntel": self._is_intel = True elif vendor == "AuthenticAMD" or vendor == "HygonGenuine": self._is_amd = True else: # We always assign Intel, unless we know better self._is_intel = True log.info("We are running on an x86 %s platform" % vendor) else: log.info("We are running on %s (non x86)" % self._arch) if self._is_intel: # Check for x86_energy_perf_policy, ignore if not available / supported self._check_energy_perf_bias() # Check for intel_pstate self._check_intel_pstate() if self._is_amd: # Check for amd-pstate self._check_amd_pstate() def _check_energy_perf_bias(self): self._has_energy_perf_bias = False retcode_unsupported = 1 retcode, out = self._cmd.execute(["x86_energy_perf_policy", "-r"], no_errors = [errno.ENOENT, retcode_unsupported]) # With recent versions of the tool, a zero exit code is # returned even if EPB is not supported. The output is empty # in that case, however. if retcode == 0 and out != "": self._has_energy_perf_bias = True elif retcode < 0: log.warning("unable to run x86_energy_perf_policy tool, ignoring CPU energy performance bias, is the tool installed?") else: log.warning("your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias") def _check_intel_pstate(self): self._has_intel_pstate = os.path.exists("/sys/devices/system/cpu/intel_pstate") if self._has_intel_pstate: log.info("intel_pstate detected") def _check_amd_pstate(self): self._has_amd_pstate = os.path.exists("/sys/devices/system/cpu/amd_pstate") if self._has_amd_pstate: log.info("amd-pstate detected") def _get_cpuinfo_flags(self): if self._flags is None: self._flags = procfs.cpuinfo().tags.get("flags", []) return self._flags def _is_cpu_online(self, device): sd = str(device) return self._cmd.is_cpu_online(str(device).replace("cpu", "")) def _cpu_has_scaling_governor(self, device): return os.path.exists("/sys/devices/system/cpu/%s/cpufreq/scaling_governor" % device) def _check_cpu_can_change_governor(self, device): if not self._is_cpu_online(device): log.debug("'%s' is not online, skipping" % device) return False if not self._cpu_has_scaling_governor(device): log.debug("there is no scaling governor fo '%s', skipping" % device) return False return True def _instance_init(self, instance): instance._has_static_tuning = True instance._has_dynamic_tuning = False # only the first instance of the plugin can control the latency if list(self._instances.values())[0] == instance: instance._first_instance = True try: self._cpu_latency_fd = os.open(consts.PATH_CPU_DMA_LATENCY, os.O_WRONLY) except OSError: log.error("Unable to open '%s', disabling PM_QoS control" % consts.PATH_CPU_DMA_LATENCY) self._has_pm_qos = False self._latency = None if instance.options["force_latency"] is None and instance.options["pm_qos_resume_latency_us"] is None: instance._load_monitor = self._monitors_repository.create("load", None) instance._has_dynamic_tuning = True else: instance._load_monitor = None self._check_arch() else: instance._first_instance = False log.info("Latency settings from non-first CPU plugin instance '%s' will be ignored." % instance.name) try: instance._first_device = list(instance.assigned_devices)[0] except IndexError: instance._first_device = None def _instance_cleanup(self, instance): if instance._first_instance: if self._has_pm_qos: os.close(self._cpu_latency_fd) if instance._load_monitor is not None: self._monitors_repository.delete(instance._load_monitor) def _get_intel_pstate_attr(self, attr): return self._cmd.read_file("/sys/devices/system/cpu/intel_pstate/%s" % attr, None).strip() def _set_intel_pstate_attr(self, attr, val): if val is not None: self._cmd.write_to_file("/sys/devices/system/cpu/intel_pstate/%s" % attr, val) def _getset_intel_pstate_attr(self, attr, value): if value is None: return None v = self._get_intel_pstate_attr(attr) self._set_intel_pstate_attr(attr, value) return v def _instance_apply_static(self, instance): super(CPULatencyPlugin, self)._instance_apply_static(instance) if not instance._first_instance: return force_latency_value = self._variables.expand( instance.options["force_latency"]) if force_latency_value is not None: self._set_latency(force_latency_value) if self._has_intel_pstate: new_value = self._variables.expand( instance.options["min_perf_pct"]) self._min_perf_pct_save = self._getset_intel_pstate_attr( "min_perf_pct", new_value) new_value = self._variables.expand( instance.options["max_perf_pct"]) self._max_perf_pct_save = self._getset_intel_pstate_attr( "max_perf_pct", new_value) new_value = self._variables.expand( instance.options["no_turbo"]) self._no_turbo_save = self._getset_intel_pstate_attr( "no_turbo", new_value) def _instance_unapply_static(self, instance, rollback = consts.ROLLBACK_SOFT): super(CPULatencyPlugin, self)._instance_unapply_static(instance, rollback) if instance._first_instance and self._has_intel_pstate: self._set_intel_pstate_attr("min_perf_pct", self._min_perf_pct_save) self._set_intel_pstate_attr("max_perf_pct", self._max_perf_pct_save) self._set_intel_pstate_attr("no_turbo", self._no_turbo_save) def _instance_apply_dynamic(self, instance, device): self._instance_update_dynamic(instance, device) def _instance_update_dynamic(self, instance, device): assert(instance._first_instance) if device != instance._first_device: return load = instance._load_monitor.get_load()["system"] if load < instance.options["load_threshold"]: self._set_latency(instance.options["latency_high"]) else: self._set_latency(instance.options["latency_low"]) def _instance_unapply_dynamic(self, instance, device): pass def _str2int(self, s): try: return int(s) except (ValueError, TypeError): return None def _read_cstates_latency(self): self.cstates_latency = {} for d in os.listdir(cpuidle_states_path): cstate_path = cpuidle_states_path + "/%s/" % d name = self._cmd.read_file(cstate_path + "name", err_ret = None, no_error = True) latency = self._cmd.read_file(cstate_path + "latency", err_ret = None, no_error = True) if name is not None and latency is not None: latency = self._str2int(latency) if latency is not None: self.cstates_latency[name.strip()] = latency def _get_latency_by_cstate_name(self, name, no_zero=False): log.debug("getting latency for cstate with name '%s'" % name) if self.cstates_latency is None: log.debug("reading cstates latency table") self._read_cstates_latency() latency = self.cstates_latency.get(name, None) if no_zero and latency == 0: log.debug("skipping latency 0 as set by param") return None log.debug("cstate name mapped to latency: %s" % str(latency)) return latency def _get_latency_by_cstate_id(self, lid, no_zero=False): log.debug("getting latency for cstate with ID '%s'" % str(lid)) lid = self._str2int(lid) if lid is None: log.debug("cstate ID is invalid") return None latency_path = cpuidle_states_path + "/%s/latency" % ("state%d" % lid) latency = self._str2int(self._cmd.read_file(latency_path, err_ret = None, no_error = True)) if no_zero and latency == 0: log.debug("skipping latency 0 as set by param") return None log.debug("cstate ID mapped to latency: %s" % str(latency)) return latency # returns (latency, skip), skip means we want to skip latency settings def _parse_latency(self, latency, allow_na=False): self.cstates_latency = None latencies = str(latency).split("|") log.debug("parsing latency '%s', allow_na '%s'" % (latency, allow_na)) for latency in latencies: try: latency = int(latency) log.debug("parsed directly specified latency value: %d" % latency) except ValueError: if latency[0:18] == "cstate.id_no_zero:": latency = self._get_latency_by_cstate_id(latency[18:], no_zero=True) elif latency[0:10] == "cstate.id:": latency = self._get_latency_by_cstate_id(latency[10:]) elif latency[0:20] == "cstate.name_no_zero:": latency = self._get_latency_by_cstate_name(latency[20:], no_zero=True) elif latency[0:12] == "cstate.name:": latency = self._get_latency_by_cstate_name(latency[12:]) elif latency in ["none", "None"]: log.debug("latency 'none' specified") return None, True elif allow_na and latency == "n/a": log.debug("latency 'n/a' specified") pass else: log.debug("invalid latency specified: '%s'" % str(latency)) latency = None if latency is not None: break return latency, False def _set_latency(self, latency): latency, skip = self._parse_latency(latency) if not skip and self._has_pm_qos: if latency is None: log.error("unable to evaluate latency value (probably wrong settings in the 'cpu' section of current profile), disabling PM QoS") self._has_pm_qos = False elif self._latency != latency: log.info("setting new cpu latency %d" % latency) latency_bin = struct.pack("i", latency) os.write(self._cpu_latency_fd, latency_bin) self._latency = latency def _get_available_governors(self, device): return self._cmd.read_file("/sys/devices/system/cpu/%s/cpufreq/scaling_available_governors" % device).strip().split() @command_set("governor", per_device=True) def _set_governor(self, governors, device, sim, remove): if not self._check_cpu_can_change_governor(device): return None governors = str(governors) governors = governors.split("|") governors = [governor.strip() for governor in governors] for governor in governors: if len(governor) == 0: log.error("The 'governor' option contains an empty value.") return None available_governors = self._get_available_governors(device) for governor in governors: if governor in available_governors: if not sim: log.info("setting governor '%s' on cpu '%s'" % (governor, device)) self._cmd.write_to_file("/sys/devices/system/cpu/%s/cpufreq/scaling_governor" % device, governor, no_error = [errno.ENOENT] if remove else False) break elif not sim: log.debug("Ignoring governor '%s' on cpu '%s', it is not supported" % (governor, device)) else: log.warn("None of the scaling governors is supported: %s" % ", ".join(governors)) governor = None return governor @command_get("governor") def _get_governor(self, device, ignore_missing=False): governor = None if not self._check_cpu_can_change_governor(device): return None data = self._cmd.read_file("/sys/devices/system/cpu/%s/cpufreq/scaling_governor" % device, no_error=ignore_missing).strip() if len(data) > 0: governor = data if governor is None: log.error("could not get current governor on cpu '%s'" % device) return governor def _sampling_down_factor_path(self, governor = "ondemand"): return "/sys/devices/system/cpu/cpufreq/%s/sampling_down_factor" % governor @command_set("sampling_down_factor", per_device = True, priority = 10) def _set_sampling_down_factor(self, sampling_down_factor, device, sim, remove): val = None # hack to clear governors map when the profile starts unloading # TODO: this should be handled better way, by e.g. currently non-implemented # Plugin.profile_load_finished() method if device in self._governors_map: self._governors_map.clear() self._governors_map[device] = None governor = self._get_governor(device) if governor is None: log.debug("ignoring sampling_down_factor setting for CPU '%s', cannot match governor" % device) return None if governor not in list(self._governors_map.values()): self._governors_map[device] = governor path = self._sampling_down_factor_path(governor) if not os.path.exists(path): log.debug("ignoring sampling_down_factor setting for CPU '%s', governor '%s' doesn't support it" % (device, governor)) return None val = str(sampling_down_factor) if not sim: log.info("setting sampling_down_factor to '%s' for governor '%s'" % (val, governor)) self._cmd.write_to_file(path, val, no_error = [errno.ENOENT] if remove else False) return val @command_get("sampling_down_factor") def _get_sampling_down_factor(self, device, ignore_missing=False): governor = self._get_governor(device, ignore_missing=ignore_missing) if governor is None: return None path = self._sampling_down_factor_path(governor) if not os.path.exists(path): return None return self._cmd.read_file(path).strip() def _try_set_energy_perf_bias(self, cpu_id, value): (retcode, out, err_msg) = self._cmd.execute( ["x86_energy_perf_policy", "-c", cpu_id, str(value) ], return_err = True) return (retcode, err_msg) def _pstate_preference_path(self, cpu_id, available = False): return "/sys/devices/system/cpu/cpufreq/policy%s/energy_performance_%s" % (cpu_id, "available_preferences" if available else "preference") def _energy_perf_bias_path(self, cpu_id): return "/sys/devices/system/cpu/cpu%s/power/energy_perf_bias" % cpu_id @command_set("energy_perf_bias", per_device=True) def _set_energy_perf_bias(self, energy_perf_bias, device, sim, remove): if not self._is_cpu_online(device): log.debug("%s is not online, skipping" % device) return None cpu_id = device.lstrip("cpu") vals = energy_perf_bias.split('|') # It should be writen straight to sysfs energy_perf_bias file if requested on newer processors # see rhbz#2095829 if consts.CFG_CPU_EPP_FLAG in self._get_cpuinfo_flags(): energy_perf_bias_path = self._energy_perf_bias_path(cpu_id) if os.path.exists(energy_perf_bias_path): if not sim: for val in vals: val = val.strip() if self._cmd.write_to_file(energy_perf_bias_path, val, \ no_error = [errno.ENOENT] if remove else False): log.info("energy_perf_bias successfully set to '%s' on cpu '%s'" % (val, device)) break else: log.error("Failed to set energy_perf_bias on cpu '%s'. Is the value in the profile correct?" % device) return str(energy_perf_bias) else: log.error("Failed to set energy_perf_bias on cpu '%s' because energy_perf_bias file does not exist." % device) return None elif self._has_energy_perf_bias: if not sim: for val in vals: val = val.strip() log.debug("Trying to set energy_perf_bias to '%s' on cpu '%s'" % (val, device)) (retcode, err_msg) = self._try_set_energy_perf_bias( cpu_id, val) if retcode == 0: log.info("energy_perf_bias successfully set to '%s' on cpu '%s'" % (val, device)) break elif retcode < 0: log.error("Failed to set energy_perf_bias: %s" % err_msg) break else: log.debug("Could not set energy_perf_bias to '%s' on cpu '%s', trying another value" % (val, device)) else: log.error("Failed to set energy_perf_bias on cpu '%s'. Is the value in the profile correct?" % device) return str(energy_perf_bias) else: return None def _try_parse_num(self, s): try: v = int(s) except ValueError as e: try: v = int(s, 16) except ValueError as e: v = s return v # Before Linux 4.13 def _energy_perf_policy_to_human(self, s): return {0:"performance", 6:"normal", 15:"powersave"}.get(self._try_parse_num(s), s) # Since Linux 4.13 def _energy_perf_policy_to_human_v2(self, s): return {0:"performance", 4:"balance-performance", 6:"normal", 8:"balance-power", 15:"power", }.get(self._try_parse_num(s), s) @command_get("energy_perf_bias") def _get_energy_perf_bias(self, device, ignore_missing=False): energy_perf_bias = None if not self._is_cpu_online(device): log.debug("%s is not online, skipping" % device) return None cpu_id = device.lstrip("cpu") if consts.CFG_CPU_EPP_FLAG in self._get_cpuinfo_flags(): energy_perf_bias_path = self._energy_perf_bias_path(cpu_id) if os.path.exists(energy_perf_bias_path): energy_perf_bias = self._energy_perf_policy_to_human_v2(self._cmd.read_file(energy_perf_bias_path)) elif self._has_energy_perf_bias: retcode, lines = self._cmd.execute(["x86_energy_perf_policy", "-c", cpu_id, "-r"]) if retcode == 0: for line in lines.splitlines(): l = line.split() if len(l) == 2: energy_perf_bias = self._energy_perf_policy_to_human(l[1]) break elif len(l) == 3: energy_perf_bias = self._energy_perf_policy_to_human_v2(l[2]) break return energy_perf_bias def _pm_qos_resume_latency_us_path(self, device): return "/sys/devices/system/cpu/%s/power/pm_qos_resume_latency_us" % device def _check_pm_qos_resume_latency_us(self, device): if self._has_pm_qos_resume_latency_us is None: self._has_pm_qos_resume_latency_us = os.path.exists(self._pm_qos_resume_latency_us_path(device)) if not self._has_pm_qos_resume_latency_us: log.info("Option 'pm_qos_resume_latency_us' is not supported on current hardware.") return self._has_pm_qos_resume_latency_us @command_set("pm_qos_resume_latency_us", per_device=True) def _set_pm_qos_resume_latency_us(self, pm_qos_resume_latency_us, device, sim, remove): if not self._is_cpu_online(device): log.debug("%s is not online, skipping" % device) return None latency, skip = self._parse_latency(pm_qos_resume_latency_us, allow_na=True) if skip or not self._check_pm_qos_resume_latency_us(device): return None if latency is None or (latency != "n/a" and latency < 0): log.warning("Invalid pm_qos_resume_latency_us specified: '%s', cpu: '%s'." % (pm_qos_resume_latency_us, device)) return None if not sim: self._cmd.write_to_file(self._pm_qos_resume_latency_us_path(device), latency, \ no_error = [errno.ENOENT] if remove else False) return latency @command_get("pm_qos_resume_latency_us") def _get_pm_qos_resume_latency_us(self, device, ignore_missing=False): if not self._is_cpu_online(device): log.debug("%s is not online, skipping" % device) return None if not self._check_pm_qos_resume_latency_us(device): return None return self._cmd.read_file(self._pm_qos_resume_latency_us_path(device), no_error=ignore_missing).strip() @command_set("energy_performance_preference", per_device=True) def _set_energy_performance_preference(self, energy_performance_preference, device, sim, remove): if not self._is_cpu_online(device): log.debug("%s is not online, skipping" % device) return None cpu_id = device.lstrip("cpu") if os.path.exists(self._pstate_preference_path(cpu_id, True)): vals = energy_performance_preference.split('|') if not sim: avail_vals = set(self._cmd.read_file(self._pstate_preference_path(cpu_id, True)).split()) for val in vals: if val in avail_vals: self._cmd.write_to_file(self._pstate_preference_path(cpu_id), val, \ no_error = [errno.ENOENT] if remove else False) log.info("Setting energy_performance_preference value '%s' for cpu '%s'" % (val, device)) break else: log.warn("energy_performance_preference value '%s' unavailable for cpu '%s'" % (val, device)) else: log.error("Failed to set energy_performance_preference on cpu '%s'. Is the value in the profile correct?" % device) return str(energy_performance_preference) else: log.debug("energy_performance_available_preferences file missing, which can happen if the system is booted without a P-state driver.") return None @command_get("energy_performance_preference") def _get_energy_performance_preference(self, device, ignore_missing=False): if not self._is_cpu_online(device): log.debug("%s is not online, skipping" % device) return None cpu_id = device.lstrip("cpu") # read the EPP hint used by the intel_pstate and amd-pstate CPU scaling drivers if os.path.exists(self._pstate_preference_path(cpu_id, True)): return self._cmd.read_file(self._pstate_preference_path(cpu_id)).strip() else: log.debug("energy_performance_available_preferences file missing, which can happen if the system is booted without a P-state driver.") return None PK$2];plugins/decorators.pynu[__all__ = ["command_set", "command_get", "command_custom"] # @command_set("scheduler", per_device=True) # def set_scheduler(self, value, device): # set_new_scheduler # # @command_get("scheduler") # def get_scheduler(self, device): # return current_scheduler # # @command_set("foo") # def set_foo(self, value): # set_new_foo # # @command_get("foo") # def get_foo(self): # return current_foo # def command_set(name, per_device=False, priority=0): def wrapper(method): method._command = { "set": True, "name": name, "per_device": per_device, "priority": priority, } return method return wrapper def command_get(name): def wrapper(method): method._command = { "get": True, "name": name, } return method return wrapper def command_custom(name, per_device=False, priority=0): def wrapper(method): method._command = { "custom": True, "name": name, "per_device": per_device, "priority": priority, } return method return wrapper PK$2]cDplugins/plugin_video.pynu[from . import base from .decorators import * import tuned.logs from tuned.utils.commands import commands import os import errno import re log = tuned.logs.get() class VideoPlugin(base.Plugin): """ `video`:: Sets various powersave levels on video cards. Currently, only the Radeon cards are supported. The powersave level can be specified by using the [option]`radeon_powersave` option. Supported values are: + -- * `default` * `auto` * `low` * `mid` * `high` * `dynpm` * `dpm-battery` * `dpm-balanced` * `dpm-perfomance` -- + For additional detail, see link:https://www.x.org/wiki/RadeonFeature/#kmspowermanagementoptions[KMS Power Management Options]. + NOTE: This plug-in is experimental and the option might change in future releases. + .To set the powersave level for the Radeon video card to high ==== ---- [video] radeon_powersave=high ---- ==== """ def _init_devices(self): self._devices_supported = True self._free_devices = set() self._assigned_devices = set() # FIXME: this is a blind shot, needs testing for device in self._hardware_inventory.get_devices("drm").match_sys_name("card*").match_property("DEVTYPE", "drm_minor"): self._free_devices.add(device.sys_name) self._cmd = commands() def _get_device_objects(self, devices): return [self._hardware_inventory.get_device("drm", x) for x in devices] @classmethod def _get_config_options(self): return { "radeon_powersave" : None, } def _instance_init(self, instance): instance._has_dynamic_tuning = False instance._has_static_tuning = True def _instance_cleanup(self, instance): pass def _radeon_powersave_files(self, device): return { "method" : "/sys/class/drm/%s/device/power_method" % device, "profile": "/sys/class/drm/%s/device/power_profile" % device, "dpm_state": "/sys/class/drm/%s/device/power_dpm_state" % device } @command_set("radeon_powersave", per_device=True) def _set_radeon_powersave(self, value, device, sim, remove): sys_files = self._radeon_powersave_files(device) va = str(re.sub(r"(\s*:\s*)|(\s+)|(\s*;\s*)|(\s*,\s*)", " ", value)).split() if not os.path.exists(sys_files["method"]): if not sim: log.warn("radeon_powersave is not supported on '%s'" % device) return None for v in va: if v in ["default", "auto", "low", "mid", "high"]: if not sim: if (self._cmd.write_to_file(sys_files["method"], "profile", \ no_error = [errno.ENOENT] if remove else False) and self._cmd.write_to_file(sys_files["profile"], v, \ no_error = [errno.ENOENT] if remove else False)): return v elif v == "dynpm": if not sim: if (self._cmd.write_to_file(sys_files["method"], "dynpm", \ no_error = [errno.ENOENT] if remove else False)): return "dynpm" # new DPM profiles, recommended to use if supported elif v in ["dpm-battery", "dpm-balanced", "dpm-performance"]: if not sim: state = v[len("dpm-"):] if (self._cmd.write_to_file(sys_files["method"], "dpm", \ no_error = [errno.ENOENT] if remove else False) and self._cmd.write_to_file(sys_files["dpm_state"], state, \ no_error = [errno.ENOENT] if remove else False)): return v else: if not sim: log.warn("Invalid option for radeon_powersave.") return None return None @command_get("radeon_powersave") def _get_radeon_powersave(self, device, ignore_missing = False): sys_files = self._radeon_powersave_files(device) method = self._cmd.read_file(sys_files["method"], no_error=ignore_missing).strip() if method == "profile": return self._cmd.read_file(sys_files["profile"]).strip() elif method == "dynpm": return method elif method == "dpm": return "dpm-" + self._cmd.read_file(sys_files["dpm_state"]).strip() else: return None PK$2](_y]11plugins/__init__.pynu[from .repository import * from . import instance PK$2]DS~  plugins/plugin_script.pynu[import tuned.consts as consts from . import base import tuned.logs import os from subprocess import Popen, PIPE log = tuned.logs.get() class ScriptPlugin(base.Plugin): """ `script`:: Executes an external script or binary when the profile is loaded or unloaded. You can choose an arbitrary executable. + IMPORTANT: The `script` plug-in is provided mainly for compatibility with earlier releases. Prefer other *TuneD* plug-ins if they cover the required functionality. + *TuneD* calls the executable with one of the following arguments: + -- ** `start` when loading the profile ** `stop` when unloading the profile -- + You need to correctly implement the `stop` action in your executable and revert all settings that you changed during the `start` action. Otherwise, the roll-back step after changing your *TuneD* profile will not work. + Bash scripts can import the [filename]`/usr/lib/tuned/functions` Bash library and use the functions defined there. Use these functions only for functionality that is not natively provided by *TuneD*. If a function name starts with an underscore, such as `_wifi_set_power_level`, consider the function private and do not use it in your scripts, because it might change in the future. + Specify the path to the executable using the `script` parameter in the plug-in configuration. + .Running a Bash script from a profile ==== To run a Bash script named `script.sh` that is located in the profile directory, use: ---- [script] script=${i:PROFILE_DIR}/script.sh ---- ==== """ @classmethod def _get_config_options(self): return { "script" : None, } def _instance_init(self, instance): instance._has_static_tuning = True instance._has_dynamic_tuning = False if instance.options["script"] is not None: # FIXME: this hack originated from profiles merger assert isinstance(instance.options["script"], list) instance._scripts = instance.options["script"] else: instance._scripts = [] def _instance_cleanup(self, instance): pass def _call_scripts(self, scripts, arguments): ret = True for script in scripts: environ = os.environ environ.update(self._variables.get_env()) log.info("calling script '%s' with arguments '%s'" % (script, str(arguments))) log.debug("using environment '%s'" % str(list(environ.items()))) try: proc = Popen([script] + arguments, \ stdout=PIPE, stderr=PIPE, \ close_fds=True, env=environ, \ universal_newlines = True, \ cwd = os.path.dirname(script)) out, err = proc.communicate() if len(err): log.error("script '%s' error output: '%s'" % (script, err[:-1])) if proc.returncode: log.error("script '%s' returned error code: %d" % (script, proc.returncode)) ret = False except (OSError,IOError) as e: log.error("script '%s' error: %s" % (script, e)) ret = False return ret def _instance_apply_static(self, instance): super(ScriptPlugin, self)._instance_apply_static(instance) self._call_scripts(instance._scripts, ["start"]) def _instance_verify_static(self, instance, ignore_missing, devices): ret = True if super(ScriptPlugin, self)._instance_verify_static(instance, ignore_missing, devices) == False: ret = False args = ["verify"] if ignore_missing: args += ["ignore_missing"] if self._call_scripts(instance._scripts, args) == True: log.info(consts.STR_VERIFY_PROFILE_OK % instance._scripts) else: log.error(consts.STR_VERIFY_PROFILE_FAIL % instance._scripts) ret = False return ret def _instance_unapply_static(self, instance, rollback = consts.ROLLBACK_SOFT): args = ["stop"] if rollback == consts.ROLLBACK_FULL: args = args + ["full_rollback"] self._call_scripts(reversed(instance._scripts), args) super(ScriptPlugin, self)._instance_unapply_static(instance, rollback) PK$2]ӷ_ plugins/plugin_eeepc_she.pynu[from . import base from . import exceptions import tuned.logs from tuned.utils.commands import commands import os log = tuned.logs.get() class EeePCSHEPlugin(base.Plugin): """ `eeepc_she`:: Dynamically sets the front-side bus (FSB) speed according to the CPU load. This feature can be found on some netbooks and is also known as the Asus Super Hybrid Engine. If the CPU load is lower or equal to the value specified by the [option]`load_threshold_powersave` option, the plug-in sets the FSB speed to the value specified by the [option]`she_powersave` option. If the CPU load is higher or equal to the value specified by the [option]`load_threshold_normal` option, it sets the FSB speed to the value specified by the [option]`she_normal` option. Static tuning is not supported and the plug-in is transparently disabled if the hardware support for this feature is not detected. NOTE: For details about the FSB frequencies and corresponding values, see link:https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-platform-eeepc-laptop[the kernel documentation]. The provided defaults should work for most users. """ def __init__(self, *args, **kwargs): self._cmd = commands() self._control_file = "/sys/devices/platform/eeepc/cpufv" if not os.path.isfile(self._control_file): self._control_file = "/sys/devices/platform/eeepc-wmi/cpufv" if not os.path.isfile(self._control_file): raise exceptions.NotSupportedPluginException("Plugin is not supported on your hardware.") super(EeePCSHEPlugin, self).__init__(*args, **kwargs) @classmethod def _get_config_options(self): return { "load_threshold_normal" : 0.6, "load_threshold_powersave" : 0.4, "she_powersave" : 2, "she_normal" : 1, } def _instance_init(self, instance): instance._has_static_tuning = False instance._has_dynamic_tuning = True instance._she_mode = None instance._load_monitor = self._monitors_repository.create("load", None) def _instance_cleanup(self, instance): if instance._load_monitor is not None: self._monitors_repository.delete(instance._load_monitor) instance._load_monitor = None def _instance_update_dynamic(self, instance, device): load = instance._load_monitor.get_load()["system"] if load <= instance.options["load_threshold_powersave"]: self._set_she_mode(instance, "powersave") elif load >= instance.options["load_threshold_normal"]: self._set_she_mode(instance, "normal") def _instance_unapply_dynamic(self, instance, device): # FIXME: restore previous value self._set_she_mode(instance, "normal") def _set_she_mode(self, instance, new_mode): new_mode_numeric = int(instance.options["she_%s" % new_mode]) if instance._she_mode != new_mode_numeric: log.info("new eeepc_she mode %s (%d) " % (new_mode, new_mode_numeric)) self._cmd.write_to_file(self._control_file, "%s" % new_mode_numeric) self._she_mode = new_mode_numeric PK$2]XXplugins/hotplug.pynu[from . import base import tuned.consts as consts import tuned.logs log = tuned.logs.get() class Plugin(base.Plugin): """ Base class for plugins with device hotpluging support. """ def __init__(self, *args, **kwargs): super(Plugin, self).__init__(*args, **kwargs) def cleanup(self): super(Plugin, self).cleanup() self._hardware_events_cleanup() def _hardware_events_init(self): pass def _hardware_events_cleanup(self): pass def _init_devices(self): self._hardware_events_init() def _hardware_events_callback(self, event, device): if event == "add": log.info("device '%s' added" % device.sys_name) self._add_device(device.sys_name) elif event == "remove": log.info("device '%s' removed" % device.sys_name) self._remove_device(device.sys_name) def _add_device_process(self, instance, device_name): log.info("instance %s: adding new device %s" % (instance.name, device_name)) self._assigned_devices.add(device_name) self._call_device_script(instance, instance.script_pre, "apply", [device_name]) self._added_device_apply_tuning(instance, device_name) self._call_device_script(instance, instance.script_post, "apply", [device_name]) instance.processed_devices.add(device_name) def _add_device(self, device_name): if device_name in (self._assigned_devices | self._free_devices): return for instance_name, instance in list(self._instances.items()): if len(self._get_matching_devices(instance, [device_name])) == 1: self._add_device_process(instance, device_name) break else: log.debug("no instance wants %s" % device_name) self._free_devices.add(device_name) def _add_devices_nocheck(self, instance, device_names): """ Add devices specified by the set to the instance, no check is performed. """ for dev in device_names: self._add_device_process(instance, dev) # This can be a bit racy (we can overcount), # but it shouldn't affect the boolean result instance.active = len(instance.processed_devices) \ + len(instance.assigned_devices) > 0 def _remove_device_process(self, instance, device_name): if device_name in instance.processed_devices: self._call_device_script(instance, instance.script_post, "unapply", [device_name]) self._removed_device_unapply_tuning(instance, device_name) self._call_device_script(instance, instance.script_pre, "unapply", [device_name]) instance.processed_devices.remove(device_name) # This can be a bit racy (we can overcount), # but it shouldn't affect the boolean result instance.active = len(instance.processed_devices) \ + len(instance.assigned_devices) > 0 self._assigned_devices.remove(device_name) return True return False def _remove_device(self, device_name): """Remove device from the instance Parameters: device_name -- name of the device """ if device_name not in (self._assigned_devices | self._free_devices): return for instance in list(self._instances.values()): if self._remove_device_process(instance, device_name): break else: self._free_devices.remove(device_name) def _remove_devices_nocheck(self, instance, device_names): """ Remove devices specified by the set from the instance, no check is performed. """ for dev in device_names: self._remove_device_process(instance, dev) def _added_device_apply_tuning(self, instance, device_name): self._execute_all_device_commands(instance, [device_name]) if instance.has_dynamic_tuning and self._global_cfg.get(consts.CFG_DYNAMIC_TUNING, consts.CFG_DEF_DYNAMIC_TUNING): self._instance_apply_dynamic(instance, device_name) def _removed_device_unapply_tuning(self, instance, device_name): if instance.has_dynamic_tuning and self._global_cfg.get(consts.CFG_DYNAMIC_TUNING, consts.CFG_DEF_DYNAMIC_TUNING): self._instance_unapply_dynamic(instance, device_name) self._cleanup_all_device_commands(instance, [device_name], remove = True) PK$2]L`plugins/plugin_sysctl.pynu[import re from . import base from .decorators import * import tuned.logs from subprocess import * from tuned.utils.commands import commands import tuned.consts as consts import errno import os log = tuned.logs.get() DEPRECATED_SYSCTL_OPTIONS = [ "base_reachable_time", "retrans_time" ] SYSCTL_CONFIG_DIRS = [ "/run/sysctl.d", "/etc/sysctl.d" ] class SysctlPlugin(base.Plugin): """ `sysctl`:: Sets various kernel parameters at runtime. + This plug-in is used for applying custom `sysctl` settings and should only be used to change system settings that are not covered by other *TuneD* plug-ins. If the settings are covered by other *TuneD* plug-ins, use those plug-ins instead. + The syntax for this plug-in is `_key_=_value_`, where `_key_` is the same as the key name provided by the `sysctl` utility. + .Adjusting the kernel runtime kernel.sched_min_granularity_ns value ==== ---- [sysctl] kernel.sched_min_granularity_ns=3000000 ---- ==== """ def __init__(self, *args, **kwargs): super(SysctlPlugin, self).__init__(*args, **kwargs) self._has_dynamic_options = True self._cmd = commands() def _instance_init(self, instance): instance._has_dynamic_tuning = False instance._has_static_tuning = True # FIXME: do we want to do this here? # recover original values in case of crash storage_key = self._storage_key(instance.name) instance._sysctl_original = self._storage.get(storage_key, {}) if len(instance._sysctl_original) > 0: log.info("recovering old sysctl settings from previous run") self._instance_unapply_static(instance) instance._sysctl_original = {} self._storage.unset(storage_key) instance._sysctl = instance.options def _instance_cleanup(self, instance): storage_key = self._storage_key(instance.name) self._storage.unset(storage_key) def _instance_apply_static(self, instance): for option, value in list(instance._sysctl.items()): original_value = self._read_sysctl(option) if original_value is None: log.error("sysctl option %s will not be set, failed to read the original value." % option) else: new_value = self._variables.expand( self._cmd.unquote(value)) new_value = self._process_assignment_modifiers( new_value, original_value) if new_value is not None: instance._sysctl_original[option] = original_value self._write_sysctl(option, new_value) storage_key = self._storage_key(instance.name) self._storage.set(storage_key, instance._sysctl_original) if self._global_cfg.get_bool(consts.CFG_REAPPLY_SYSCTL, consts.CFG_DEF_REAPPLY_SYSCTL): log.info("reapplying system sysctl") self._apply_system_sysctl(instance._sysctl) def _instance_verify_static(self, instance, ignore_missing, devices): ret = True # override, so always skip missing ignore_missing = True for option, value in list(instance._sysctl.items()): curr_val = self._read_sysctl(option) value = self._process_assignment_modifiers(self._variables.expand(value), curr_val) if value is not None: if self._verify_value(option, self._cmd.remove_ws(value), self._cmd.remove_ws(curr_val), ignore_missing) == False: ret = False return ret def _instance_unapply_static(self, instance, rollback = consts.ROLLBACK_SOFT): for option, value in list(instance._sysctl_original.items()): self._write_sysctl(option, value) def _apply_system_sysctl(self, instance_sysctl): files = {} for d in SYSCTL_CONFIG_DIRS: try: flist = os.listdir(d) except OSError: continue for fname in flist: if not fname.endswith(".conf"): continue if fname not in files: files[fname] = d for fname in sorted(files.keys()): d = files[fname] path = "%s/%s" % (d, fname) self._apply_sysctl_config_file(path, instance_sysctl) self._apply_sysctl_config_file("/etc/sysctl.conf", instance_sysctl) def _apply_sysctl_config_file(self, path, instance_sysctl): log.debug("Applying sysctl settings from file %s" % path) try: with open(path, "r") as f: for lineno, line in enumerate(f, 1): self._apply_sysctl_config_line(path, lineno, line, instance_sysctl) log.debug("Finished applying sysctl settings from file %s" % path) except (OSError, IOError) as e: if e.errno != errno.ENOENT: log.error("Error reading sysctl settings from file %s: %s" % (path, str(e))) def _apply_sysctl_config_line(self, path, lineno, line, instance_sysctl): line = line.strip() if len(line) == 0 or line[0] == "#" or line[0] == ";": return tmp = line.split("=", 1) if len(tmp) != 2: log.error("Syntax error in file %s, line %d" % (path, lineno)) return option, value = tmp option = option.strip() if len(option) == 0: log.error("Syntax error in file %s, line %d" % (path, lineno)) return value = value.strip() if option in instance_sysctl: instance_value = self._variables.expand(instance_sysctl[option]) if instance_value != value: log.info("Overriding sysctl parameter '%s' from '%s' to '%s'" % (option, instance_value, value)) self._write_sysctl(option, value, ignore_missing = True) def _get_sysctl_path(self, option): # The sysctl name in sysctl tool and in /proc/sys differs. # All dots (.) in sysctl name are represented by /proc/sys # directories and all slashes in the name (/) are converted # to dots (.) in the /proc/sys filenames. return "/proc/sys/%s" % self._cmd.tr(option, "./", "/.") def _read_sysctl(self, option): path = self._get_sysctl_path(option) try: with open(path, "r") as f: line = "" for i, line in enumerate(f): if i > 0: log.error("Failed to read sysctl parameter '%s', multi-line values are unsupported" % option) return None value = line.strip() log.debug("Value of sysctl parameter '%s' is '%s'" % (option, value)) return value except (OSError, IOError) as e: if e.errno == errno.ENOENT: log.error("Failed to read sysctl parameter '%s', the parameter does not exist" % option) else: log.error("Failed to read sysctl parameter '%s': %s" % (option, str(e))) return None def _write_sysctl(self, option, value, ignore_missing = False): path = self._get_sysctl_path(option) if os.path.basename(path) in DEPRECATED_SYSCTL_OPTIONS: log.error("Refusing to set deprecated sysctl option %s" % option) return False try: log.debug("Setting sysctl parameter '%s' to '%s'" % (option, value)) with open(path, "w") as f: f.write(value) return True except (OSError, IOError) as e: if e.errno == errno.ENOENT: log_func = log.debug if ignore_missing else log.error log_func("Failed to set sysctl parameter '%s' to '%s', the parameter does not exist" % (option, value)) else: log.error("Failed to set sysctl parameter '%s' to '%s': %s" % (option, value, str(e))) return False PK$2]Xƹ __init__.pynu[# # tuned: daemon for monitoring and adaptive tuning of system devices # # Copyright (C) 2008-2013 Red Hat, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # __copyright__ = "Copyright 2008-2013 Red Hat, Inc." __license__ = "GPLv2+" __email__ = "power-management@lists.fedoraproject.org" PK$2]'33utils/profile_recommender.pynu[import os import re import errno import procfs import subprocess from tuned.utils.config_parser import ConfigParser, Error try: import syspurpose.files have_syspurpose = True except: have_syspurpose = False import tuned.consts as consts import tuned.logs from tuned.utils.commands import commands log = tuned.logs.get() class ProfileRecommender: def __init__(self, is_hardcoded = False): self._is_hardcoded = is_hardcoded self._commands = commands() self._chassis_type = None def recommend(self): profile = consts.DEFAULT_PROFILE if self._is_hardcoded: return profile has_root = os.geteuid() == 0 if not has_root: log.warning("Profile recommender is running without root privileges. Profiles with virt recommendation condition will be omitted.") matching = self.process_config(consts.RECOMMEND_CONF_FILE, has_root=has_root) if matching is not None: return matching files = {} for directory in consts.RECOMMEND_DIRECTORIES: contents = [] try: contents = os.listdir(directory) except OSError as e: if e.errno != errno.ENOENT: log.error("error accessing %s: %s" % (directory, e)) for name in contents: path = os.path.join(directory, name) files[name] = path for name in sorted(files.keys()): path = files[name] matching = self.process_config(path, has_root=has_root) if matching is not None: return matching return profile def process_config(self, fname, has_root=True): matching_profile = None syspurpose_error_logged = False try: if not os.path.isfile(fname): return None config = ConfigParser(delimiters=('='), inline_comment_prefixes=('#'), strict=False) config.optionxform = str with open(fname) as f: config.read_file(f, fname) for section in config.sections(): match = True for option in config.options(section): value = config.get(section, option, raw=True) if value == "": value = r"^$" if option == "virt": if not has_root: match = False break if not re.match(value, self._commands.execute(["virt-what"])[1], re.S): match = False elif option == "system": if not re.match(value, self._commands.read_file( consts.SYSTEM_RELEASE_FILE, no_error = True), re.S): match = False elif option[0] == "/": if not os.path.exists(option) or not re.match(value, self._commands.read_file(option), re.S): match = False elif option[0:7] == "process": ps = procfs.pidstats() ps.reload_threads() if len(ps.find_by_regex(re.compile(value))) == 0: match = False elif option == "chassis_type": chassis_type = self._get_chassis_type() if not re.match(value, chassis_type, re.IGNORECASE): match = False elif option == "syspurpose_role": role = "" if have_syspurpose: s = syspurpose.files.SyspurposeStore( syspurpose.files.USER_SYSPURPOSE, raise_on_error = True) try: s.read_file() role = s.contents["role"] except (IOError, OSError, KeyError) as e: if hasattr(e, "errno") and e.errno != errno.ENOENT: log.error("Failed to load the syspurpose\ file: %s" % e) else: if not syspurpose_error_logged: log.error("Failed to process 'syspurpose_role' in '%s'\ , the syspurpose module is not available" % fname) syspurpose_error_logged = True if re.match(value, role, re.IGNORECASE) is None: match = False if match: # remove the ",.*" suffix r = re.compile(r",[^,]*$") matching_profile = r.sub("", section) break except (IOError, OSError, Error) as e: log.error("error processing '%s', %s" % (fname, e)) return matching_profile def _get_chassis_type(self): if self._chassis_type is not None: log.debug("returning cached chassis type '%s'" % self._chassis_type) return self._chassis_type # Check DMI sysfs first # Based on SMBios 3.3.0 specs (https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.3.0.pdf) DMI_CHASSIS_TYPES = ["", "Other", "Unknown", "Desktop", "Low Profile Desktop", "Pizza Box", "Mini Tower", "Tower", "Portable", "Laptop", "Notebook", "Hand Held", "Docking Station", "All In One", "Sub Notebook", "Space-saving", "Lunch Box", "Main Server Chassis", "Expansion Chassis", "Sub Chassis", "Bus Expansion Chassis", "Peripheral Chassis", "RAID Chassis", "Rack Mount Chassis", "Sealed-case PC", "Multi-system", "CompactPCI", "AdvancedTCA", "Blade", "Blade Enclosing", "Tablet", "Convertible", "Detachable", "IoT Gateway", "Embedded PC", "Mini PC", "Stick PC"] try: with open('/sys/devices/virtual/dmi/id/chassis_type', 'r') as sysfs_chassis_type: chassis_type_id = int(sysfs_chassis_type.read()) self._chassis_type = DMI_CHASSIS_TYPES[chassis_type_id] except IndexError: log.error("Unknown chassis type id read from dmi sysfs: %d" % chassis_type_id) except (OSError, IOError) as e: log.warn("error accessing dmi sysfs file: %s" % e) if self._chassis_type: log.debug("chassis type - %s" % self._chassis_type) return self._chassis_type # Fallback - try parsing dmidecode output try: p_dmi = subprocess.Popen(['dmidecode', '-s', 'chassis-type'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True) (dmi_output, dmi_error) = p_dmi.communicate() if p_dmi.returncode: log.error("dmidecode finished with error (ret %d): '%s'" % (p_dmi.returncode, dmi_error)) else: self._chassis_type = dmi_output.strip().decode() except (OSError, IOError) as e: log.warn("error executing dmidecode tool : %s" % e) if not self._chassis_type: log.debug("could not determine chassis type.") self._chassis_type = "" else: log.debug("chassis type - %s" % self._chassis_type) return self._chassis_type PK$2] VFFutils/nettool.pynu[__all__ = ["ethcard"] import tuned.logs from subprocess import * import re log = tuned.logs.get() class Nettool: _advertise_values = { # [ half, full ] 10 : [ 0x001, 0x002 ], 100 : [ 0x004, 0x008 ], 1000 : [ 0x010, 0x020 ], 2500 : [ 0, 0x8000 ], 10000 : [ 0, 0x1000 ], "auto" : 0x03F } _disabled = False def __init__(self, interface): self._interface = interface; self.update() log.debug("%s: speed %s, full duplex %s, autoneg %s, link %s" % (interface, self.speed, self.full_duplex, self.autoneg, self.link)) log.debug("%s: supports: autoneg %s, modes %s" % (interface, self.supported_autoneg, self.supported_modes)) log.debug("%s: advertises: autoneg %s, modes %s" % (interface, self.advertised_autoneg, self.advertised_modes)) # def __del__(self): # if self.supported_autoneg: # self._set_advertise(self._advertise_values["auto"]) def _clean_status(self): self.speed = 0 self.full_duplex = False self.autoneg = False self.link = False self.supported_modes = [] self.supported_autoneg = False self.advertised_modes = [] self.advertised_autoneg = False def _calculate_mode(self, modes): mode = 0; for m in modes: mode += self._advertise_values[m[0]][ 1 if m[1] else 0 ] return mode def _set_autonegotiation(self, enable): if self.autoneg == enable: return True if not self.supported_autoneg: return False return 0 == call(["ethtool", "-s", self._interface, "autoneg", "on" if enable else "off"], close_fds=True) def _set_advertise(self, value): if not self._set_autonegotiation(True): return False return 0 == call(["ethtool", "-s", self._interface, "advertise", "0x%03x" % value], close_fds=True) def get_max_speed(self): max = 0 for mode in self.supported_modes: if mode[0] > max: max = mode[0] if max > 0: return max else: return 1000 def set_max_speed(self): if self._disabled or not self.supported_autoneg: return False #if self._set_advertise(self._calculateMode(self.supported_modes)): if self._set_advertise(self._advertise_values["auto"]): self.update() return True else: return False def set_speed(self, speed): if self._disabled or not self.supported_autoneg: return False mode = 0 for am in self._advertise_values: if am == "auto": continue if am <= speed: mode += self._advertise_values[am][0]; mode += self._advertise_values[am][1]; effective_mode = mode & self._calculate_mode(self.supported_modes) log.debug("%s: set_speed(%d) - effective_mode 0x%03x" % (self._interface, speed, effective_mode)) if self._set_advertise(effective_mode): self.update() return True else: return False def update(self): if self._disabled: return # run ethtool and preprocess output p_ethtool = Popen(["ethtool", self._interface], \ stdout=PIPE, stderr=PIPE, close_fds=True, \ universal_newlines = True) p_filter = Popen(["sed", r"s/^\s*//;s/:\s*/:\n/g"], \ stdin=p_ethtool.stdout, stdout=PIPE, \ universal_newlines = True, \ close_fds=True) output = p_filter.communicate()[0] errors = p_ethtool.communicate()[1] if errors != "": log.warning("%s: some errors were reported by 'ethtool'" % self._interface) log.debug("%s: %s" % (self._interface, errors.replace("\n", r"\n"))) self._clean_status() self._disabled = True return # parses output - kind of FSM self._clean_status() re_speed = re.compile(r"(\d+)") re_mode = re.compile(r"(\d+)baseT/(Half|Full)") state = "wait" for line in output.split("\n"): if line.endswith(":"): section = line[:-1] if section == "Speed": state = "speed" elif section == "Duplex": state = "duplex" elif section == "Auto-negotiation": state = "autoneg" elif section == "Link detected": state = "link" elif section == "Supported link modes": state = "supported_modes" elif section == "Supports auto-negotiation": state = "supported_autoneg" elif section == "Advertised link modes": state = "advertised_modes" elif section == "Advertised auto-negotiation": state = "advertised_autoneg" else: state = "wait" del section elif state == "speed": # Try to determine speed. If it fails, assume 1gbit ethernet try: self.speed = re_speed.match(line).group(1) except: self.speed = 1000 state = "wait" elif state == "duplex": self.full_duplex = line == "Full" state = "wait" elif state == "autoneg": self.autoneg = (line == "yes" or line == "on") state = "wait" elif state == "link": self.link = line == "yes" state = "wait" elif state == "supported_modes": # Try to determine supported modes. If it fails, assume 1gibt ethernet fullduplex works try: for m in line.split(): (s, d) = re_mode.match(m).group(1,2) self.supported_modes.append( (int(s), d == "Full") ) del m,s,d except: self.supported_modes.append((1000, True)) elif state == "supported_autoneg": self.supported_autoneg = line == "Yes" state = "wait" elif state == "advertised_modes": # Try to determine advertised modes. If it fails, assume 1gibt ethernet fullduplex works try: if line != "Not reported": for m in line.split(): (s, d) = re_mode.match(m).group(1,2) self.advertised_modes.append( (int(s), d == "Full") ) del m,s,d except: self.advertised_modes.append((1000, True)) elif state == "advertised_autoneg": self.advertised_autoneg = line == "Yes" state = "wait" def ethcard(interface): if not interface in ethcard.list: ethcard.list[interface] = Nettool(interface) return ethcard.list[interface] ethcard.list = {} PK$2]1@@utils/commands.pynu[import errno import hashlib import tuned.logs import copy import os import shutil import tuned.consts as consts import re from subprocess import * from tuned.exceptions import TunedException log = tuned.logs.get() class commands: def __init__(self, logging = True): self._logging = logging def _error(self, msg): if self._logging: log.error(msg) def _debug(self, msg): if self._logging: log.debug(msg) def get_bool(self, value): v = str(value).upper().strip() return {"Y":"1", "YES":"1", "T":"1", "TRUE":"1", "N":"0", "NO":"0", "F":"0", "FALSE":"0"}.get(v, value) def remove_ws(self, s): return re.sub(r'\s+', ' ', str(s)).strip() def unquote(self, v): return re.sub("^\"(.*)\"$", r"\1", v) # escape escape character (by default '\') def escape(self, s, what_escape = "\\", escape_by = "\\"): return s.replace(what_escape, "%s%s" % (escape_by, what_escape)) # clear escape characters (by default '\') def unescape(self, s, escape_char = "\\"): return s.replace(escape_char, "") # add spaces to align s2 to pos, returns resulting string: s1 + spaces + s2 def align_str(self, s1, pos, s2): return s1 + " " * (pos - len(s1)) + s2 # convert dictionary 'd' to flat list and return it # it uses sort on the dictionary items to return consistent results # for directories with different inserte/delete history def dict2list(self, d): l = [] if d is not None: for i in sorted(d.items()): l += list(i) return l # Compile regex to speedup multiple_re_replace or re_lookup def re_lookup_compile(self, d): if d is None: return None return re.compile("(%s)" % ")|(".join(list(d.keys()))) # Do multiple regex replaces in 's' according to lookup table described by # dictionary 'd', e.g.: d = {"re1": "replace1", "re2": "replace2", ...} # r can be regex precompiled by re_lookup_compile for speedup def multiple_re_replace(self, d, s, r = None, flags = 0): if d is None: if r is None: return s else: if len(d) == 0 or s is None: return s if r is None: r = self.re_lookup_compile(d) return r.sub(lambda mo: list(d.values())[mo.lastindex - 1], s, flags) # Do regex lookup on 's' according to lookup table described by # dictionary 'd' and return corresponding value from the dictionary, # e.g.: d = {"re1": val1, "re2": val2, ...} # r can be regex precompiled by re_lookup_compile for speedup def re_lookup(self, d, s, r = None): if len(d) == 0 or s is None: return None if r is None: r = self.re_lookup_compile(d) mo = r.search(s) if mo: return list(d.values())[mo.lastindex - 1] return None def write_to_file(self, f, data, makedir = False, no_error = False): """Write data to a file. Parameters: f -- filename where to write data -- data to write makedir -- if True and the path doesn't exist, it will be created no_error -- if True errors are silenced, it can be also list of ignored errnos Return: bool -- True on success """ self._debug("Writing to file: '%s' < '%s'" % (f, data)) if makedir: d = os.path.dirname(f) if os.path.isdir(d): makedir = False try: if makedir: os.makedirs(d) fd = open(f, "w") fd.write(str(data)) fd.close() rc = True except (OSError, IOError) as e: rc = False if isinstance(no_error, bool) and not no_error or \ isinstance(no_error, list) and e.errno not in no_error: self._error("Writing to file '%s' error: '%s'" % (f, e)) return rc def read_file(self, f, err_ret = "", no_error = False): old_value = err_ret try: f = open(f, "r") old_value = f.read() f.close() except (OSError,IOError) as e: if not no_error: self._error("Error when reading file '%s': '%s'" % (f, e)) self._debug("Read data from file: '%s' > '%s'" % (f, old_value)) return old_value def rmtree(self, f, no_error = False): self._debug("Removing tree: '%s'" % f) if os.path.exists(f): try: shutil.rmtree(f, no_error) except OSError as error: if not no_error: log.error("cannot remove tree '%s': '%s'" % (f, str(error))) return False return True def unlink(self, f, no_error = False): self._debug("Removing file: '%s'" % f) if os.path.exists(f): try: os.unlink(f) except OSError as error: if not no_error: log.error("cannot remove file '%s': '%s'" % (f, str(error))) return False return True def rename(self, src, dst, no_error = False): self._debug("Renaming file '%s' to '%s'" % (src, dst)) try: os.rename(src, dst) except OSError as error: if not no_error: log.error("cannot rename file '%s' to '%s': '%s'" % (src, dst, str(error))) return False return True def copy(self, src, dst, no_error = False): try: log.debug("copying file '%s' to '%s'" % (src, dst)) shutil.copy(src, dst) return True except IOError as e: if not no_error: log.error("cannot copy file '%s' to '%s': %s" % (src, dst, e)) return False def replace_in_file(self, f, pattern, repl): data = self.read_file(f) if len(data) <= 0: return False; return self.write_to_file(f, re.sub(pattern, repl, data, flags = re.MULTILINE)) # do multiple replaces in file 'f' by using dictionary 'd', # e.g.: d = {"re1": val1, "re2": val2, ...} def multiple_replace_in_file(self, f, d): data = self.read_file(f) if len(data) <= 0: return False; return self.write_to_file(f, self.multiple_re_replace(d, data, flags = re.MULTILINE)) # makes sure that options from 'd' are set to values from 'd' in file 'f', # when needed it edits options or add new options if they don't # exist and 'add' is set to True, 'd' has the following form: # d = {"option_1": value_1, "option_2": value_2, ...} def add_modify_option_in_file(self, f, d, add = True): data = self.read_file(f) for opt in d: o = str(opt) v = str(d[opt]) if re.search(r"\b" + o + r"\s*=.*$", data, flags = re.MULTILINE) is None: if add: if len(data) > 0 and data[-1] != "\n": data += "\n" data += "%s=\"%s\"\n" % (o, v) else: data = re.sub(r"\b(" + o + r"\s*=).*$", r"\1" + "\"" + self.escape(v) + "\"", data, flags = re.MULTILINE) return self.write_to_file(f, data) # calcualtes md5sum of file 'f' def md5sum(self, f): data = self.read_file(f) return hashlib.md5(str(data).encode("utf-8")).hexdigest() # calcualtes sha256sum of file 'f' def sha256sum(self, f): data = self.read_file(f) return hashlib.sha256(str(data).encode("utf-8")).hexdigest() # returns machine ID or empty string "" in case of error def get_machine_id(self, no_error = True): return self.read_file(consts.MACHINE_ID_FILE, no_error).strip() # "no_errors" can be list of return codes not treated as errors, if 0 is in no_errors, it means any error # returns (retcode, out), where retcode is exit code of the executed process or -errno if # OSError or IOError exception happened def execute(self, args, shell = False, cwd = None, env = {}, no_errors = [], return_err = False): retcode = 0 _environment = os.environ.copy() _environment["LC_ALL"] = "C" _environment.update(env) self._debug("Executing %s." % str(args)) out = "" err_msg = None try: proc = Popen(args, stdout = PIPE, stderr = PIPE, \ env = _environment, \ shell = shell, cwd = cwd, \ close_fds = True, \ universal_newlines = True) out, err = proc.communicate() retcode = proc.returncode if retcode and not retcode in no_errors and not 0 in no_errors: err_out = err[:-1] if len(err_out) == 0: err_out = out[:-1] err_msg = "Executing '%s' error: %s" % (' '.join(args), err_out) if not return_err: self._error(err_msg) except (OSError, IOError) as e: retcode = -e.errno if e.errno is not None else -1 if not abs(retcode) in no_errors and not 0 in no_errors: err_msg = "Executing '%s' error: %s" % (' '.join(args), e) if not return_err: self._error(err_msg) if return_err: return retcode, out, err_msg else: return retcode, out # Helper for parsing kernel options like: # [always] never # It will return 'always' def get_active_option(self, options, dosplit = True): m = re.match(r'.*\[([^\]]+)\].*', options) if m: return m.group(1) if dosplit: return options.split()[0] return options # Checks whether CPU is online def is_cpu_online(self, cpu): scpu = str(cpu) # CPU0 is always online return cpu == "0" or self.read_file("/sys/devices/system/cpu/cpu%s/online" % scpu, no_error = True).strip() == "1" # Converts hexadecimal CPU mask to CPU list def hex2cpulist(self, mask): if mask is None: return None mask = str(mask).replace(",", "") try: m = int(mask, 16) except ValueError: log.error("invalid hexadecimal mask '%s'" % str(mask)) return [] return self.bitmask2cpulist(m) # Converts an integer bitmask to a list of cpus (e.g. [0,3,4]) def bitmask2cpulist(self, mask): cpu = 0 cpus = [] while mask > 0: if mask & 1: cpus.append(cpu) mask >>= 1 cpu += 1 return cpus # Unpacks CPU list, i.e. 1-3 will be converted to 1, 2, 3, supports # hexmasks that needs to be prefixed by "0x". Hexmasks can have commas, # which will be removed. If combining hexmasks with CPU list they need # to be separated by ",,", e.g.: 0-3, 0xf,, 6. It also supports negation # cpus by specifying "^" or "!", e.g.: 0-5, ^3, will output the list as # "0,1,2,4,5" (excluding 3). Note: negation supports only cpu numbers. # If "strip_chars" is not None and l is not list, we try strip characters. # It should be string with list of chars that is send to string.strip method # Default is english single and double quotes ("') rhbz#1891036 def cpulist_unpack(self, l, strip_chars='\'"'): rl = [] if l is None: return l ll = l if type(ll) is not list: if strip_chars is not None: ll = str(ll).strip(strip_chars) ll = str(ll).split(",") ll2 = [] negation_list = [] hexmask = False hv = "" # Remove commas from hexmasks for v in ll: sv = str(v) if hexmask: if len(sv) == 0: hexmask = False ll2.append(hv) hv = "" else: hv += sv else: if sv[0:2].lower() == "0x": hexmask = True hv = sv elif sv and (sv[0] == "^" or sv[0] == "!"): nl = sv[1:].split("-") try: if (len(nl) > 1): negation_list += list(range( int(nl[0]), int(nl[1]) + 1 ) ) else: negation_list.append(int(sv[1:])) except ValueError: return [] else: if len(sv) > 0: ll2.append(sv) if len(hv) > 0: ll2.append(hv) for v in ll2: vl = v.split("-") if v[0:2].lower() == "0x": rl += self.hex2cpulist(v) else: try: if len(vl) > 1: rl += list(range(int(vl[0]), int(vl[1]) + 1)) else: rl.append(int(vl[0])) except ValueError: return [] cpu_list = sorted(list(set(rl))) # Remove negated cpus after expanding for cpu in negation_list: if cpu in cpu_list: cpu_list.remove(cpu) return cpu_list # Packs CPU list, i.e. 1, 2, 3 will be converted to 1-3. It unpacks the # CPU list through cpulist_unpack first, so see its description about the # details of the input syntax def cpulist_pack(self, l): l = self.cpulist_unpack(l) if l is None or len(l) == 0: return l i = 0 j = i rl = [] while i + 1 < len(l): if l[i + 1] - l[i] != 1: if j != i: rl.append(str(l[j]) + "-" + str(l[i])) else: rl.append(str(l[i])) j = i + 1 i += 1 if j + 1 < len(l): rl.append(str(l[j]) + "-" + str(l[-1])) else: rl.append(str(l[-1])) return rl # Inverts CPU list (i.e. makes its complement) def cpulist_invert(self, l): cpus = self.cpulist_unpack(l) online = self.cpulist_unpack(self.read_file("/sys/devices/system/cpu/online")) return list(set(online) - set(cpus)) # Converts CPU list to hexadecimal CPU mask def cpulist2hex(self, l): if l is None: return None ul = self.cpulist_unpack(l) if ul is None: return None m = self.cpulist2bitmask(ul) s = "%x" % m ls = len(s) if ls % 8 != 0: ls += 8 - ls % 8 s = s.zfill(ls) return ",".join(s[i:i + 8] for i in range(0, len(s), 8)) def cpulist2bitmask(self, l): m = 0 for v in l: m |= pow(2, v) return m def cpulist2string(self, l, prefix = ""): return ",".join((prefix + str(v)) for v in l) # Converts string s consisting of "dev1,dev2,dev3,..." to list ["dev1", "dev2, "dev3", ...], # whitespaces are ignored, cpu lists are supported with the prefix "cpulist:", e.g. # "cpulist:0-2,4" is converted to ["cpu0", "cpu1", "cpu2", "cpu4"]. If device name starts # with "cpulist:" write it as "cpulist:cpulist:". Escape commas in name with the "\,". def devstr2devs(self, s): if s[0:8].lower() == "cpulist:": s = s[8:] if s[0:8].lower() != "cpulist:": return [("cpu" + str(v)) for v in self.cpulist_unpack(s)] l = re.split(r"\s*(?[^' + delims + r'\s][^' + delims + ']*)' r'\s*(?P[' + delims + r'])\s*' r'(?P.*)$' ) self.OPTCRE_NV = re.compile( r'(?P