On Mon, 24.03.14 19:01, Patrick Donnelly ([email protected]) wrote: > > On Mon, Mar 24, 2014 at 12:30 PM, Lennart Poettering > <[email protected]> wrote: > > On Sun, 23.03.14 21:46, Patrick Donnelly ([email protected]) wrote: > > > >> My problem is not related to race conditions. The issue is that > >> /proc/pid/cmdline is shown instead of /proc/pid/comm for each journal > >> entry. That is: > >> > >> $ journalctl --boot > >> [...] > >> Mar 23 21:39:01 host a.out[10697]: hi > >> Mar 23 21:39:01 host c[10697]: bye2 > >> [...] > >> > >> These identifiers are being pulled from cmdline or argv[0] somehow. > > > > Yupp, the client side also sends an identifier to the server which is > > used if it exists. It's container in the SYSLOG_IDENTIFIER field. > > > > I figure what happens for you is that when you change argv[0] the GNU > > program_invocation_short_name variable is not updated, and sd-journal > > picks up that variable for setting SYSLOG_IDENTIFIER. > > Yes, this is it. Yay obscure glibc side-effects. > > I assume I could just override SYSLOG_IDENTIFIER manually?
Yes. > Also, if someone could update the documentation for > systemd.journal-fields(7) saying where SYSLOG_IDENTIFIER is derived > (by default?), that'd probably help too. I added a vague reference there now. I left it a bit vague on purpose, since I don't want to document too much of glibc's own internals (i.e. that it derives the syslog identifiers from p_i_s_n, since it's not for us to document and thus cement this behaviour). Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
