Examining the content of /proc/stat inside a running container shows the same values for processes, procs_running and procs_blocked for host and containers for any given point in time.
Steps to reproduce
Compare /proc/stat inside container with /proc/stat on host
Required information
Distribution:
LXCFS version: 6.0.1
The output of
uname -a: Linux rmltest 5.10.0-30-amd64 #1 SMP Debian 5.10.218-1 (2024-06-01) x86_64 GNU/Linux
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0 proc /proc proc rw,nosuid,nodev,noexec,relatime,gid=4,hidepid=invisible 0 0 udev /dev devtmpfs rw,nosuid,relatime,size=4043224k,nr_inodes=1010806,mode=755 0 0 devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 tmpfs /run tmpfs rw,nosuid,nodev,noexec,relatime,size=813616k,mode=755 0 0 /dev/mapper/system-system_root / xfs rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0 securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0 tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0 tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0 tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,size=4096k,nr_inodes=1024,mode=755 0 0 cgroup2 /sys/fs/cgroup/unified cgroup2 rw,nosuid,nodev,noexec,relatime 0 0 cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,name=systemd 0 0 pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0 none /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0 cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0 cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0 cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0 cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0 cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset,clone_children 0 0 cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0 cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0 cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0 cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0 cgroup /sys/fs/cgroup/rdma cgroup rw,nosuid,nodev,noexec,relatime,rdma 0 0 cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0 systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=9621 0 0 mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0 hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M 0 0 debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0 tracefs /sys/kernel/tracing tracefs rw,nosuid,nodev,noexec,relatime 0 0 sunrpc /run/rpc_pipefs rpc_pipefs rw,relatime 0 0 configfs /sys/kernel/config configfs rw,nosuid,nodev,noexec,relatime 0 0 fusectl /sys/fs/fuse/connections fusectl rw,nosuid,nodev,noexec,relatime 0 0 tmpfs /tmp tmpfs rw,relatime 0 0 tmpfs /var/cache tmpfs rw,relatime 0 0 /dev/sda3 /boot xfs rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0 stestdata1/vservers /srv/vservers zfs rw,noatime,xattr,noacl 0 0 stestdata1/vms /srv/vms zfs rw,noatime,xattr,noacl 0 0 tmpfs /run/user/0 tmpfs rw,nosuid,nodev,relatime,size=813612k,nr_inodes=203403,mode=700 0 0 lxcfs /var/lib/lxcfs fuse.lxcfs rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other 0 0
ps aux | grep lxcfs: root 3074 0.0 0.0 241416 1928 ? Ssl 12:30 0:00 /usr/bin/lxcfs --enable-loadavg /var/lib/lxcfs root 4440 0.0 0.0 6264 700 pts/0 S+ 12:44 0:00 grep lxcfs
LXCFS logs Jul 12 12:30:48 rmltest lxcfs[3074]: Starting LXCFS at /usr/bin/lxcfs Jul 12 12:30:48 rmltest lxcfs[3074]: Using runtime path /run Jul 12 12:30:48 rmltest lxcfs[3074]: Running lxcfslib_init to reload liblxcfs Jul 12 12:30:48 rmltest lxcfs[3074]: mount namespace: 6 Jul 12 12:30:48 rmltest lxcfs[3074]: hierarchies: Jul 12 12:30:48 rmltest lxcfs[3074]: 0: fd: 7: Jul 12 12:30:48 rmltest lxcfs[3074]: 1: fd: 8: name=systemd Jul 12 12:30:48 rmltest lxcfs[3074]: 2: fd: 9: net_cls,net_prio Jul 12 12:30:48 rmltest lxcfs[3074]: 3: fd: 10: perf_event Jul 12 12:30:48 rmltest lxcfs[3074]: 4: fd: 11: freezer Jul 12 12:30:48 rmltest lxcfs[3074]: 5: fd: 12: cpu,cpuacct Jul 12 12:30:48 rmltest lxcfs[3074]: 6: fd: 13: cpuset Jul 12 12:30:48 rmltest lxcfs[3074]: 7: fd: 14: memory Jul 12 12:30:48 rmltest lxcfs[3074]: 8: fd: 15: blkio Jul 12 12:30:48 rmltest lxcfs[3074]: 9: fd: 16: hugetlb Jul 12 12:30:48 rmltest lxcfs[3074]: 10: fd: 17: devices Jul 12 12:30:48 rmltest lxcfs[3074]: 11: fd: 18: rdma Jul 12 12:30:48 rmltest lxcfs[3074]: 12: fd: 19: pids Jul 12 12:30:48 rmltest lxcfs[3074]: Kernel supports pidfds Jul 12 12:30:48 rmltest lxcfs[3074]: Kernel supports swap accounting Jul 12 12:30:48 rmltest lxcfs[3074]: api_extensions: Jul 12 12:30:48 rmltest lxcfs[3074]: - cgroups Jul 12 12:30:48 rmltest lxcfs[3074]: - sys_cpu_online Jul 12 12:30:48 rmltest lxcfs[3074]: - proc_cpuinfo Jul 12 12:30:48 rmltest lxcfs[3074]: - proc_diskstats Jul 12 12:30:48 rmltest lxcfs[3074]: - proc_loadavg Jul 12 12:30:48 rmltest lxcfs[3074]: - proc_meminfo Jul 12 12:30:48 rmltest lxcfs[3074]: - proc_stat Jul 12 12:30:48 rmltest lxcfs[3074]: - proc_swaps Jul 12 12:30:48 rmltest lxcfs[3074]: - proc_uptime Jul 12 12:30:48 rmltest lxcfs[3074]: - proc_slabinfo Jul 12 12:30:48 rmltest lxcfs[3074]: - shared_pidns Jul 12 12:30:48 rmltest lxcfs[3074]: - cpuview_daemon Jul 12 12:30:48 rmltest lxcfs[3074]: - loadavg_daemon Jul 12 12:30:48 rmltest lxcfs[3074]: - pidfds
Issue description
Examining the content of /proc/stat inside a running container shows the same values for processes, procs_running and procs_blocked for host and containers for any given point in time.
Steps to reproduce