shimv2: Add missing page size to Hugetlb Stat

Fixes: #1856

Signed-off-by: Odin Ugedal <odin@ugedal.com>
This commit is contained in:
Odin Ugedal 2019-07-03 16:59:08 +02:00
parent ed693fe3df
commit da7f5f3796
No known key found for this signature in database
GPG Key ID: AFF9C8242CF7A7AF

View File

@ -31,13 +31,14 @@ func marshalMetrics(s *service, containerID string) (*google_protobuf.Any, error
func statsToMetrics(cgStats *vc.CgroupStats) *cgroups.Metrics {
var hugetlb []*cgroups.HugetlbStat
for _, v := range cgStats.HugetlbStats {
for pageSize, v := range cgStats.HugetlbStats {
hugetlb = append(
hugetlb,
&cgroups.HugetlbStat{
Usage: v.Usage,
Max: v.MaxUsage,
Failcnt: v.Failcnt,
Usage: v.Usage,
Max: v.MaxUsage,
Failcnt: v.Failcnt,
Pagesize: pageSize,
})
}