1
0
Fork 0

Merge pull request #399 from yarda/log-version

application: log TuneD and kernel version
This commit is contained in:
Jaroslav Škarvada 2022-01-21 00:30:45 +01:00 committed by GitHub
commit e8117075f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -1,6 +1,7 @@
from tuned import storage, units, monitors, plugins, profiles, exports, hardware
from tuned.exceptions import TunedException
import tuned.logs
import tuned.version
from . import controller
from . import daemon
import signal
@ -17,6 +18,9 @@ __all__ = ["Application"]
class Application(object):
def __init__(self, profile_name = None, config = None):
# os.uname()[2] is for the python-2.7 compatibility, it's the release string
# like e.g. '5.15.13-100.fc34.x86_64'
log.info("TuneD: %s, kernel: %s" % (tuned.version.TUNED_VERSION_STR, os.uname()[2]))
self._dbus_exporter = None
storage_provider = storage.PickleProvider()

View file

@ -1,3 +1,5 @@
TUNED_VERSION_MAJOR = 2
TUNED_VERSION_MINOR = 17
TUNED_VERSION_PATCH = 0
TUNED_VERSION_STR = "%d.%d.%d" % (TUNED_VERSION_MAJOR, TUNED_VERSION_MINOR, TUNED_VERSION_PATCH)