Using a struct to store all NVM-related information
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
This commit is contained in:
parent
920cb80d65
commit
338904e6ed
@ -176,8 +176,7 @@ type MachineInfo struct {
|
||||
// Memory capacity and number of DIMMs by memory type
|
||||
MemoryByType map[string]*MemoryInfo `json:"memory_by_type"`
|
||||
|
||||
// Average power budget for NVM devices configured in BIOS.
|
||||
NVMAvgPowerBudget uint `json:"nvm_avg_power_budget"`
|
||||
NVMInfo NVMInfo `json:"nvm_info"`
|
||||
|
||||
// HugePages on this machine.
|
||||
HugePages []HugePagesInfo `json:"hugepages"`
|
||||
@ -222,6 +221,11 @@ type MemoryInfo struct {
|
||||
DimmCount uint `json:"dimm_count"`
|
||||
}
|
||||
|
||||
type NVMInfo struct {
|
||||
// Average power budget for NVM devices configured in BIOS.
|
||||
AvgPowerBudget uint `json:"avg_power_budget"`
|
||||
}
|
||||
|
||||
type VersionInfo struct {
|
||||
// Kernel version.
|
||||
KernelVersion string `json:"kernel_version"`
|
||||
|
@ -125,7 +125,7 @@ func Info(sysFs sysfs.SysFs, fsInfo fs.FsInfo, inHostNamespace bool) (*info.Mach
|
||||
CpuFrequency: clockSpeed,
|
||||
MemoryCapacity: memoryCapacity,
|
||||
MemoryByType: memoryByType,
|
||||
NVMAvgPowerBudget: nvmPowerBudget,
|
||||
NVMInfo: info.NVMInfo{AvgPowerBudget: nvmPowerBudget},
|
||||
HugePages: hugePagesInfo,
|
||||
DiskMap: diskMap,
|
||||
NetworkDevices: netDevices,
|
||||
|
Loading…
Reference in New Issue
Block a user