[systemd-devel] SyslogIdentifier= no flexible enough
Carl Lei
me at xecycle.info
Fri Aug 16 09:40:37 UTC 2024
On Fri, 16 Aug 2024 09:34:57 +0000
"Windl, Ulrich" <u.windl at ukr.de> wrote:
> Hi!
>
> I'm running the same binary concurrently with different options using
> timers and instances, and I have the problem that it's not obvious
> which instance logged an error.
>
> Like this:
> Aug 16 00:00:01 v04 systemd[1]: Started Check (auth-fail-xyz).
> Aug 16 00:00:01 v04 systemd[1]: Started Check (grace-logins).
> Aug 16 00:00:01 v04 systemd[1]: Started Check (grace-logins-xyz).
> Aug 16 00:00:01 v04 systemd[1]: Started Check (pw-expiration-xyz).
> Aug 16 00:00:01 v04 systemd[1]: Started Check (auth-fail).
> Aug 16 00:00:01 v04 systemd[1]: Started Check (pw-expiration).
> ...
> Aug 16 00:00:01 v04 systemd[1]: Started Session 20118 of user root.
> Aug 16 00:00:01 v04 systemd[1]: Started Session 20119 of user root.
> Aug 16 00:00:01 v04 systemd[1]: Started Session 20120 of user root.
> ...
> Aug 16 00:00:01 v04 check[15985]: [0] notification_message: undefined
> value of LAST_PW_CHANGE_T
>
> Now my obvious problem is: "Which instance created PID 15985?"
How do you like: journalctl -t check -o verbose
--output-fields=MESSAGE,_SYSTEMD_UNIT?
More information about the systemd-devel
mailing list