大网数据广告活动
服务器运维问答

`journalctl -f -m` does not interleave remote and local

· 52CE 我爱测

I currently have a 2-server setup (3 servers in total, one still to be configured for this) with one server using systemd-journal-remote ( .socket & .service ) to collect all log entries from the other machine, which uploads with…

问题原文

原帖链接 · Shadowjonathan · CC BY-SA 4.0

I currently have a 2-server setup (3 servers in total, one still to be configured for this) with one server using systemd-journal-remote (.socket & .service) to collect all log entries from the other machine, which uploads with systemd-journal-upload.

I have installed version 239 via stretch-backports on the receiving debian server, simply to make journalctl -m work, and pick up /var/log/journal/remote

This setup is for redundancy and simplicity of logging, and to have a overview of all events on all servers, but systemctl -f -m does not pick up all logging origins (local and remote), can this be fixed, or is it via design?

Edit:

Upon inspection with a rather non-reoccurring service (cron), i finally got entries for both machines, but here I think i find the problem;

    {
        ...
        "__REALTIME_TIMESTAMP": "1539710221237971",
        "__MONOTONIC_TIMESTAMP": "5621984625",
        "_BOOT_ID": "afb0d4143851464184f340c4ace9XXXX",
        "_MACHINE_ID": "59b666a7337442898dc7cc671c0eXXXX",
        "_HOSTNAME": "SERVER_RECEIVE",
        ...
    },
    {
        ...
        "__REALTIME_TIMESTAMP": "1539706141105212",
        "__MONOTONIC_TIMESTAMP": "6030701064304",
        "_BOOT_ID": "afb0d4143851464184f340c4ace9XXXX",
        "_MACHINE_ID": "35ade424e59d4ef18a9986a090f6XXXX",
        "_HOSTNAME": "SERVER_SEND",
        ...
    },

journalctl seems to sort on __MONOTONIC_TIMESTAMP, is there a reason as to why the remote capturing service seems to iterate on a lower count than the actual journalctl count?

已采纳解答

原帖链接 · Shadowjonathan · CC BY-SA 4.0

journalctl correctly interleaves the machine entries after a reboot, but with flags -mf, it only shows a live feed of all remote machines, it does not interleave local and remote.

This is a bug, and I have started an issue here.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-10-16)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。