Skip to content

Replace call to ethtool by ioctl #10

@xtor

Description

@xtor

The code currently executes ethtool commands with the Ethtool class:

class CommandEthtool:

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):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions