<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
3
<eZ                 @   sp   d dl Z ddlmZ ddlT d dlZd dlmZ d dlm	Z	 d dl
Z
d dlZejj ZdZG dd	 d	ejZdS )
    N   )hotplug)*)ethcard)commandsZpumbagsdc                   s.  e Zd ZdZ fddZdd Zdd Zdd	 Zd
d Zdd Z	dd Z
edd Zedd Zedd Zedd Zedd Zdd Zdd Zdd Zd d! Zd"d# Zd$d% Zd&d' Zed(d) Zed*d+d,d-d. Zed*did0d1Zed2d3d4 Zed2d5d6 Zg fd7d8Zdjd:d;Z ed<d+d,d=d> Z!d?d@ Z"ed<dkdAdBZ#edCd+d,dDdE Z$edCdldFdGZ%dHdI Z&dJdK Z'dLdM Z(dNdO Z)dPdQ Z*dRdS Z+dTdU Z,dmdVdWZ-dXdY Z.e/dZd+d,d[d\ Z0e/d]d+d,d^d_ Z1e/d`d+d,dadb Z2e/dcd+d,ddde Z3e/dfd+d,dgdh Z4  Z5S )n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                s6   t t| j|| 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.6/plugin_net.pyr
      s    zNetTuningPlugin.__init__c             C   sh   d| _ t | _t | _tjd}x.| jjdD ]}|j|j	r.| jj
|j q.W tjdt| j  d S )NTz(?!.*/virtual/.*)netzdevices: %s)Z_devices_supportedsetZ_free_devicesZ_assigned_devicesrecompile_hardware_inventoryZget_devicesmatchZdevice_pathaddZsys_namelogdebugstr)r   Zre_not_virtualdevicer   r   r   _init_devices   s    
zNetTuningPlugin._init_devicesc                s    fdd|D S )Nc                s   g | ]} j jd |qS )r   )r   Z
get_device).0x)r   r   r   
<listcomp>   s    z7NetTuningPlugin._get_device_objects.<locals>.<listcomp>r   )r   Zdevicesr   )r   r   _get_device_objects   s    z#NetTuningPlugin._get_device_objectsc             C   sX   d|_ | j|jd r<d|_| jjd|j|_i |_i |_	nd|_d |_d |_d |_	d S )NTdynamicr   F)
Z_has_static_tuningZ_option_boolZoptionsZ_has_dynamic_tuning_monitors_repositoryZcreateZassigned_devices_load_monitor_idle_stats)r   instancer   r   r   _instance_init   s    zNetTuningPlugin._instance_initc             C   s"   |j d k	r| jj|j  d |_ d S )N)r(   r'   delete)r   r+   r   r   r   _instance_cleanup   s    
z!NetTuningPlugin._instance_cleanupc             C   s   | j || d S )N)_instance_update_dynamic)r   r+   r    r   r   r   _instance_apply_dynamic   s    z'NetTuningPlugin._instance_apply_dynamicc             C   s<  dd |j j|D }|d kr"d S ||jkr8| j|| | j||| | j|| |j| }|j| }|d dkr|d | jkr|d | jkrd|d< tj	d|  t
|jd	 nF|d dkr|d dks|d dkrd|d< tj	d
|  t
|j  tjd||d |d f  tjd||d |d |d f  d S )Nc             S   s   g | ]}t |qS r   )int)r"   valuer   r   r   r$      s    z<NetTuningPlugin._instance_update_dynamic.<locals>.<listcomp>levelr   readwriter   z%s: setting 100Mbpsd   z%s: setting max speedz %s load: read %0.2f, write %0.2fz$%s idle: read %d, write %d, level %d)r(   Zget_device_loadr*   _init_stats_and_idle_update_stats_update_idler)   r   r   infor   Z	set_speedset_max_speedr   )r   r+   r    loadZstatsZidler   r   r   r/      s&    


($z(NetTuningPlugin._instance_update_dynamicc             C   s2   d d d d d d d d d d d d d d d d d d d d d d dS )N)zadaptive-rxzadaptive-txzrx-usecsz	rx-frameszrx-usecs-irqzrx-frames-irqztx-usecsz	tx-framesztx-usecs-irqztx-frames-irqzstats-block-usecszpkt-rate-lowzrx-usecs-lowzrx-frames-lowztx-usecs-lowztx-frames-lowzpkt-rate-highzrx-usecs-highzrx-frames-highztx-usecs-highztx-frames-highzsample-intervalr   )clsr   r   r   _get_config_options_coalesce   s,    z,NetTuningPlugin._get_config_options_coalescec             C   s   d d d dS )N)autonegrxtxr   )r=   r   r   r   _get_config_options_pause   s    z)NetTuningPlugin._get_config_options_pausec             C   s   d d d d dS )N)r@   zrx-minizrx-jumborA   r   )r=   r   r   r   _get_config_options_ring   s    z(NetTuningPlugin._get_config_options_ringc             C   s   d d d d dS )N)r@   rA   othercombinedr   )r=   r   r   r   _get_config_options_channels  s    z,NetTuningPlugin._get_config_options_channelsc             C   s   dd d d d d d d d d d
S )NT)
r&   wake_on_lannf_conntrack_hashsizefeaturescoalescepauseringchannels
txqueuelenmtur   )r=   r   r   r   _get_config_options  s    z#NetTuningPlugin._get_config_optionsc             C   sF   | j t|j }ddg d|dg d|j|< dddd|j|< d S )N   r      r   )newmax)r3   r4   r5   )_calc_speedr   Zget_max_speedr*   r)   )r   r+   r    Z	max_speedr   r   r   r7     s    z$NetTuningPlugin._init_stats_and_idlec             C   s   |j | d  |j | d< }||j | d< dd t||D }||j | d< |j | d }dd t||D }||j | d< t|d t|d  |j | d	< t|d
 t|d
  |j | d< d S )NrS   oldc             S   s   g | ]}|d  |d  qS )r   r   r   )r"   Znew_oldr   r   r   r$   (  s    z1NetTuningPlugin._update_stats.<locals>.<listcomp>diffrT   c             S   s   g | ]}t |qS r   )rT   )r"   Zpairr   r   r   r$   -  s    r   r4   rR   r5   )r*   zipfloat)r   r+   r    Znew_loadZold_loadrW   Zold_max_loadZmax_loadr   r   r   r8   "  s    "zNetTuningPlugin._update_statsc             C   sL   xFdD ]>}|j | | | jk r6|j| |  d7  < qd|j| |< qW d S )Nr4   r5   r   r   )r4   r5   )r*   r   r)   )r   r+   r    Z	operationr   r   r   r9   4  s    
zNetTuningPlugin._update_idlec             C   sH   ||j krD|j | d dkrDd|j | d< tjd|  t|j  d S )Nr3   r   z%s: setting max speed)r)   r   r:   r   r;   )r   r+   r    r   r   r   _instance_unapply_dynamic<  s    z)NetTuningPlugin._instance_unapply_dynamicc             C   s   t d| d S )Ng333333?i      g333333@g333333#A)r1   )r   Zspeedr   r   r   rU   B  s    zNetTuningPlugin._calc_speedc             C   s   | j j|}ttjdd|j }t|}|d dkrPtjd|t|f  d S |dkr^t	 S t	t
t|d d d |dd d S )Nz (:\s*)|(\s+)|(\s*;\s*)|(\s*,\s*) rR   r   zinvalid %s parameter: '%s'r   )Z
_variablesexpandr   r   subsplitlenr   errordictlistrX   )r   r2   contextvZlvr   r   r   _parse_config_parametersK  s    z(NetTuningPlugin._parse_config_parametersc             C   s|   | j jddddddddd	d
ddddddddd|}dd |jdD }t|dk rXd S tdd dd |dd  D D S )Nzadaptive-rx:z
adaptive-tx:zrx-frames-low:zrx-frames-high:ztx-frames-low:ztx-frames-high:zlro:zrx:ztx:zsg:ztso:zufo:zgso:zgro:zrxvlan:ztxvlan:zntuple:zrxhash:)zAdaptive RX:z\s+TX:zrx-frame-low:zrx-frame-high:ztx-frame-low:ztx-frame-high:zlarge-receive-offload:zrx-checksumming:ztx-checksumming:zscatter-gather:ztcp-segmentation-offload:zudp-fragmentation-offload:zgeneric-segmentation-offload:zgeneric-receive-offload:zrx-vlan-offload:ztx-vlan-offload:zntuple-filters:zreceive-hashing:c             S   s2   g | ]*}t t|d krtjdt| r|qS )r   z
\[fixed\]$)r`   r   r   search)r"   re   r   r   r   r$   s  s    z<NetTuningPlugin._parse_device_parameters.<locals>.<listcomp>
rR   c             S   s   g | ]}t |d kr|qS )rR   )r`   )r"   ur   r   r   r$   x  s    c             S   s   g | ]}t jd t|qS )z:\s*)r   r_   r   )r"   re   r   r   r   r$   x  s    r   )r   multiple_re_replacer_   r`   rb   )r   r2   Zvlr   r   r   _parse_device_parametersZ  s0    z(NetTuningPlugin._parse_device_parametersc             C   s   dS )Nz,/sys/module/nf_conntrack/parameters/hashsizer   )r   r   r   r   _nf_conntrack_hashsize_pathz  s    z+NetTuningPlugin._nf_conntrack_hashsize_pathrG   T)Z
per_devicec             C   s^   |d krd S t jddt|}t jdt d |s@tjd d S |sZ| jjdd|d|g |S )	N0dz^[z]+$zIncorrect 'wake_on_lan' value.ethtoolz-sZwol)	r   r^   r   r   
WOL_VALUESr   warnr   execute)r   r2   r    simremover   r   r   _set_wake_on_lan~  s    
z NetTuningPlugin._set_wake_on_lanFc             C   sX   d }y:t jdt d | jjd|gd t j}|r<|jd}W n tk
rR   Y nX |S )Nz.*Wake-on:\s*([z]+).*ro   r   )r   r   rp   r   rr   SgroupIOError)r   r    ignore_missingr2   mr   r   r   _get_wake_on_lan  s    (z NetTuningPlugin._get_wake_on_lanrH   c             C   sN   |d krd S t |}|dkrF|sB| jj| j ||r:tjgndd |S d S d S )Nr   F)Zno_error)r1   r   Zwrite_to_filerl   errnoENOENT)r   r2   rs   rt   Zhashsizer   r   r   _set_nf_conntrack_hashsize  s    z*NetTuningPlugin._set_nf_conntrack_hashsizec             C   s(   | j j| j }t|dkr$t|S d S )Nr   )r   Z	read_filerl   r`   r1   )r   r2   r   r   r   _get_nf_conntrack_hashsize  s    z*NetTuningPlugin._get_nf_conntrack_hashsizec             C   sz   | j s
d S ddg| }| jj|tjgdd\}}}|tj krRtjd d| _ d S |rvtjd tjd||f  d S |S )	NZiplinkT)	no_errorsZ
return_errz0ip command not found, ignoring for other devicesFzProblem calling ip commandz(rc: %s, msg: '%s'))	r   r   rr   r|   r}   r   rq   r:   r   )r   r   ZrcoutZerr_msgr   r   r   _call_ip_link  s    

zNetTuningPlugin._call_ip_linkNc             C   s   dg}|r|j | | j|S )NZshow)appendr   )r   r    r   r   r   r   _ip_link_show  s    
zNetTuningPlugin._ip_link_showrN   c             C   sr   |d krd S yt | W n" tk
r:   tjd|  d S X |sn| jdd|d|g}|d krntjd|  d S |S )Nz$txqueuelen value '%s' is not integerr   devrN   z%Cannot set txqueuelen for device '%s')r1   
ValueErrorr   rq   r   )r   r2   r    rs   rt   resr   r   r   _set_txqueuelen  s    zNetTuningPlugin._set_txqueuelenc             C   s(   || j krtjd| | j |< | j | S )z@
		Return regex for int arg value from "ip link show" command
		z.*\s+%s\s+(\d+))r   r   r   )r   argr   r   r   _get_re_ip_link_show  s    
z$NetTuningPlugin._get_re_ip_link_showc             C   s`   | j |}|d kr(|s$tjd|  d S | jdj|}|d krV|sRtjd|  d S |jdS )NzECannot get 'ip link show' result for txqueuelen value for device '%s'ZqlenzFCannot get txqueuelen value from 'ip link show' result for device '%s'r   )r   r   r:   r   rg   rw   )r   r    ry   r   r   r   r   r   _get_txqueuelen  s    
zNetTuningPlugin._get_txqueuelenrO   c             C   sr   |d krd S yt | W n" tk
r:   tjd|  d S X |sn| jdd|d|g}|d krntjd|  d S |S )Nzmtu value '%s' is not integerr   r   rO   zCannot set mtu for device '%s')r1   r   r   rq   r   )r   r2   r    rs   rt   r   r   r   r   _set_mtu  s    zNetTuningPlugin._set_mtuc             C   s`   | j |}|d kr(|s$tjd|  d S | jdj|}|d krV|sRtjd|  d S |jdS )Nz>Cannot get 'ip link show' result for mtu value for device '%s'rO   z?Cannot get mtu value from 'ip link show' result for device '%s'r   )r   r   r:   r   rg   rw   )r   r    ry   r   r   r   r   r   _get_mtu  s    
zNetTuningPlugin._get_mtuc             C   sl   |dkrdS t |j }| j| j| j| jd}t ||  j }|j|shtjd|t	|| f  dS dS )NrI   T)rJ   rK   rL   rM   zunknown %s parameter(s): %sF)
r   keysr>   rB   rC   rF   issubsetr   ra   r   )r   rd   rn   ZparamsZsupported_getterZ	supportedr   r   r   _check_parameters
  s    

z!NetTuningPlugin._check_parametersc             C   sR   | j jdddd|}|jddd  }dd |D }td	d d
d |D D S )Nr?   r@   rA   )ZAutonegotiateRXTXrh   r   c             S   s&   g | ]}|d krt jd| r|qS ) z	\[fixed\])r   rg   )r"   r#   r   r   r   r$     s    z;NetTuningPlugin._parse_pause_parameters.<locals>.<listcomp>c             S   s   g | ]}t |d kr|qS )rR   )r`   )r"   r#   r   r   r   r$      s    c             S   s   g | ]}t jd |qS )z:\s*)r   r_   )r"   r#   r   r   r   r$      s    )r   rj   r_   rb   )r   slr   r   r   _parse_pause_parameters  s    z'NetTuningPlugin._parse_pause_parametersc             C   sj   t jd|t jd}|d }| jjddddd|}|jd	}d
d |D }dd dd |D D }t|S )Nz^Current hardware settings:$)flagsr   r@   zrx-minizrx-jumborA   )r   zRX MinizRX Jumbor   rh   c             S   s   g | ]}|d kr|qS )r   r   )r"   r#   r   r   r   r$   ,  s    z:NetTuningPlugin._parse_ring_parameters.<locals>.<listcomp>c             S   s   g | ]}t |d kr|qS )rR   )r`   )r"   r#   r   r   r   r$   -  s    c             S   s   g | ]}t jd |qS )z:\s*)r   r_   )r"   r#   r   r   r   r$   -  s    )r   r_   	MULTILINEr   rj   rb   )r   r   ar   r   r   r   _parse_ring_parameters#  s    
z&NetTuningPlugin._parse_ring_parametersc             C   sj   t jd|t jd}|d }| jjddddd|}|jd	}d
d |D }dd dd |D D }t|S )Nz^Current hardware settings:$)r   r   r@   rA   rD   rE   )r   r   ZOtherZCombinedrh   c             S   s   g | ]}|d kr|qS )r   r   )r"   r#   r   r   r   r$   :  s    z>NetTuningPlugin._parse_channels_parameters.<locals>.<listcomp>c             S   s   g | ]}t |d kr|qS )rR   )r`   )r"   r#   r   r   r   r$   ;  s    c             S   s   g | ]}t jd |qS )z:\s*)r   r_   )r"   r#   r   r   r   r$   ;  s    )r   r_   r   r   rj   rb   )r   r   r   r   r   r   r   _parse_channels_parameters1  s    
z*NetTuningPlugin._parse_channels_parametersc             C   sz   g }d|kr(|j d|d d|d g n,ttt|d t|d }|j d|g ttt|d d d |dd d S )NrE   r@   r   rA      rR   )extendr   rT   r1   rb   rc   rX   )r   rd   Zparams_list
dev_paramsZmod_params_listZcntr   r   r   _replace_channels_parameters>  s    z,NetTuningPlugin._replace_channels_parametersc       	      C   sR   t |j }t |j }|| }x,|D ]$}tjd|||f  |j|d q&W dS )a  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
		z-%s parameter %s is not supported by device %sN)r   r   r   Zwarningpop)	r   rd   Z
parametersr    r   Zsupported_parametersZparameters_to_changeZunsupported_parametersparamr   r   r   _check_device_supportG  s    	

z%NetTuningPlugin._check_device_supportc       
      C   s   dddddd}|| }| j jd||g\}}|dksBt|dkrFd S | j| j| j| j| jd}|| }||}	|d	kr| j||	 rd S |	S )
Nz-cz-kz-az-gz-l)rJ   rI   rK   rL   rM   ro   r   rJ   )r   rr   r`   rk   r   r   r   r   )
r   rd   r    context2optoptretr2   Zcontext2parserparserrn   r   r   r   _get_device_parameters^  s     
z&NetTuningPlugin._get_device_parametersc       	      C   s   |d kst |dkrd S | j||}|d ks:| j|| r>i S |r| j|||| |dkrt|tt| dkr| j|| jj	||}| rt |dkrt
jd|t|f  dddd	d
d}|| }| jjd||g| jj	| dgd |S )Nr   rM   n/arm   zsetting %s: %sz-Cz-Kz-Az-Gz-L)rJ   rI   rK   rL   rM   ro   P   )r   )r   rm   )r`   rf   r   r   r   nextiterr   r   	dict2listr   r   rr   )	r   rd   r2   r    rs   r   rn   r   r   r   r   r   _set_device_parametersp  s      $z&NetTuningPlugin._set_device_parametersc                s   | j ||d}|r| j||}|d ks2t|dkr6dS | j|||||d  d ks^t dkrbdS  fdd|j D }t|}|r| jj | jj|k}	| j||	 ||d |	S | j	j
|dj| jj| n| j	j|}
| j||
|d d S )	N)Zcommand_nameZdevice_namer   F)r   c                s    g | ]\}}| kr||fqS r   r   )r"   r   r2   )
params_setr   r   r$     s    z6NetTuningPlugin._custom_parameters.<locals>.<listcomp>)r    r\   )Z_storage_keyr   r`   r   itemsrb   r   r   Z_log_verification_resultZ_storager   joinget)r   rd   startr2   r    verifyZstorage_keyZparams_currentZrelevant_params_currentr   original_valuer   )r   r   _custom_parameters  s:    

z"NetTuningPlugin._custom_parametersrI   c             C   s   | j d||||S )NrI   )r   )r   r   r2   r    r   ry   r   r   r   	_features  s    zNetTuningPlugin._featuresrJ   c             C   s   | j d||||S )NrJ   )r   )r   r   r2   r    r   ry   r   r   r   	_coalesce  s    zNetTuningPlugin._coalescerK   c             C   s   | j d||||S )NrK   )r   )r   r   r2   r    r   ry   r   r   r   _pause  s    zNetTuningPlugin._pauserL   c             C   s   | j d||||S )NrL   )r   )r   r   r2   r    r   ry   r   r   r   _ring  s    zNetTuningPlugin._ringrM   c             C   s   | j d||||S )NrM   )r   )r   r   r2   r    r   ry   r   r   r   	_channels  s    zNetTuningPlugin._channels)F)N)F)F)N)6__name__
__module____qualname____doc__r
   r!   r%   r,   r.   r0   r/   classmethodr>   rB   rC   rF   rP   r7   r8   r9   rZ   rU   rf   rk   rl   Zcommand_setru   Zcommand_getr{   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Zcommand_customr   r   r   r   r   __classcell__r   r   )r   r   r      sd    	 


	
&r   )r|   r   r   Z
decoratorsZ
tuned.logsZtunedZtuned.utils.nettoolr   Ztuned.utils.commandsr   osr   Zlogsr   r   rp   ZPluginr   r   r   r   r   <module>   s   
