From b73d92c1be62e2a047571d37fce7a53959d4f1af Mon Sep 17 00:00:00 2001 From: Grothesk242 <57298681+Grothesk242@users.noreply.github.com> Date: Sun, 2 Jun 2024 21:28:02 +0200 Subject: [PATCH 1/2] Update parsers.json Made wifi interface more generic. --- lib/parsers.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/parsers.json b/lib/parsers.json index 9eb23ec..d8455fa 100644 --- a/lib/parsers.json +++ b/lib/parsers.json @@ -119,12 +119,12 @@ }, "wlan": { "wifi_received": { - "command": "cat /sys/class/net/wlan0/statistics/rx_bytes", + "command": "cat /sys/class/net/wl*/statistics/rx_bytes", "regexp": "(.*)", "post": "$1*-1" }, "wifi_send": { - "command": "cat /sys/class/net/wlan0/statistics/tx_bytes", + "command": "cat /sys/class/net/wl*/statistics/tx_bytes", "regexp": "(.*)", "post": "" } From 07bbc070afe70b88c144698bb94500531458fa7e Mon Sep 17 00:00:00 2001 From: Grothesk242 <57298681+Grothesk242@users.noreply.github.com> Date: Sun, 2 Jun 2024 22:03:31 +0200 Subject: [PATCH 2/2] Update parsers.json --- lib/parsers.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/parsers.json b/lib/parsers.json index d8455fa..f3be655 100644 --- a/lib/parsers.json +++ b/lib/parsers.json @@ -53,12 +53,12 @@ }, "network": { "net_received": { - "command": "cat /sys/class/net/eth0/statistics/rx_bytes", + "command": "cat /sys/class/net/e*/statistics/rx_bytes", "regexp": "(.*)", "post": "$1*-1" }, "net_send": { - "command": "cat /sys/class/net/eth0/statistics/tx_bytes", + "command": "cat /sys/class/net/e*/statistics/tx_bytes", "regexp": "(.*)", "post": "" } @@ -71,8 +71,8 @@ "multiline": true }, "sdcard_boot_total": { - "command": "df /boot", - "regexp": "\\S+\\s+(\\d+).*\\/boot$", + "command": "df /boot/*", + "regexp": "\\S+\\s+(\\d+).*\\/boot", "post": "$1/1024", "multiline": true }, @@ -83,8 +83,8 @@ "multiline": true }, "sdcard_boot_used": { - "command": "df /boot", - "regexp": "\\S+\\s+\\d+\\s+(\\d+).*\\/boot$", + "command": "df /boot/*", + "regexp": "\\S+\\s+\\d+\\s+(\\d+).*\\/boot", "post": "$1/1024", "multiline": true }