From 58409b8ceee480f7a0d6624f890baa1d56965f49 Mon Sep 17 00:00:00 2001 From: Ivaylo Novakov Date: Fri, 28 Aug 2020 11:59:27 +0200 Subject: [PATCH] Switch from the "1 minute" to "15 minutes" average. --- setup-scripts/log-checker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup-scripts/log-checker.py b/setup-scripts/log-checker.py index d30e7be4..a020c3d6 100755 --- a/setup-scripts/log-checker.py +++ b/setup-scripts/log-checker.py @@ -55,9 +55,9 @@ async def check_load_average(): uptime_string = os.popen("uptime").read().strip() # pattern = "" if sys.platform == "Darwin": - pattern = "^.*load averages: (\d*\.\d*) \d*\.\d* \d*\.\d*$" + pattern = "^.*load averages: \d*\.\d* \d*\.\d* (\d*\.\d*)$" else: - pattern = "^.*load average: (\d*\.\d*), \d*\.\d*, \d*\.\d*$" + pattern = "^.*load average: \d*\.\d*, \d*\.\d*, (\d*\.\d*)$" load_av = re.match(pattern, uptime_string).group(1) if float(load_av) > 10: await send_msg(client, "High system load detected: `{}`".format(uptime_string), force_notify=True)