[23] add system info to log

pull/1185/head
meisnate12 2 years ago
parent 531e12eb46
commit 9dbe17fa4f

@ -1,5 +1,6 @@
FROM python:3.10-slim-buster
ENV TINI_VERSION v0.19.0
ENV PMM_DOCKER True
COPY . /
RUN echo "**** install system packages ****" \
&& apt-get update \

@ -1 +1 @@
1.18.0-develop22
1.18.0-develop23

@ -1,4 +1,4 @@
import argparse, os, sys, time, uuid
import argparse, os, platform, psutil, sys, time, uuid
from concurrent.futures import ProcessPoolExecutor
from datetime import datetime
from modules.logs import MyLogger
@ -70,7 +70,7 @@ def get_arg(env_str, default, arg_bool=False, arg_int=False):
else:
return default
is_docker = get_arg("PMM_DOCKER", False, arg_bool=True)
run_arg = " ".join([f'"{s}"' if " " in s else s for s in sys.argv[:]])
config_file = get_arg("PMM_CONFIG", args.config)
times = get_arg("PMM_TIME", args.times)
@ -181,7 +181,10 @@ def start(attrs):
logger.info_center("| __/| | __/> < | | | | __/ || (_| | | | | | (_| | | | | (_| | (_| | __/ | ")
logger.info_center("|_| |_|\\___/_/\\_\\ |_| |_|\\___|\\__\\__,_| |_| |_|\\__,_|_| |_|\\__,_|\\__, |\\___|_| ")
logger.info_center(" |___/ ")
logger.info(f" Version: {version[0]}")
system_ver = "Docker" if is_docker else f"Python {platform.python_version()}"
logger.info(f" Version: {version[0]} ({system_ver})")
logger.info(f" Platform: {platform.platform()}")
logger.info(f" Memory: {round(psutil.virtual_memory().total / (1024.0 ** 3))} GB")
latest_version = util.current_version(version)
new_version = latest_version[0] if latest_version and (version[1] != latest_version[1] or (version[2] and version[2] < latest_version[2])) else None
if new_version:

Loading…
Cancel
Save