Documentation ¶
Index ¶
Constants ¶
View Source
const ( // NVMCliCmdImpl is a base CMD for nvme_cli NVMCliCmdImpl = "nvme" // NVMeDeviceCmdImpl is a CMD for listing all nvme devices in JSON format NVMeDeviceCmdImpl = NVMCliCmdImpl + " list --output-format=json" // NVMeHealthCmdImpl is a CMD to get SMART information about NVMe device in JSON format NVMeHealthCmdImpl = NVMCliCmdImpl + " smart-log %s --output-format=json" // NVMeVendorCmdImpl is a CMD to get SMART information about NVMe device in JSON format NVMeVendorCmdImpl = NVMCliCmdImpl + " id-ctrl %s --output-format=json" // DevicesKey is the key to find NVMe devices in nvme json output DevicesKey = "Devices" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NVMDevice ¶
type NVMDevice struct { DevicePath string `json:"DevicePath,omitempty"` Firmware string `json:"Firmware,omitempty"` ModelNumber string `json:"ModelNumber,omitempty"` SerialNumber string `json:"SerialNumber,omitempty"` PhysicalSize int64 `json:"PhysicalSize,omitempty"` // Can VID be string for nvme? Vendor int `json:"vid,omitempty"` Health string }
NVMDevice represents devices from nvme list output
type NVMECLI ¶
type NVMECLI struct {
// contains filtered or unexported fields
}
NVMECLI is a wrap for system nvem_cli util
func NewNVMECLI ¶
func NewNVMECLI(e command.CmdExecutor, logger *logrus.Logger) *NVMECLI
NewNVMECLI is a constructor for NVMECLI
func (*NVMECLI) GetNVMDevices ¶
GetNVMDevices gets information about NVMDevice using nvme_cli util
type SMARTLog ¶
type SMARTLog struct {
CriticalWarning int `json:"critical_warning,omitempty"`
}
SMARTLog represents SMART information for NVMe devices
type WrapNvmecli ¶
WrapNvmecli is an interface that encapsulates operation with system nvme util
Click to show internal directories.
Click to hide internal directories.