The code currently executes ethtool commands with the Ethtool class:
In some cases, this leads to problems when two commands are issues consecutively. A workaround is to sleep one second, like in:
|
def get_rate(self, interface): |
This is not optimal, and introduces a delay of 1 second, that accounts for a big chunk of the execution time.
The code should use the SIOCETHTOOL to implement the ethtool operations instead. One suggested implementation could be:
- Create ioctl.py with Ioctl wrapper class
- Reimplement the required methods
- Replace the commands in SystemInformation, e.g. for get_rate replace
|
def get_rate(self, interface): |
The code currently executes ethtool commands with the Ethtool class:
detd/detd/ethtool.py
Line 23 in 30aeb78
In some cases, this leads to problems when two commands are issues consecutively. A workaround is to sleep one second, like in:
detd/detd/devices/intel_i225.py
Line 67 in 30aeb78
This is not optimal, and introduces a delay of 1 second, that accounts for a big chunk of the execution time.
The code should use the SIOCETHTOOL to implement the ethtool operations instead. One suggested implementation could be:
detd/detd/systemconf.py
Line 349 in 30aeb78