added system monitoring application including systemd service to tools recipes

the system monitoring logs information about the disk usage, available RAM,
temperature and cpu load.

BugzID: 62219
This commit is contained in:
Marc Mattmueller 2020-05-11 11:15:07 +02:00 committed by Gitea
parent 4f33c33d17
commit db19651c24
3 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,6 @@
# Default settings for system monitor application
# for details run sys-mon --help
MON_INTERVAL_MS="-m 60000"
LOG_INTERVAL_MS="-l 300000"
LOGGER_CONFIG="--loglevel=6,evtloop.5,fileOp.5,tempSensor.5"

View File

@ -0,0 +1,11 @@
[Unit]
Description=System monitoring daemon
Requires=syslog.service
[Service]
Type=forking
EnvironmentFile=-/etc/default/sys-mon.conf
ExecStart=/usr/bin/sys-mon -d -p /run/sys-mon.pid $MON_INTERVAL_MS $LOG_INTERVAL_MS $LOGGER_CONFIG
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,40 @@
SUMMARY = "NetModule system monitoring app"
SECTION = "base"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://LICENSE;md5=699dc6077ab50a5eae0d352adaa137c0"
SRC_URI = "git://git.netmodule.intranet/nm-tools/features.git;protocol=ssh;user=gitea;branch=master"
SRCREV = "82be95b103f636dce3f8c5c733bf4a1bea6bedfd"
SRC_URI_append = " \
file://sys-mon.conf \
file://sys-mon.service \
"
PV = "0.0.1+git${SRCPV}"
inherit systemd
inherit unittests
DEPENDS_append = " libnmapp"
S = "${WORKDIR}/git/apps/sys-mon"
B = "${S}/build"
SYSTEMD_SERVICE_${PN} = "sys-mon.service"
FILES_${PN} += " \
${bindir}/sys-mon \
${systemd_system_unitdir}/sys-mon.service \
${sysconfdir}/default/sys-mon.conf \
"
do_install () {
bbplain "Installing ${BPN} to ${bindir}..."
install -d ${D}${bindir}
install -m 555 ${B}/rls/${BPN} ${D}${bindir}
bbplain "Installing ${BPN} as systemd service..."
install -d ${D}${sysconfdir}/default
install -m 644 ${WORKDIR}/${BPN}.conf ${D}${sysconfdir}/default/
install -d ${D}${systemd_system_unitdir}
install -m 644 ${WORKDIR}/${BPN}.service ${D}${systemd_system_unitdir}
}