]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/unit.c
core: whenever a unit terminates, log its consumed resources to the journal
authorLennart Poettering <lennart@poettering.net>
Thu, 21 Sep 2017 12:05:35 +0000 (14:05 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 22 Sep 2017 13:28:05 +0000 (15:28 +0200)
commit915b1d0174af808dd4cbea1357490febfba7cdc0
tree36dcaa7d3ab4b2ea4f12c7153f00475446eb10ce
parent8e5430c4bd9d39a5e405794f9c883f48de5205d9
core: whenever a unit terminates, log its consumed resources to the journal

This adds a new recognizable log message for each unit invocation that
contains structured information about consumed resources of the unit as
a whole after it terminated. This is particular useful for apps that
want to figure out what the resource consumption of a unit given a
specific invocation ID was.

The log message is only generated for units that have at least one
XyzAccounting= property turned on, and currently only covers IP traffic and CPU
time metrics.
src/basic/log.c
src/basic/log.h
src/core/unit.c
src/systemd/sd-messages.h