|
| 1 | +python-ethtool |
| 2 | +============== |
| 3 | + |
| 4 | +*Python bindings for the ethtool kernel interface* |
| 5 | + |
| 6 | +``python-ethtool`` allows querying and changing of ethernet card settings, |
| 7 | +such as speed, port, autonegotiation, and PCI locations. |
| 8 | + |
| 9 | +**This is the new upstream for python-ethtool maintained by Fedora's |
| 10 | +Python SIG.** |
| 11 | + |
| 12 | +Usage |
| 13 | +----- |
| 14 | + |
| 15 | +``ethtool`` may be used as a Python library:: |
| 16 | + |
| 17 | + >>> import ethtool |
| 18 | + >>> ethtool.get_active_devices() |
| 19 | + ['lo', 'enp0s31f6', 'wlp4s0', 'virbr0', 'docker0', 'virbr1', 'eth0', 'tun0'] |
| 20 | + >>> ethtool.get_ipaddr('lo') |
| 21 | + '127.0.0.1' |
| 22 | + |
| 23 | +``python-ethtool`` also provides the ``pethtool`` and ``pifconfig`` utilities. More example usage may be gathered from their sources, |
| 24 | +`pethtool.py <https://github.com/fedora-python/python-ethtool/blob/master/pethtool.py>`_ |
| 25 | +and |
| 26 | +`pifconfig.py <https://github.com/fedora-python/python-ethtool/blob/master/pethtool.py>`_. |
| 27 | + |
| 28 | + |
| 29 | +``pethtool`` mimics behavior of the ``ethtool`` utility, but does not |
| 30 | +support all options. |
| 31 | + |
| 32 | +e.g., to get driver information on the ``eth0`` interface:: |
| 33 | + |
| 34 | + $ pethtool -i eth0 |
| 35 | + driver: cdc_ether |
| 36 | + bus-info: usb-0000:00:14.0-4.1.3 |
| 37 | + |
| 38 | +Analogically, ``pifconfig`` mimics ``ifconfig`` in usage. It may be |
| 39 | +used to view information on an interface:: |
| 40 | + |
| 41 | + $ pifconfig lo |
| 42 | + lo |
| 43 | + inet addr:127.0.0.1 Mask:255.0.0.0 |
| 44 | + inet6 addr: ::1/128 Scope: host |
| 45 | + UP LOOPBACK RUNNING |
| 46 | + |
| 47 | + |
| 48 | +Further usage information may be found in the respective manpages for |
| 49 | +`pethtool <https://github.com/fedora-python/python-ethtool/blob/master/man/pethtool.8.asciidoc>`_ |
| 50 | +and |
| 51 | +`pifconfig <https://github.com/fedora-python/python-ethtool/blob/master/man/pifconfig.8.asciidoc>`_. |
| 52 | + |
| 53 | +Tests |
| 54 | +----- |
| 55 | + |
| 56 | +Tests may be run by ``tox``. However, they're currently failing, see |
| 57 | +`issue #11 <https://github.com/fedora-python/python-ethtool/issues/11>`_. |
| 58 | + |
| 59 | +Authors |
| 60 | +------- |
| 61 | + |
| 62 | +* Harald Hoyer |
| 63 | +* Arnaldo Carvalho de Melo |
| 64 | +* David Sommerseth |
| 65 | + |
| 66 | +Current maintainers |
| 67 | +------------------- |
| 68 | + |
| 69 | +* Lumír Balhar <lbalhar@redhat.com> |
| 70 | +* Miro Hrončok <mhroncok@redhat.com> |
| 71 | +* Charalampos Stratakis <cstratak@redhat.com> |
| 72 | +* Sanqui <dlabsky@redhat.com> |
| 73 | + |
| 74 | +Contributing |
| 75 | +------------ |
| 76 | + |
| 77 | +Feel free to help us with improving test coverage, porting to Python 3 |
| 78 | +or anything else. |
| 79 | +Issues and PRs `on GitHub <https://github.com/fedora-python/python-ethtool>`_ |
| 80 | +are welcome. |
| 81 | + |
| 82 | +License |
| 83 | +------- |
| 84 | + |
| 85 | +``python-ethtool`` is free software distributed under the terms of the |
| 86 | +GNU General Public License v2.0, see |
| 87 | +`COPYING <https://github.com/fedora-python/python-ethtool/blob/master/COPYING>`_. |
| 88 | + |
0 commit comments