ofirgalcon / ethernet
Ethernet module for munkireport.
Requires
None
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Reports Ethernet adapter hardware inventory from System Profiler (SPEthernetDataType), plus live link state from ifconfig (active / negotiated speed / media).
Data appears on the client Ethernet tab, the Ethernet listing, and the Ethernet report widgets (devices / speeds).
IP addressing and network services remain in the network module; this module owns the adapter and its link.
Based on the Thunderbolt module by tuxudo.
Configuration
Optional .env / module config (config.php):
ETHERNET_INCLUDE_USB(defaulttrue) — whenfalse, USB Ethernet adapters are dropped during server-side processing.
Client script
scripts/ethernet— Python 3 (munkireport-python3), version in__version__- Install via module
install.sh→preflight.d/ethernet - Output:
ethernet.plist(array of devices; empty list when no hardware) - Speeds are integers in megabit/s (e.g.
1000for 1 Gb/s). The server still accepts legacy text uploads (1 Gb/s,ethernet_speed_1000) and converts them.
Local testing:
mkdir -p /path/to/module/scripts/cache
sudo /usr/local/munkireport/munkireport-python3 /path/to/module/scripts/ethernet
# inspect scripts/cache/ethernet.plist, then remove the cache dir
rm -rf /path/to/module/scripts/cache
Table Schema
- name - varchar(255) - Name of the Ethernet device
- device_id - varchar(255) - Device ID
- BSD_Device_Name - varchar(255) - BSD device name / port
- driver - varchar(255) - Kernel driver name
- max_link_speed - integer - Maximum link speed in Mbps
- current_link_speed - integer - Negotiated link speed in Mbps (live)
- link_active - integer -
1if ifconfig status is active, else0 - current_media - varchar(255) - ifconfig media string (live)
- pcie_link_width - varchar(255) - PCIe link width
- pcie_link_speed - varchar(255) - PCIe link speed
- product_name - varchar(255) - Product name (falls back to
name) - revision_id - varchar(255) - Revision ID
- vendor_name - varchar(255) - Vendor name (resolved server-side from
vendor_idvia usb.ids / pci.ids map when known; otherwise System Profiler name) - subsystem_id - varchar(255) - Subsystem ID
- subsystem_vendor_id - varchar(255) - Subsystem Vendor ID
- vendor_id - varchar(255) - Vendor ID
- avb_support - varchar(255) - AVB support
- usb_device_speed - varchar(255) - USB link speed (USB NICs)
- bus - varchar(255) - Bus (
PCI,USB, …) - mac_address - varchar(255) - MAC address
- product_id - varchar(255) - Product ID
- device_type - varchar(255) - Device type
Indexes kept: serial_number, name, max_link_speed, bus, mac_address, link_active, current_link_speed.
Vendor ID map notes
Lookup lives in Ethernet_model (not the client script). USB IDs verified against usb.ids (linux-usb.org):
0x0bda— Realtek Semiconductor Corp.0x17ef— Lenovo0x1a86— QinHeng Electronics