collector: Add systemd-analyze plot
This adds an SVG plot with stats from the startup of the system. Test Plan: PASS: AIO-SX, AIO-DX, DC with AIO-SX subcloud PASS: bashate PASS: Verify plot is in collect PASS: Verify plot is empty if collect is run before startup is done Story: 2010533 Task: 49983 Change-Id: I60e9538e66806e284458105f2bf36c8bfdb209e5 Signed-off-by: Joshua Kraitberg <joshua.kraitberg@windriver.com>
This commit is contained in:
parent
af59ba9cb9
commit
2ae5baf552
25
tools/collector/debian-scripts/collect_systemd.sh
Normal file
25
tools/collector/debian-scripts/collect_systemd.sh
Normal 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
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user