Skip to content

Commit cd40be6

Browse files
sourabhjainscoiby
authored andcommitted
Forward core collector's stdout and stderr to /dev/console
The default core collector, makedumpfile, has functionality to print the ETA for dump capture. However, due to a limitation/bug in systemd, executing the kdump.sh script via a systemd service does not print the ETA on the console, even though StandardError is set to journal+console. On machines with high memory in the terabyte range, processing the dump takes time. Since makedumpfile’s ETA is not printed on the console while collecting the dump, there have been a few instances where system administrators rebooted the system during dump capture, assuming the system was stuck. Until the systemd service issue [1] is fixed, forward the core collector’s stdout and stderr to /dev/console manually. This will print the ETA for dump capture and let the user know that dump capture is ongoing. [1] systemd/systemd#37994 Signed-off-by: Sourabh Jain <[email protected]>
1 parent 063548f commit cd40be6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dracut/99kdumpbase/kdump.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ dump_fs() {
182182
KDUMP_LOG_DEST=$_dump_fs_path/
183183
KDUMP_LOG_OP="mv '$KDUMP_LOG_FILE' '$KDUMP_LOG_DEST/'"
184184

185-
$CORE_COLLECTOR /proc/vmcore "$_dump_fs_path/vmcore-incomplete"
185+
$CORE_COLLECTOR /proc/vmcore "$_dump_fs_path/vmcore-incomplete" > /dev/console 2>&1
186186
_dump_exitcode=$?
187187
if [ $_dump_exitcode -eq 0 ]; then
188188
sync -f "$_dump_fs_path/vmcore-incomplete"

0 commit comments

Comments
 (0)