From dbca6dec4b95f1d308908eb1372bb3fa888b10e3 Mon Sep 17 00:00:00 2001 From: Taylor Helsper Date: Sun, 23 Feb 2020 15:55:05 -0600 Subject: [PATCH] Properly filter reversed logs --- rootfs/standard/var/www/mynode/device_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootfs/standard/var/www/mynode/device_info.py b/rootfs/standard/var/www/mynode/device_info.py index bcaa813e..ec46d498 100644 --- a/rootfs/standard/var/www/mynode/device_info.py +++ b/rootfs/standard/var/www/mynode/device_info.py @@ -203,7 +203,7 @@ def get_service_status_color(service_name): def get_journalctl_log(service_name): try: - log = subprocess.check_output("journalctl -r --unit={} --no-pager | tail -n 200".format(service_name), shell=True).decode("utf8") + log = subprocess.check_output("journalctl -r --unit={} --no-pager | head -n 200".format(service_name), shell=True).decode("utf8") except: log = "ERROR" return log