OXIESEC PANEL
- Current Dir:
/
/
lib
/
python3.9
/
site-packages
/
tuned
/
plugins
/
__pycache__
Server IP: 2a02:4780:11:1594:0:ef5:22d7:a
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/13/2025 09:25:13 PM
rwxr-xr-x
📄
__init__.cpython-39.opt-1.pyc
209 bytes
12/02/2024 09:49:29 AM
rw-r--r--
📄
__init__.cpython-39.pyc
209 bytes
12/02/2024 09:49:29 AM
rw-r--r--
📄
base.cpython-39.opt-1.pyc
21.86 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
base.cpython-39.pyc
21.86 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
decorators.cpython-39.opt-1.pyc
1.08 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
decorators.cpython-39.pyc
1.08 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
exceptions.cpython-39.opt-1.pyc
394 bytes
12/02/2024 09:49:29 AM
rw-r--r--
📄
exceptions.cpython-39.pyc
394 bytes
12/02/2024 09:49:29 AM
rw-r--r--
📄
hotplug.cpython-39.opt-1.pyc
4.27 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
hotplug.cpython-39.pyc
4.27 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_acpi.cpython-39.opt-1.pyc
3.36 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_acpi.cpython-39.pyc
3.36 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_audio.cpython-39.opt-1.pyc
4.07 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_audio.cpython-39.pyc
4.07 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_bootloader.cpython-39.opt-1.pyc
24.46 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_bootloader.cpython-39.pyc
24.46 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_cpu.cpython-39.opt-1.pyc
27.42 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_cpu.cpython-39.pyc
27.44 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_disk.cpython-39.opt-1.pyc
16.46 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_disk.cpython-39.pyc
16.46 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_eeepc_she.cpython-39.opt-1.pyc
3.68 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_eeepc_she.cpython-39.pyc
3.68 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_irq.cpython-39.opt-1.pyc
9.02 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_irq.cpython-39.pyc
9.02 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_irqbalance.cpython-39.opt-1.pyc
4.69 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_irqbalance.cpython-39.pyc
4.69 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_modules.cpython-39.opt-1.pyc
5.5 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_modules.cpython-39.pyc
5.5 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_mounts.cpython-39.opt-1.pyc
5.59 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_mounts.cpython-39.pyc
5.59 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_net.cpython-39.opt-1.pyc
23.2 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_net.cpython-39.pyc
23.2 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_rtentsk.cpython-39.opt-1.pyc
1.37 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_rtentsk.cpython-39.pyc
1.37 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_scheduler.cpython-39.opt-1.pyc
53.13 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_scheduler.cpython-39.pyc
53.13 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_script.cpython-39.opt-1.pyc
4.46 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_script.cpython-39.pyc
4.5 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_scsi_host.cpython-39.opt-1.pyc
4.64 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_scsi_host.cpython-39.pyc
4.64 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_selinux.cpython-39.opt-1.pyc
3.07 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_selinux.cpython-39.pyc
3.07 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_service.cpython-39.opt-1.pyc
13.56 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_service.cpython-39.pyc
13.56 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_sysctl.cpython-39.opt-1.pyc
6.15 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_sysctl.cpython-39.pyc
6.15 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_sysfs.cpython-39.opt-1.pyc
3.72 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_sysfs.cpython-39.pyc
3.72 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_systemd.cpython-39.opt-1.pyc
6 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_systemd.cpython-39.pyc
6 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_uncore.cpython-39.opt-1.pyc
5.86 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_uncore.cpython-39.pyc
5.86 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_usb.cpython-39.opt-1.pyc
3.01 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_usb.cpython-39.pyc
3.01 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_video.cpython-39.opt-1.pyc
6.1 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_video.cpython-39.pyc
6.1 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_vm.cpython-39.opt-1.pyc
4.12 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
plugin_vm.cpython-39.pyc
4.12 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
repository.cpython-39.opt-1.pyc
1.93 KB
12/02/2024 09:49:29 AM
rw-r--r--
📄
repository.cpython-39.pyc
1.97 KB
12/02/2024 09:49:29 AM
rw-r--r--
Editing: plugin_net.cpython-39.pyc
Close
a �Գf[ � @ sp d dl Z ddlmZ ddlT d dlZd dlmZ d dlm Z d dl Z d dlZej� � ZdZG dd � d ej�ZdS ) � N� )�hotplug)�*)�ethcard)�commandsZpumbagsdc s: e Zd ZdZ� fdd�Zdd� Zdd� Zdd � Zd d� Z� fdd �Z dd� Z dd� Zedd� �Z edd� �Zedd� �Zedd� �Zedd� �Zdd� Zdd� Zd d!� Zd"d#� Zd$d%� Zd&d'� Zd(d)� Zed*d+� �Zed,d-d.�d/d0� �Zed,�dkd2d3��Zed4�d5d6� �Zed4�d7d8� �Zg fd9d:�Z dld<d=�Z!ed>d-d.�d?d@� �Z"dAdB� Z#ed>�dmdCdD��Z$edEd-d.�dFdG� �Z%edE�dndHdI��Z&dJdK� Z'dLdM� Z(dNdO� Z)dPdQ� Z*dRdS� Z+dTdU� Z,dVdW� Z-dodXdY�Z.dZd[� Z/e0d\d-d.�d]d^� �Z1e0d_d-d.�d`da� �Z2e0dbd-d.�dcdd� �Z3e0ded-d.�dfdg� �Z4e0dhd-d.�didj� �Z5� Z6S )p�NetTuningPlugina� `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 ---- ==== c s: t t| �j|i |�� d| _d| _t� | _i | _d| _d S )Ng�������?� T) �superr �__init__�_load_smallest�_level_stepsr �_cmd�_re_ip_link_show�_use_ip)�self�args�kwargs�� __class__� �</usr/lib/python3.9/site-packages/tuned/plugins/plugin_net.pyr � s zNetTuningPlugin.__init__c C sd d| _ t� | _t� | _t�d�}| j�d�D ]}|�|j �r,| j� |j� q,t� dt| j� � d S )NTz(?!.*/virtual/.*)�netzdevices: %s)Z_devices_supported�setZ _free_devicesZ_assigned_devices�re�compile�_hardware_inventoryZget_devices�matchZdevice_path�addZsys_name�log�debug�str)r Zre_not_virtual�devicer r r � _init_devices� s zNetTuningPlugin._init_devicesc s � fdd�|D �S )Nc s g | ]}� j �d |��qS )r )r Z get_device��.0�x�r r r � <listcomp>� � z7NetTuningPlugin._get_device_objects.<locals>.<listcomp>r )r Zdevicesr r&