1#!/bin/bash
2#
3# config: 134 1
4# @brief: Collect user initialized PID specific journal log information.
5#
6
7. $DREPORT_INCLUDE/functions
8
9desc="Journal pid:$pid log"
10
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
19
20add_cmd_output "$command" "$file_name" "$desc"
21