0

Can one use journalctl to read or query another machine's journal?

This would seem trivial and obvious on its face but evidently is not. The journalctl man pages and Google reveal nothing on the topic.

I'm in a multiboot environment debugging some especially arcane and elusive boot hang issues.

Obviously, one can't use journalctl on a machine that hangs during boot, so the question is whether I can use journalctl while booted to a functioning machine on one partition to read the systemd journals of a failed machine on another.

syslog is of no assistance because the boot process doesn't proceed beyond tty1, i.e., far enough for syslog / rsyslog to launch and read dmesg. There is some hope that boot messages make it into the systemd-journald log, howver.

Any thoughts about whether this is possible, and how, would be most appreciated.

EDIT: I evidently hadn't read man journalctl closely enough because the -D DIR option is exactly what I'm seeking. Credit to @muru, and thanks.

ebsf
  • 271
  • 2
  • 11
  • 1
    From the man pages, the `--file=GLOB` entry might work for you. – ajgringo619 Jun 08 '22 at 03:34
  • 2
    There's also "-D DIR, --directory=DIR Takes a directory path as argument. If specified, journalctl will operate on the specified journal directory DIR instead of the default runtime and system journal paths." – muru Jun 08 '22 at 05:56

0 Answers0