From bfa849c14e8c3404407930fc0d5db454514e513f Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Fri, 28 Jun 2019 13:04:46 +0200 Subject: [PATCH] mwan3: add interface uptime netifd value to ubus mwan3 status output Add missing netifd uptime info to ubus status call. Signed-off-by: Florian Eckert --- net/mwan3/files/usr/libexec/rpcd/mwan3 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/mwan3/files/usr/libexec/rpcd/mwan3 b/net/mwan3/files/usr/libexec/rpcd/mwan3 index 12a7319b5..fb9523ac2 100755 --- a/net/mwan3/files/usr/libexec/rpcd/mwan3 +++ b/net/mwan3/files/usr/libexec/rpcd/mwan3 @@ -104,10 +104,14 @@ get_mwan3_status() { let offline=time_n-time_d } + local uptime="0" + network_get_uptime uptime "$iface" + json_add_object "${iface}" json_add_int age "$age" json_add_int online "${online}" json_add_int offline "${offline}" + json_add_int uptime "${uptime}" json_add_int "score" "$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/SCORE")" json_add_int "lost" "$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/LOST")" json_add_int "turn" "$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/TURN")"