From f6c6f43c5fcc7b58211b34ef258c6f66d93af2a5 Mon Sep 17 00:00:00 2001 From: dongjiao Date: Tue, 3 Sep 2024 14:57:46 +0800 Subject: [PATCH] add net_obj addr --- kyreport/ky_report.py | 1 + 1 file changed, 1 insertion(+) diff --git a/kyreport/ky_report.py b/kyreport/ky_report.py index 71ece1b..7d71794 100644 --- a/kyreport/ky_report.py +++ b/kyreport/ky_report.py @@ -118,6 +118,7 @@ window.onload = init(); net_obj['version'] = Command.cmd_exec('ethtool -i ' + ifc + ' | grep version | grep -v -E \'firmware-version|expansion-rom-version\' | cut -d \' \' -f 2') net_obj['firmware_version'] = Command.cmd_exec('ethtool -i ' + ifc + ' | grep firmware-version | cut -d \' \' -f 2') net_obj['link_status'] = Command.cmd_exec('ethtool ' + ifc + ' | grep \'Link detected\' | cut -d \' \' -f 3') + net_obj['addr'] = Command.cmd_exec('ifconfig ' + ifc + ' | grep "inet " | awk \'{print $2}\' ').strip() net_list.append(net_obj) return net_list -- Gitee