保存したジャーナルctlログを読み取れません。

保存したジャーナルctlログを読み取れません。

内容を読んでみると、man journalctl次のような内容が見つかりました。

   Storage=
       Controls where to store journal data. One of "volatile", "persistent", "auto" and "none". If "volatile", journal log data will be stored only in memory, i.e. below the
       /run/log/journal hierarchy (which is created if needed). If "persistent", data will be stored preferably on disk, i.e. below the /var/log/journal hierarchy (which is created
       if needed), with a fallback to /run/log/journal (which is created if needed), during early boot and if the disk is not writable.  "auto" is similar to "persistent" but the
       directory /var/log/journal is not created if needed, so that its existence controls where log data goes.  "none" turns off all storage, all log data received will be dropped.
       Forwarding to other targets, such as the console, the kernel log buffer, or a syslog socket will still work however. Defaults to "auto".

ただしless、そこにファイルを作成しようとすると、次の結果が表示されます。

[root@long-misc-p001 logs]# less /run/log/journal/xxxxxx/system.journal
"/run/log/journal/xxxxxx/system.journal" may be a binary file.  See it anyway?

まだそのオプションを設定していませんが、persistent実行を続けるとlessバイナリファイルが生成されます。これが予想されたものですか? journactl普通の文字をください。

ベストアンサー1

システムログデータはプレーンテキストとして保存されません。このツールでjournalctl読む必要があります。必要に応じて、以下を使用してstraceファイルが実際に読み込まれていることを確認できますjournalctl/run/log/journal

strace journalctl 2>&1 | grep /run/log/journal/

おすすめ記事