[systemd-devel] journal entries for most recent pid?

Lennart Poettering lennart at poettering.net
Wed Apr 23 23:59:46 PDT 2014


On Tue, 25.03.14 15:59, Peter Hutterer (peter.hutterer at who-t.net) wrote:

> I can't seem to find this in the documentation, so I do wonder if it exists:
> is there an equivalent to journalctl -b -1 that lists the log of the most
> recent pid?
> 
> Specifically I'd like to run journalctl /usr/bin/Xorg --pid -1 or similar to
> get users to attach the most recent log file instead of having to provide
> _PID manually.

Hmm, I can see the usecase for that, but I am not sure how we could
implement this nicely...

To implement this we'd have to store the starttime of each PID in the
database, and then order by that. And then we'd have to figure out the
most recent one, probably in a similar fashion as we already allow this
boot ids...

I have added this now to the TODO list, but don't hold your breath...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list