Linux business57.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
LiteSpeed
Server IP : 199.188.201.191 & Your IP : 3.14.152.212
Domains :
Cant Read [ /etc/named.conf ]
User : derozboy
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib /
python3.6 /
site-packages /
tuned /
plugins /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2025-03-13 08:41
instance
[ DIR ]
drwxr-xr-x
2025-03-13 08:41
__init__.py
49
B
-rw-r--r--
2024-02-22 12:23
base.py
21.89
KB
-rw-r--r--
2024-02-22 12:23
decorators.py
983
B
-rw-r--r--
2024-02-22 12:23
exceptions.py
99
B
-rw-r--r--
2024-02-22 12:23
hotplug.py
3.84
KB
-rw-r--r--
2024-02-22 12:23
plugin_acpi.py
2.39
KB
-rw-r--r--
2024-02-22 12:23
plugin_audio.py
3.13
KB
-rw-r--r--
2024-02-22 12:23
plugin_bootloader.py
25.31
KB
-rw-r--r--
2024-02-22 12:23
plugin_cpu.py
27.56
KB
-rw-r--r--
2024-02-22 12:23
plugin_disk.py
16.65
KB
-rw-r--r--
2025-03-11 07:42
plugin_eeepc_she.py
2.88
KB
-rw-r--r--
2024-02-22 12:23
plugin_irqbalance.py
3.47
KB
-rw-r--r--
2024-02-22 12:23
plugin_modules.py
4.81
KB
-rw-r--r--
2024-02-22 12:23
plugin_mounts.py
5.45
KB
-rw-r--r--
2024-02-22 12:23
plugin_net.py
22.71
KB
-rw-r--r--
2024-02-22 12:23
plugin_rtentsk.py
1.08
KB
-rw-r--r--
2024-02-22 12:23
plugin_scheduler.py
54.94
KB
-rw-r--r--
2024-02-22 12:23
plugin_script.py
3.76
KB
-rw-r--r--
2024-02-22 12:23
plugin_scsi_host.py
3.08
KB
-rw-r--r--
2024-02-22 12:23
plugin_selinux.py
2.27
KB
-rw-r--r--
2024-02-22 12:23
plugin_service.py
10.47
KB
-rw-r--r--
2024-02-22 12:23
plugin_sysctl.py
6.74
KB
-rw-r--r--
2024-02-22 12:23
plugin_sysfs.py
2.63
KB
-rw-r--r--
2024-02-22 12:23
plugin_systemd.py
5.3
KB
-rw-r--r--
2024-02-22 12:23
plugin_uncore.py
4.61
KB
-rw-r--r--
2024-02-22 12:23
plugin_usb.py
1.97
KB
-rw-r--r--
2024-02-22 12:23
plugin_video.py
3.72
KB
-rw-r--r--
2024-02-22 12:23
plugin_vm.py
3.48
KB
-rw-r--r--
2024-02-22 12:23
repository.py
1.49
KB
-rw-r--r--
2024-02-22 12:23
Save
Rename
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