chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
os-release: define /usr/lib/os-release as fallback for /etc/os-release
[elogind.git]
/
src
/
bootchart
/
store.c
diff --git
a/src/bootchart/store.c
b/src/bootchart/store.c
index 3e0052d212813309aa3e38ebb3f26ae2cde92df3..e0719838d5089a6e369ae546715335fc4b4c91c2 100644
(file)
--- a/
src/bootchart/store.c
+++ b/
src/bootchart/store.c
@@
-37,6
+37,7
@@
#include "strxcpyx.h"
#include "store.h"
#include "bootchart.h"
#include "strxcpyx.h"
#include "store.h"
#include "bootchart.h"
+#include "cgroup-util.h"
/*
* Alloc a static 4k buffer for stdio - primarily used to increase
/*
* Alloc a static 4k buffer for stdio - primarily used to increase
@@
-61,7
+62,7
@@
void log_uptime(void) {
char str[32];
double uptime;
char str[32];
double uptime;
- f = fopen("/proc/uptime", "r");
+ f = fopen("/proc/uptime", "r
e
");
if (!f)
return;
if (!f)
return;
@@
-315,6
+316,11
@@
schedstat_next:
ps->starttime = strtod(t, NULL) / 1000.0;
ps->starttime = strtod(t, NULL) / 1000.0;
+ if (arg_show_cgroup)
+ /* if this fails, that's OK */
+ cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER,
+ ps->pid, &ps->cgroup);
+
/* ppid */
sprintf(filename, "%d/stat", pid);
fd = openat(procfd, filename, O_RDONLY);
/* ppid */
sprintf(filename, "%d/stat", pid);
fd = openat(procfd, filename, O_RDONLY);