Skip to content

Commit

Permalink
Fix crane agent panic when pod use ext memory
Browse files Browse the repository at this point in the history
Signed-off-by: payall4u <payall4u@qq.com>
  • Loading branch information
payall4u committed Jan 21, 2024
1 parent 5c18026 commit ea20086
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ensurance/collector/cadvisor/cadvisor_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (c *CadvisorCollector) Collect() (map[string][]common.TimeSeries, error) {
continue
}

if hasExtMemRes {
if hasExtMemRes && v.Stats[0].Memory != nil {
extResMemUse += float64(v.Stats[0].Memory.WorkingSet)
}

Expand Down

0 comments on commit ea20086

Please sign in to comment.