Setting NVM power budget information on MachineInfo struct

Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
This commit is contained in:
Maciej Iwanowski 2020-02-25 03:41:08 +01:00 committed by Maciej "Iwan" Iwanowski
parent 6dac5794f7
commit 8594a6fb2c
No known key found for this signature in database
GPG Key ID: 2484258A4DD3EE84

View File

@ -78,6 +78,11 @@ func Info(sysFs sysfs.SysFs, fsInfo fs.FsInfo, inHostNamespace bool) (*info.Mach
return nil, err
}
nvmPowerBudget, err := GetNVMAvgPowerBudget()
if err != nil {
return nil, err
}
hugePagesInfo, err := GetHugePagesInfo(hugepagesDirectory)
if err != nil {
return nil, err
@ -120,6 +125,7 @@ func Info(sysFs sysfs.SysFs, fsInfo fs.FsInfo, inHostNamespace bool) (*info.Mach
CpuFrequency: clockSpeed,
MemoryCapacity: memoryCapacity,
MemoryByType: memoryByType,
NVMAvgPowerBudget: nvmPowerBudget,
HugePages: hugePagesInfo,
DiskMap: diskMap,
NetworkDevices: netDevices,