blob: c60e5215d6def8721471fc91e7e91296665a8a20 [file] [log] [blame]
Jayanth Othayotha1724692017-10-15 05:45:58 -05001#!/bin/bash
2#
Marri Devender Rao6d7f7532018-12-04 09:10:02 -06003# config: 134 1
Jayanth Othayotha1724692017-10-15 05:45:58 -05004# @brief: Collect user initialized PID specific journal log information.
5#
6
7. $DREPORT_INCLUDE/functions
8
9desc="Journal pid:$pid log"
Jayanth Othayothaa146d62018-01-08 06:57:53 -060010
11if [ $pid -eq $ZERO ]; then
12 log_warning "Missing PID, Collecting last 500 journal entries"
13 file_name="journal.log"
14 command="journalctl -o verbose -n $JOURNAL_LINE_LIMIT"
15else
16 file_name="journal-pid-$pid.log"
17 command="journalctl -o verbose _PID=$pid"
18fi
Jayanth Othayotha1724692017-10-15 05:45:58 -050019
20add_cmd_output "$command" "$file_name" "$desc"