We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c7908f7 + 757ad9e commit 003bec9Copy full SHA for 003bec9
container/libcontainer/helpers.go
@@ -186,10 +186,21 @@ func toContainerStats2(s *cgroups.Stats, ret *info.ContainerStats) {
186
ret.Memory.HierarchicalData.Pgmajfault = v
187
}
188
if v, ok := s.MemoryStats.Stats["total_inactive_anon"]; ok {
189
- ret.Memory.WorkingSet = ret.Memory.Usage - v
190
- if v, ok := s.MemoryStats.Stats["total_active_file"]; ok {
191
- ret.Memory.WorkingSet -= v
+ workingSet := ret.Memory.Usage
+ if workingSet < v {
+ workingSet = 0
192
+ } else {
193
+ workingSet -= v
194
195
+
196
+ if v, ok := s.MemoryStats.Stats["total_inactive_file"]; ok {
197
198
199
200
201
+ }
202
203
+ ret.Memory.WorkingSet = workingSet
204
205
206
0 commit comments