Fix memory stats for cache in fs2
In cgroup v2, the "cache" value from cgroup v1 is called "file" in v2.
There are no values called "cache" in v2.
@@ -88,7 +88,7 @@ func statMemory(dirPath string, stats *cgroups.Stats) error {
}
stats.MemoryStats.Stats[t] = v
}
- stats.MemoryStats.Cache = stats.MemoryStats.Stats["cache"]
+ stats.MemoryStats.Cache = stats.MemoryStats.Stats["file"]
memoryUsage, err := getMemoryDataV2(dirPath, "")
if err != nil {
