From: Tom Clegg Date: Tue, 14 Oct 2014 19:00:28 +0000 (-0400) Subject: 3826: Add TODO comment on FindStat. X-Git-Tag: 1.1.0~2083^2~14 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/8aeba61dc1cf17b680d6cd3e6bcc4c01f40ff5a3?ds=sidebyside 3826: Add TODO comment on FindStat. --- diff --git a/services/crunchstat/crunchstat.go b/services/crunchstat/crunchstat.go index 9590bbbf5c..0b3920c0d8 100644 --- a/services/crunchstat/crunchstat.go +++ b/services/crunchstat/crunchstat.go @@ -67,6 +67,13 @@ func OpenAndReadAll(filename string, log_chan chan<- string) ([]byte, error) { var reportedStatFile map[string]bool var reportedNoStatFile map[string]bool +// Find the cgroup stats file in /sys/fs corresponding to the target +// cgroup. +// +// TODO: Instead of trying all options, choose a process in the +// container, and read /proc/PID/cgroup to determine the appropriate +// cgroup root for the given statgroup. (This will avoid falling back +// to host-level stats during container setup and teardown.) func FindStat(stderr chan<- string, cgroup Cgroup, statgroup string, stat string) string { if reportedStatFile == nil { reportedStatFile = make(map[string]bool)