Re: journald not associating log messages with service

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/28/20 9:44 AM, Lennart Poettering wrote:
Is the service short-lived? There's a race: if a process runs very
quickly and logs journald might process the message after the process
already exited, i.e. at a time where we can't read the cgroup off the
process anymore.

It is indeed a very short-lived "service".  (All it does is check a
few things, write 1 value to a sysfs file, and exit.)

You can artifically delay your service's exit (sleep 10...) but it's
still racy and sucks hard. You could issue the equivalent of
"journalctl --sync" at the end of your program...

Is there an API for that?

--
========================================================================
                 In Soviet Russia, Google searches you!
========================================================================

_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux