Skip to content

Commit c3aface

Browse files
authored
fix: fix coder stat mem (#8762)
- For cgroups v1 the wrong cgroup file was being read to determine max memory. This commit updates the file from '/sys/fs/cgroup/memory/memory.max_usage_in_bytes' to '/sys/fs/cgroup/memory/memory.limit_in_bytes'
1 parent 74c4553 commit c3aface

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cli/clistat/cgroup.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const (
2222
// CFS period for cgroup in MICROseconds
2323
cgroupV1CFSPeriodUs = "/sys/fs/cgroup/cpu,cpuacct/cpu.cfs_period_us"
2424
// Maximum memory usable by cgroup in bytes
25-
cgroupV1MemoryMaxUsageBytes = "/sys/fs/cgroup/memory/memory.max_usage_in_bytes"
25+
cgroupV1MemoryMaxUsageBytes = "/sys/fs/cgroup/memory/memory.limit_in_bytes"
2626
// Current memory usage of cgroup in bytes
2727
cgroupV1MemoryUsageBytes = "/sys/fs/cgroup/memory/memory.usage_in_bytes"
2828
// Other memory stats - we are interested in total_inactive_file

0 commit comments

Comments
 (0)