cgutil: new functions to query a cgroup from pid and get memory use

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2021-03-19 09:33:42 +01:00
1 parent 728db73b09
commit 3107027132
2 files changed
+33

No files matched your search

+4
View File
@@ -24,10 +24,14 @@
#ifndef FINIT_CGUTIL_H_
#define FINIT_CGUTIL_H_
#include <stdint.h>
#include <stdlib.h>
char *pid_cmdline (int pid, char *buf, size_t len);
char *pid_comm (int pid, char *buf, size_t len);
char *pid_cgroup (int pid, char *buf, size_t len);
uint64_t cgroup_memory(char *group);
int cgroup_tree (char *path, char *pfx, int top);