diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-02-09 17:32:26 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-02-09 17:32:26 +0100 |
commit | a04fcf17badf8ee2ed549bf99c4e5a37e0f7aecf (patch) | |
tree | 4d3937a1a8f2097f9843be8af8879ffc522ffcf1 /src/basic/procfs-util.h | |
parent | ba4b1544f2a69c6786295d437b2f970f5ed1f68f (diff) | |
download | systemd-a04fcf17badf8ee2ed549bf99c4e5a37e0f7aecf.tar.gz systemd-a04fcf17badf8ee2ed549bf99c4e5a37e0f7aecf.tar.bz2 systemd-a04fcf17badf8ee2ed549bf99c4e5a37e0f7aecf.zip |
procfs-util: add APIs to get consumed CPU time and used memory from /proc
This is preparation for emulating the "usage_usec" keyed attribute of
the "cpu.stat" property of the root cgroup from data in /proc. Similar,
for emulating the "memory.current" attribute.
Diffstat (limited to 'src/basic/procfs-util.h')
-rw-r--r-- | src/basic/procfs-util.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/basic/procfs-util.h b/src/basic/procfs-util.h index 7466acd7f3..f697ed92bc 100644 --- a/src/basic/procfs-util.h +++ b/src/basic/procfs-util.h @@ -3,6 +3,12 @@ #include <inttypes.h> +#include "time-util.h" + int procfs_tasks_get_limit(uint64_t *ret); int procfs_tasks_set_limit(uint64_t limit); int procfs_tasks_get_current(uint64_t *ret); + +int procfs_cpu_get_usage(nsec_t *ret); + +int procfs_memory_get_current(uint64_t *ret); |