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
|
// Memory capacity and number of DIMMs by memory type
|
||||||
MemoryByType map[string]*MemoryInfo `json:"memory_by_type"`
|
MemoryByType map[string]*MemoryInfo `json:"memory_by_type"`
|
||||||
|
|
||||||
// Average power budget for NVM devices configured in BIOS.
|
NVMInfo NVMInfo `json:"nvm_info"`
|
||||||
NVMAvgPowerBudget uint `json:"nvm_avg_power_budget"`
|
|
||||||
|
|
||||||
// HugePages on this machine.
|
// HugePages on this machine.
|
||||||
HugePages []HugePagesInfo `json:"hugepages"`
|
HugePages []HugePagesInfo `json:"hugepages"`
|
||||||
@ -222,6 +221,11 @@ type MemoryInfo struct {
|
|||||||
DimmCount uint `json:"dimm_count"`
|
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 {
|
type VersionInfo struct {
|
||||||
// Kernel version.
|
// Kernel version.
|
||||||
KernelVersion string `json:"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,
|
CpuFrequency: clockSpeed,
|
||||||
MemoryCapacity: memoryCapacity,
|
MemoryCapacity: memoryCapacity,
|
||||||
MemoryByType: memoryByType,
|
MemoryByType: memoryByType,
|
||||||
NVMAvgPowerBudget: nvmPowerBudget,
|
NVMInfo: info.NVMInfo{AvgPowerBudget: nvmPowerBudget},
|
||||||
HugePages: hugePagesInfo,
|
HugePages: hugePagesInfo,
|
||||||
DiskMap: diskMap,
|
DiskMap: diskMap,
|
||||||
NetworkDevices: netDevices,
|
NetworkDevices: netDevices,
|
||||||
|
Loading…
Reference in New Issue
Block a user