From 4be19e47e6d80071b86085d0b2cec9771dd49cb7 Mon Sep 17 00:00:00 2001 From: dongjiao Date: Tue, 3 Sep 2024 15:00:18 +0800 Subject: [PATCH] add net_obj netmask --- kyreport/ky_report.py | 1 + 1 file changed, 1 insertion(+) diff --git a/kyreport/ky_report.py b/kyreport/ky_report.py index 7d71794..776e267 100644 --- a/kyreport/ky_report.py +++ b/kyreport/ky_report.py @@ -119,6 +119,7 @@ window.onload = init(); 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_obj['netmask'] = Command.cmd_exec('ifconfig ' + ifc + ' | grep "inet " | awk \'{print $4}\' ').strip() net_list.append(net_obj) return net_list -- Gitee