openwisp-monitoring icon indicating copy to clipboard operation
openwisp-monitoring copied to clipboard

[change] Make Iperf command configurable

Open Aryamanz29 opened this issue 2 years ago • 0 comments

Right now, Iperf command is hard coded inside iperf.py. We need to make it configurable.

        if not device_connection:
            logger.warning(f'{device}: connection not properly set, Iperf skipped!')
            return
        else:
            device_connection.connect()
            servers = self._get_iperf_servers(device.organization.id)
            command = f'iperf3 -c {servers[0]} -J'

Update:

  • We can do something like this :
DEFAULT_IPERF_CONFIG = {
    'general' : {
        'option':{
            'interval': 0,
            'port': 5201
            ...
        }
    },
    'client' : {
        'option':{
            'time': 10,
            'reverse': False
        }
    ...
    }
}

Aryamanz29 avatar Jun 21 '22 13:06 Aryamanz29