Current Path: > > usr > lib > python3.6 > site-packages > tuned > monitors
Operation : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64 Software : Apache Server IP : 198.54.126.42 | Your IP: 216.73.216.8 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
__pycache__ | Directory | - | - | |
__init__.py | File | 46 bytes | February 22 2024 12:23:28. | |
base.py | File | 2922 bytes | February 22 2024 12:23:28. | |
monitor_disk.py | File | 886 bytes | February 22 2024 12:23:28. | |
monitor_load.py | File | 306 bytes | February 22 2024 12:23:28. | |
monitor_net.py | File | 1171 bytes | February 22 2024 12:23:28. | |
repository.py | File | 831 bytes | February 22 2024 12:23:28. |
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()))
SILENT KILLER Tool