Jayanth Othayoth | a172469 | 2017-10-15 05:45:58 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
Marri Devender Rao | 6d7f753 | 2018-12-04 09:10:02 -0600 | [diff] [blame] | 3 | # config: 134 1 |
Jayanth Othayoth | a172469 | 2017-10-15 05:45:58 -0500 | [diff] [blame] | 4 | # @brief: Collect user initialized PID specific journal log information. |
| 5 | # |
| 6 | |
| 7 | . $DREPORT_INCLUDE/functions |
| 8 | |
| 9 | desc="Journal pid:$pid log" |
Jayanth Othayoth | aa146d6 | 2018-01-08 06:57:53 -0600 | [diff] [blame] | 10 | |
| 11 | if [ $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" |
| 15 | else |
| 16 | file_name="journal-pid-$pid.log" |
| 17 | command="journalctl -o verbose _PID=$pid" |
| 18 | fi |
Jayanth Othayoth | a172469 | 2017-10-15 05:45:58 -0500 | [diff] [blame] | 19 | |
| 20 | add_cmd_output "$command" "$file_name" "$desc" |