blob: 0481d4ddb52276bab8619efe6ab2aa599528bfb3 [file] [log] [blame]
Jayanth Othayotha1724692017-10-15 05:45:58 -05001#!/bin/bash
2#
3# config: 13 1
4# @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"