From 6b89907ee76533ea5b058cad6315e44fcd77d978 Mon Sep 17 00:00:00 2001 From: Johannes Findeisen Date: Mon, 3 Oct 2022 12:31:47 +0200 Subject: [PATCH] Some more inline comments and cosmetic changes. --- bin/linspector | 2 +- etc/linspector.conf | 8 ++++---- linspector/core/helpers.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/linspector b/bin/linspector index 920d19a..c31f870 100755 --- a/bin/linspector +++ b/bin/linspector @@ -34,7 +34,7 @@ from linspector.core.monitors import Monitors # i currently only increase the 3rd number because the goal is that 0.19 will become the first # stable version. -__version__ = '0.19.25.dev1' +__version__ = '0.19.26.dev1' __author__ = 'Johannes Findeisen ' logger = logging.getLogger('linspector') diff --git a/etc/linspector.conf b/etc/linspector.conf index 7ac01da..0907a9d 100644 --- a/etc/linspector.conf +++ b/etc/linspector.conf @@ -27,11 +27,11 @@ start_scheduler = true ; multiple processes, thread mode will run only one process with multiple threads. maybe this can be combined to run ; multiple processes with multiple threads... dont know this actually but reading the APScheduler documentation will ; explain this.... :) default is "thread" but Linspector will only run on one CPU core then. default threads are 1024 -; but this can be set much higher here. +; but this can be set much higher here. this should be minimal set to the number of monitors you are running. scheduler_mode = process -max_threads = 3500 -; i recommend to set this to your number of cpu cores available when running on a dedicated linspector host. but if the -; system is running other services you should lower this value when you have too high cpu load. +max_threads = 2048 +; i recommend to set this to your number of CPU cores available when running on a dedicated Linspector host. but if the +; system is running other services you should lower this value when you have too high CPU load. max_processes = 24 ; if timezone is not set, UTC is used by default. timezone = CET diff --git a/linspector/core/helpers.py b/linspector/core/helpers.py index 758bbf0..f881a3a 100644 --- a/linspector/core/helpers.py +++ b/linspector/core/helpers.py @@ -14,8 +14,8 @@ def log(level, msg): import inspect from_stack = inspect.stack()[1] function_name = from_stack.function - module_name = inspect.getmodule(from_stack[0]).__name__ line_number = str(from_stack.lineno) + module_name = inspect.getmodule(from_stack[0]).__name__ if level == 'critical': logger.critical('[' + module_name + ']:[' + function_name + ']:[' + line_number + '] ' + str(msg))