17244: Refactor crunchstat to use cgroup unified/hybrid modes.
authorTom Clegg <tom@curii.com>
Tue, 11 Jul 2023 14:03:58 +0000 (10:03 -0400)
committerTom Clegg <tom@curii.com>
Wed, 19 Jul 2023 04:56:55 +0000 (00:56 -0400)
commitc3d26486e5d4e4bd11964285a6fece4897120cf8
tree651396ae3f136fe4b34cfda7be500d54e5c6e6fa
parentb28098a9199e87659046307129b9226749ebf9b6
17244: Refactor crunchstat to use cgroup unified/hybrid modes.

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>
69 files changed:
.licenseignore
cmd/arvados-server/cmd.go
lib/crunchrun/cgroup_test.go
lib/crunchrun/crunchrun.go
lib/crunchrun/crunchrun_test.go
lib/crunchrun/docker.go
lib/crunchrun/executor.go
lib/crunchrun/singularity.go
lib/crunchstat/command.go [new file with mode: 0644]
lib/crunchstat/crunchstat.go
lib/crunchstat/crunchstat_test.go
lib/crunchstat/testdata/debian11/proc/4153022/cgroup [new file with mode: 0755]
lib/crunchstat/testdata/debian11/proc/4153022/cpuset [new file with mode: 0755]
lib/crunchstat/testdata/debian11/proc/4153022/net/dev [new file with mode: 0755]
lib/crunchstat/testdata/debian11/proc/mounts [new file with mode: 0755]
lib/crunchstat/testdata/debian11/proc/self/smaps [new file with mode: 0755]
lib/crunchstat/testdata/debian11/sys/fs/cgroup/user.slice/cpuset.cpus.effective [new file with mode: 0755]
lib/crunchstat/testdata/debian11/sys/fs/cgroup/user.slice/io.stat [new file with mode: 0755]
lib/crunchstat/testdata/debian11/sys/fs/cgroup/user.slice/user-1000.slice/session-5424.scope/cpu.stat [new file with mode: 0755]
lib/crunchstat/testdata/debian11/sys/fs/cgroup/user.slice/user-1000.slice/session-5424.scope/memory.current [new file with mode: 0755]
lib/crunchstat/testdata/debian11/sys/fs/cgroup/user.slice/user-1000.slice/session-5424.scope/memory.stat [new file with mode: 0755]
lib/crunchstat/testdata/debian11/sys/fs/cgroup/user.slice/user-1000.slice/session-5424.scope/memory.swap.current [new file with mode: 0755]
lib/crunchstat/testdata/debian12/proc/1115883/cgroup [new file with mode: 0755]
lib/crunchstat/testdata/debian12/proc/1115883/cpuset [new file with mode: 0755]
lib/crunchstat/testdata/debian12/proc/1115883/net/dev [new file with mode: 0755]
lib/crunchstat/testdata/debian12/proc/mounts [new file with mode: 0755]
lib/crunchstat/testdata/debian12/proc/self/smaps [new file with mode: 0755]
lib/crunchstat/testdata/debian12/sys/fs/cgroup/user.slice/cpuset.cpus.effective [new file with mode: 0755]
lib/crunchstat/testdata/debian12/sys/fs/cgroup/user.slice/io.stat [new file with mode: 0755]
lib/crunchstat/testdata/debian12/sys/fs/cgroup/user.slice/user-1000.slice/session-4.scope/cpu.stat [new file with mode: 0755]
lib/crunchstat/testdata/debian12/sys/fs/cgroup/user.slice/user-1000.slice/session-4.scope/memory.current [new file with mode: 0755]
lib/crunchstat/testdata/debian12/sys/fs/cgroup/user.slice/user-1000.slice/session-4.scope/memory.stat [new file with mode: 0755]
lib/crunchstat/testdata/debian12/sys/fs/cgroup/user.slice/user-1000.slice/session-4.scope/memory.swap.current [new file with mode: 0755]
lib/crunchstat/testdata/fakestat/cgroup.procs [deleted file]
lib/crunchstat/testdata/fakestat/memory.stat [deleted file]
lib/crunchstat/testdata/ubuntu1804/proc/2523/cgroup [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu1804/proc/2523/cpuset [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu1804/proc/2523/net/dev [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu1804/proc/mounts [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu1804/proc/self/smaps [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu1804/sys/fs/cgroup/blkio/user.slice/blkio.throttle.io_service_bytes [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu1804/sys/fs/cgroup/cpu,cpuacct/user.slice/cpuacct.stat [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu1804/sys/fs/cgroup/cpuset/cpuset.cpus [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu1804/sys/fs/cgroup/memory/user.slice/memory.stat [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu1804/sys/fs/cgroup/unified/user.slice/user-1000.slice/session-1.scope/cpu.stat [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2004/proc/1360/cgroup [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2004/proc/1360/cpuset [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2004/proc/1360/net/dev [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2004/proc/mounts [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2004/proc/self/smaps [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2004/sys/fs/cgroup/blkio/user.slice/blkio.throttle.io_service_bytes [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2004/sys/fs/cgroup/cpu,cpuacct/user.slice/cpuacct.stat [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2004/sys/fs/cgroup/cpuset/cpuset.cpus [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2004/sys/fs/cgroup/memory/user.slice/user-1000.slice/session-2.scope/memory.stat [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2004/sys/fs/cgroup/unified/user.slice/user-1000.slice/session-2.scope/cpu.stat [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2204/proc/1967/cgroup [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2204/proc/1967/cpuset [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2204/proc/1967/net/dev [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2204/proc/mounts [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2204/proc/self/smaps [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2204/sys/fs/cgroup/user.slice/cpuset.cpus.effective [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2204/sys/fs/cgroup/user.slice/io.stat [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2204/sys/fs/cgroup/user.slice/user-1000.slice/session-1.scope/cpu.stat [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2204/sys/fs/cgroup/user.slice/user-1000.slice/session-1.scope/memory.current [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2204/sys/fs/cgroup/user.slice/user-1000.slice/session-1.scope/memory.stat [new file with mode: 0755]
lib/crunchstat/testdata/ubuntu2204/sys/fs/cgroup/user.slice/user-1000.slice/session-1.scope/memory.swap.current [new file with mode: 0755]
services/crunchstat/.gitignore [deleted file]
services/crunchstat/crunchstat.go [deleted file]
services/crunchstat/crunchstat_test.go [deleted file]