Merge "collector: Add systemd-analyze plot"

This commit is contained in:
Zuul 2024-05-06 13:23:02 +00:00 committed by Gerrit Code Review
commit 65f9c81fc7
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,25 @@
#! /bin/bash
#
# Copyright (c) 2024 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Loads Up Utilities and Commands Variables
source /usr/local/sbin/collect_parms
source /usr/local/sbin/collect_utils
SERVICE="systemd"
LOGFILE="${extradir}/${SERVICE}.info"
PLOTFILE="${extradir}/${SERVICE}-startup-plot.svg"
###############################################################################
# Systemd analysis
###############################################################################
echo "${hostname}: Systemd analyze .........: ${LOGFILE}"
delimiter ${LOGFILE} "systemd-analyze plot > ${PLOTFILE}"
timeout 30 systemd-analyze plot > ${PLOTFILE} 2>>${COLLECT_ERROR_LOG}
exit 0

View File

@ -92,6 +92,7 @@ override_dh_auto_install:
install -m 755 -p collect_disk.sh $(SYSCONFDIR)/collect.d/collect_disk
install -m 755 -p collect_interfaces.sh $(SYSCONFDIR)/collect.d/collect_interfaces
install -m 755 -p collect_sysadmin.sh $(SYSCONFDIR)/collect.d/collect_sysadmin
install -m 755 -p collect_systemd.sh $(SYSCONFDIR)/collect.d/collect_systemd
install -m 755 -p etc.exclude $(SYSCONFDIR)/collect/etc.exclude
install -m 755 -p run.exclude $(SYSCONFDIR)/collect/run.exclude