cgroupV1: memory.memsw.usage_in_bytes: no such file or directory

This commit is contained in:
nujz 2022-08-23 17:37:47 +08:00
parent b33e3eac60
commit 76f6eb3edf

View File

@ -40,7 +40,7 @@ func cgroupV1Mem() (memoryMax, memoryUsed, swapMax, swapUsed uint64, err error)
if err != nil { if err != nil {
return 0, 0, 0, 0, err return 0, 0, 0, 0, err
} }
stats, err := c.Stat() stats, err := c.Stat(cgroups.IgnoreNotExist)
if err != nil { if err != nil {
return 0, 0, 0, 0, err return 0, 0, 0, 0, err
} }