How to use the ethtool.get_businfo function in ethtool

To help you get started, we’ve selected a few ethtool examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jpirko / lnst / lnst / Devices / Device.py View on Github external
def bus_info(self):
        try:
            return ethtool.get_businfo(self.name)
        except IOError as e:
            log_exc_traceback()
            return ""
github uyuni-project / uyuni / client / debian / packages-already-in-debian / python-ethtool / pethtool.py View on Github external
def show_driver(interface, args = None):
        try:
                driver = ethtool.get_module(interface)
        except IOError:
                driver = "not implemented"

        try:
                bus = ethtool.get_businfo(interface)
        except IOError:
                bus = "not available"

        printtab("driver: %s" % driver)
        printtab("bus-info: %s" % bus)