mirror of
https://github.com/systemd/systemd.git
synced 2025-03-28 02:50:16 +03:00
journald: log the slice of a process along with each message in _SYSTEMD_SLICE=
This commit is contained in:
parent
41a5ef639b
commit
0a244b8ecb
@ -223,17 +223,20 @@
|
||||
<term><varname>_SYSTEMD_UNIT=</varname></term>
|
||||
<term><varname>_SYSTEMD_USER_UNIT=</varname></term>
|
||||
<term><varname>_SYSTEMD_OWNER_UID=</varname></term>
|
||||
<term><varname>_SYSTEMD_SLICE=</varname></term>
|
||||
|
||||
<listitem>
|
||||
<para>The control group path in
|
||||
the systemd hierarchy, the
|
||||
<para>The control group path
|
||||
in the systemd hierarchy, the
|
||||
systemd session ID (if any),
|
||||
the systemd unit name (if any),
|
||||
the systemd user session unit name (if any)
|
||||
and the owner UID of the
|
||||
systemd session (if any) of
|
||||
the process the journal entry
|
||||
originates from.</para>
|
||||
the systemd unit name (if
|
||||
any), the systemd user session
|
||||
unit name (if any), the owner
|
||||
UID of the systemd session (if
|
||||
any) and the systemd slice
|
||||
unit of the process the
|
||||
journal entry originates
|
||||
from.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
@ -638,6 +638,12 @@ static void dispatch_message_real(
|
||||
IOVEC_SET_STRING(iovec[n++], x);
|
||||
}
|
||||
|
||||
if (cg_path_get_slice(c, &t) >= 0) {
|
||||
x = strappenda("_SYSTEMD_SLICE=", t);
|
||||
free(t);
|
||||
IOVEC_SET_STRING(iovec[n++], x);
|
||||
}
|
||||
|
||||
free(c);
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ typedef struct Server {
|
||||
bool sync_scheduled;
|
||||
} Server;
|
||||
|
||||
#define N_IOVEC_META_FIELDS 19
|
||||
#define N_IOVEC_META_FIELDS 20
|
||||
#define N_IOVEC_KERNEL_FIELDS 64
|
||||
#define N_IOVEC_UDEV_FIELDS 32
|
||||
#define N_IOVEC_OBJECT_FIELDS 11
|
||||
|
Loading…
x
Reference in New Issue
Block a user