blob: fbbe3458027e8f63a1ee837d676d7ca065825af1 [file] [log] [blame]
Jayanth Othayoth35586cd2017-10-15 05:39:26 -05001#!/bin/bash
2#
3# config: 2 20
4# @brief: Get all the available elogs from BMC.
5#
6
7. $DREPORT_INCLUDE/functions
8
9desc="elog"
10
11entries=$(busctl --list --no-pager tree \
12 xyz.openbmc_project.Logging | grep \
13 '/xyz/openbmc_project/logging/entry/')
14
15#check for elog entries.
16if [ -z "$entries" ]; then
17 log_info "No $desc entries"
18 exit 0
19fi
20
21command="busctl --list --no-pager tree \
22 xyz.openbmc_project.Logging | grep \
23 '/xyz/openbmc_project/logging/entry/' \
24 | xargs -I {} busctl --verbose --no-pager \
25 call xyz.openbmc_project.Logging {} \
26 org.freedesktop.DBus.Properties GetAll s \
27 xyz.openbmc_project.Logging.Entry"
28
29file_name="elogall.log"
30
31add_cmd_output "$command" "$file_name" "$desc"