[lxc-devel] [PATCH] /proc/stat in lxcfs

2015-02-16 Thread Christian Brauner
+else if (sscanf(cpu_char, %d, cpu) != 1) { This is an unorthodox (for lxc) coding style. Could you explain exactly what you're doing here? I would expect just: if (sscanf(cpu_char, %d, cpu) != 1)) continue; if (!cpu_in_cpuset(cpu, cpuset)) continue;

Re: [lxc-devel] [PATCH] /proc/stat in lxcfs

2015-02-16 Thread Serge Hallyn
Quoting Christian Brauner (christianvanbrau...@gmail.com): Hello, /proc/stat mounted at /var/lib/lxcfs/ is currently missing (a) the cpu average-line from the hosts /proc/stat and (b) the numbering of the cores starts with 1 and not with the 0. (This will e.g. cause confusion for top/htop

[lxc-devel] [PATCH] /proc/stat in lxcfs

2015-02-15 Thread Christian Brauner
Hello, /proc/stat mounted at /var/lib/lxcfs/ is currently missing (a) the cpu average-line from the hosts /proc/stat and (b) the numbering of the cores starts with 1 and not with the 0. (This will e.g. cause confusion for top/htop in the container.) I wrote a minimally invasive patch for that: