Documentation ¶
Index ¶
- Variables
- func ExecIpmiToolLocal(request []byte, strct *LinuxInBandIpmitool) []byte
- func ExecIpmiToolRemote(request []byte, strct *LinuxOutOfBand, addr string) []byte
- type GenericValidator
- type IpmiAL
- type IpmiRequest
- type IpmiResponse
- type LinuxInBandIpmitool
- type LinuxInband
- type LinuxOutOfBand
- type ParserCUPS
- type ParserCUPSIndex
- type ParserFormat
- type ParserNodeManager
- type ParserPECI
- type ParserPMBus
- type ParserPSU
- type ParserPolicy
- type ParserSR
- type ParserTemp
- type RequestDescription
Constants ¶
This section is empty.
Variables ¶
var FormatCUPS = &ParserCUPS{}
Instance of ParserCUPS
var FormatCUPSIndex = &ParserCUPSIndex{}
Instance of ParserCUPS
var FormatNodeManager = &ParserNodeManager{}
Instance of ParserNodeManager
var FormatPECI = &ParserPECI{}
Instance of ParserPECI.
var FormatPMBus = &ParserPMBus{}
Instance of ParserPMBus.
var FormatPSU = &ParserPSU{}
Instance of ParserPSU.
var FormatPolicy = &ParserPolicy{}
Instance of Power Policy parser
var FormatSR = &ParserSR{}
Instance of ParserSR.
var FormatTemp = &ParserTemp{}
Instance of ParserTempMargin.
var GenericVendor = []RequestDescription{ {IpmiRequest{[]byte{0x2e, 0x65, 0x57, 0x01, 0x00, 0x02}, 6, 0x2c}, "cups", FormatCUPS}, {IpmiRequest{[]byte{0x2e, 0x65, 0x57, 0x01, 0x00, 0x01}, 6, 0x2c}, "cups", FormatCUPSIndex}, {IpmiRequest{[]byte{0x2e, 0xc8, 0x57, 0x01, 0x00, 0x01, 0x00, 0x00}, 6, 0x2c}, "power/system", FormatNodeManager}, {IpmiRequest{[]byte{0x2e, 0xc8, 0x57, 0x01, 0x00, 0x01, 0x01, 0x00}, 6, 0x2c}, "power/cpu", FormatNodeManager}, {IpmiRequest{[]byte{0x2e, 0xc8, 0x57, 0x01, 0x00, 0x01, 0x02, 0x00}, 6, 0x2c}, "power/memory", FormatNodeManager}, {IpmiRequest{[]byte{0x2e, 0xc8, 0x57, 0x01, 0x00, 0x02, 0x00, 0x00}, 6, 0x2c}, "temperature/inlet", FormatNodeManager}, {IpmiRequest{[]byte{0x2e, 0xc8, 0x57, 0x01, 0x00, 0x05, 0x00, 0x00}, 6, 0x2c}, "temperature/outlet", FormatNodeManager}, {IpmiRequest{[]byte{0x2e, 0x4b, 0x57, 0x01, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, 6, 0x2c}, "temperature", FormatTemp}, {IpmiRequest{[]byte{0x2e, 0xf6, 0x57, 0x01, 0x00, 0x01, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a}, 6, 0x2c}, "temperature/pmbus", FormatPMBus}, {IpmiRequest{[]byte{0x2e, 0xf6, 0x57, 0x01, 0x00, 0x08, 0x00, 0x01}, 6, 0x2c}, "temperature/psu/hot_spot", FormatPSU}, {IpmiRequest{[]byte{0x2e, 0xf6, 0x57, 0x01, 0x00, 0x07, 0x00, 0x01}, 6, 0x2c}, "temperature/psu/ambient", FormatPSU}, {IpmiRequest{[]byte{0x2e, 0xc8, 0x57, 0x01, 0x00, 0x04, 0x00, 0x00}, 6, 0x2c}, "airflow", FormatNodeManager}, {IpmiRequest{[]byte{0x2e, 0x40, 0x57, 0x01, 0x00, 0x30, 0x05, 0x05, 0xa1, 0x00, 0x10, 0x00, 0x00}, 6, 0x2c}, "margin/cpu/tj", FormatPECI}, {IpmiRequest{[]byte{0x04, 0x2d, 0x08}, 6, 0x2c}, "temperature/chipset", FormatSR}, {IpmiRequest{[]byte{0x2e, 0xc2, 0x57, 0x01, 0x00, 0x0, 0x1}, 6, 0x2c}, "power/policy", FormatPolicy}, }
GenericVendor Generic list of supported requests.
Functions ¶
func ExecIpmiToolLocal ¶
func ExecIpmiToolLocal(request []byte, strct *LinuxInBandIpmitool) []byte
ExecIpmiToolLocal method runs ipmitool command on a local system
func ExecIpmiToolRemote ¶
func ExecIpmiToolRemote(request []byte, strct *LinuxOutOfBand, addr string) []byte
ExecIpmiToolRemote method runs ipmitool command on a remote system
Types ¶
type GenericValidator ¶
type GenericValidator struct { }
GenericValidator performs basic response validation. Checks response code ensures response has non-zero length.
func (*GenericValidator) Validate ¶
func (gv *GenericValidator) Validate(response IpmiResponse) error
Validate method verifies responses from IPMI device before running parsers
type IpmiAL ¶
type IpmiAL interface { BatchExecRaw(requests []IpmiRequest, host string) ([]IpmiResponse, error) GetPlatformCapabilities(requests []RequestDescription, host []string) map[string][]RequestDescription }
IpmiAL Abstract type for ipmi backend.
type IpmiRequest ¶
IpmiRequest Defines request parameter passed to abstraction layer.
type IpmiResponse ¶
IpmiResponse Defines response data.
type LinuxInBandIpmitool ¶
type LinuxInBandIpmitool struct { Device string Channel string Slave string // contains filtered or unexported fields }
LinuxInBandIpmitool implements communication with ipmitool on linux
func (*LinuxInBandIpmitool) BatchExecRaw ¶
func (al *LinuxInBandIpmitool) BatchExecRaw(requests []IpmiRequest, host string) ([]IpmiResponse, error)
BatchExecRaw performs batch of requests to given device. Returns array of responses in order corresponding to requests. Error is returned when any of requests failed.
func (*LinuxInBandIpmitool) GetPlatformCapabilities ¶
func (al *LinuxInBandIpmitool) GetPlatformCapabilities(requests []RequestDescription, _ []string) map[string][]RequestDescription
GetPlatformCapabilities returns host NM capabilities
type LinuxInband ¶
type LinuxInband struct { Device string // contains filtered or unexported fields }
LinuxInband Implements communication with openipmi driver on linux
func (*LinuxInband) BatchExecRaw ¶
func (al *LinuxInband) BatchExecRaw(requests []IpmiRequest, _ string) ([]IpmiResponse, error)
BatchExecRaw Performs batch of requests to given device. Returns array of responses in order corresponding to requests. Error is returned when any of requests failed.
func (*LinuxInband) GetPlatformCapabilities ¶
func (al *LinuxInband) GetPlatformCapabilities(requests []RequestDescription, host []string) map[string][]RequestDescription
GetPlatformCapabilities returns host NM capabilities
type LinuxOutOfBand ¶
type LinuxOutOfBand struct { Device string Channel string Slave string Addr []string User string Pass string // contains filtered or unexported fields }
LinuxOutOfBand implements communication with openipmi driver on linux
func (*LinuxOutOfBand) BatchExecRaw ¶
func (al *LinuxOutOfBand) BatchExecRaw(requests []IpmiRequest, host string) ([]IpmiResponse, error)
BatchExecRaw Performs batch of requests to given device. Returns array of responses in order corresponding to requests. Error is returned when any of requests failed.
func (*LinuxOutOfBand) GetPlatformCapabilities ¶
func (al *LinuxOutOfBand) GetPlatformCapabilities(requests []RequestDescription, host []string) map[string][]RequestDescription
GetPlatformCapabilities returns host NM capabilities
type ParserCUPS ¶
type ParserCUPS struct {
*GenericValidator
}
ParserCUPS extracts data from CUPS specific response format. Data contains info about cpu utilization and memory & io bandwidth.
func (*ParserCUPS) GetMetrics ¶
func (p *ParserCUPS) GetMetrics() []string
GetMetrics method returns metric for CUPS parser: "cpu_cstate", "memory_bandwith", "io_bandwith"
func (*ParserCUPS) Parse ¶
func (p *ParserCUPS) Parse(response IpmiResponse) map[string]uint16
Parse method returns data in human readable format
type ParserCUPSIndex ¶
type ParserCUPSIndex struct {
*GenericValidator
}
ParserCUPSIndex extracts CUPS Index from Node Manager
func (*ParserCUPSIndex) GetMetrics ¶
func (p *ParserCUPSIndex) GetMetrics() []string
GetMetrics method returns metric for CUPS parser: "index"
func (*ParserCUPSIndex) Parse ¶
func (p *ParserCUPSIndex) Parse(response IpmiResponse) map[string]uint16
Parse method returns data in human readable format
type ParserFormat ¶
type ParserFormat interface { GetMetrics() []string Validate(response IpmiResponse) error Parse(response IpmiResponse) map[string]uint16 }
ParserFormat Defines interface that all response formats must implement. GetMetrics() should return all available submetrics for given format. Main metric value should have label "" (empty string). Validate() should check response correctness. Nil is returned when response is correct. Parse() extracts submetrics from binary data.
type ParserNodeManager ¶
type ParserNodeManager struct {
*GenericValidator
}
ParserNodeManager extracts data from Node manager response format. Data contains current, min, max and average value.
func (*ParserNodeManager) GetMetrics ¶
func (p *ParserNodeManager) GetMetrics() []string
GetMetrics method returns metric for CUPS parser: "current_value", "min", "max", "avg"
func (*ParserNodeManager) Parse ¶
func (p *ParserNodeManager) Parse(response IpmiResponse) map[string]uint16
Parse method returns data in human readable format
type ParserPECI ¶
type ParserPECI struct {
*GenericValidator
}
ParserPECI extracts temperature margin datas from PECI response. Main metric value is TJ max. margin_offset current value of margin offset, which is value of TJ max reduction.
func (*ParserPECI) GetMetrics ¶
func (p *ParserPECI) GetMetrics() []string
GetMetrics method returns metrics for PECI parser: TJmax, margin_offset
func (*ParserPECI) Parse ¶
func (p *ParserPECI) Parse(response IpmiResponse) map[string]uint16
Parse method returns data in human readable format
type ParserPMBus ¶
type ParserPMBus struct {
*GenericValidator
}
ParserPMBus extracts temperatures of voltage regulators.
func (*ParserPMBus) GetMetrics ¶
func (p *ParserPMBus) GetMetrics() []string
GetMetrics returns metrics for PMBus parser: VR[0:5]
func (*ParserPMBus) Parse ¶
func (p *ParserPMBus) Parse(response IpmiResponse) map[string]uint16
Parse method returns data in human readable format
type ParserPSU ¶
type ParserPSU struct {
*GenericValidator
}
ParserPSU extracts temperatures of PSU.
func (*ParserPSU) GetMetrics ¶
GetMetrics returns metrics for PSU Parser
type ParserPolicy ¶
type ParserPolicy struct {
*GenericValidator
}
ParserPolicy extracts sensor value from response to Get Power Policy.
func (*ParserPolicy) GetMetrics ¶
func (p *ParserPolicy) GetMetrics() []string
GetMetrics returns metrics for power limit
func (*ParserPolicy) Parse ¶
func (p *ParserPolicy) Parse(response IpmiResponse) map[string]uint16
Parse method returns data in human readable format
type ParserSR ¶
type ParserSR struct {
*GenericValidator
}
ParserSR extracts sensor value from response to Get Sensor Record.
func (*ParserSR) GetMetrics ¶
GetMetrics returns metrics for sensor reading parser: current value
type ParserTemp ¶
type ParserTemp struct {
*GenericValidator
}
ParserTemp extracts temperature data. Data contains info about temperatures for first 4 cpus and 64 dimms.
func (*ParserTemp) GetMetrics ¶
func (p *ParserTemp) GetMetrics() []string
GetMetrics method returns metric for temperature parser: temperature of each cpu (up to 4), temperature of each dimm (up to 64)
func (*ParserTemp) Parse ¶
func (p *ParserTemp) Parse(response IpmiResponse) map[string]uint16
Parse method returns data in human readable format
type RequestDescription ¶
type RequestDescription struct { Request IpmiRequest MetricsRoot string Format ParserFormat }
RequestDescription Vendor exposed structure. Defines request content and response format. List of submetrics for given format should be concatenated with MetricsRoot to specify full metric name.