On Thu, 02.08.12 19:28, Damien Robert ([email protected]) wrote:
> Hi all, > > when using systemctl status foo.service, the last journald entries > correspondingto this service are printed, which is a very nice feature of > systemd. > > However, this is not the case when running a systemd --user, then systemctl > --user foo.service will not print the corresponding journal logs, even if > there are some. So here is to a feature request :) This definitely makes snese. Added to the TODO list now. > While I am at it, I have a question about how to distinguish in the > user-mypid.journal what come from services started by the service systemd > and what come from services started by systemd --user. A look at journalctl > _AUDIT_LOGINUID=myid -o verbose show that the messages corresponding to > services started by systemd --user could be identified by their > _SYSTEMD_CGROUP of the form > _SYSTEMD_CGROUP=/user/myname/8/systemd-30697/foo.service > ^^^^^^^^^^^^^ > so something like journalctl _SYSTEMD_CGROUP='the right regular expression' > could print them, but journalctl does not seem to support regular > expression yet. regexes are really hard to index by, so I doubt we will support them. We probably should just teach journald to parse user service names into _SYSTEMD_USER_UNIT= or so. I'd be happy to take a patch for that. > To tell the truth I was expecting to identify these messages by using > _SYSTEMD_OWNER_UID=myid, but it seem that systemd --user does not set this > property: I have some message with _SYSTEMD_OWNER_UID=myid in my logs but > they do not correspond to messages generated by the services from systemd > --user, so I don't really know what _SYSTEMD_OWNER_UID means :) The journal bits in "systemctl status" are currently completely unprepared for --user, we really need to fix that. Lennart -- Lennart Poettering - Red Hat, Inc. _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
