[lxc-users] LXCFS - proc_stat_read()

Serge Hallyn serge.hallyn at ubuntu.com
Thu Apr 2 20:51:46 UTC 2015


Quoting Rajasekar Darapuram (raj at robinsystems.com):
> I was looking at the lxcfs source code and this is what I noticed. (
> https://github.com/lxc/lxcfs/blob/master/lxcfs.c)
> 
> For
> /proc/meminfo => calls function proc_meminfo_read(), which goes into the
> cgroup location and reads from  memory_limit_in_bytes,
> memory.usage_in_bytes and memory.stat files
> /proc/dikstats => calls function proc_diskstats_read() which goes into the
> cgroup location for blkio.* files and get data
> 
> However for /proc/stat, which calls proc_stat_read(), it is reading data
> straight from /proc/stat rather than going to the cgroup location and read
> cpuacct.usage or other files? As a result its displaying host data and so
> top and other applications are not displaying accurate cpu usage data....
> 
> Any specific reason? Please let me know

I only implemented the filtering of the cpu%d entries based on cpusets.  Patches
for more filtering are appreciated :)


More information about the lxc-users mailing list