infiniband2

package
v0.0.0-...-7301b9a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2021 License: MIT Imports: 9 Imported by: 0

README

InfiniBand2 Input Plugin

This plugin gathers statistics for all InfiniBand devices and ports on the system directly from /sys/class/infiniband, and calculates speed rates or sending and receiving.

Supported Platforms: Linux

Configuration
[[inputs.infiniband2]]
  # no configuration
Metrics
  • infiniband2
    • tags:
      • cname
      • port
      • phys_state
      • state
    • fields:
      • rate_gb
      • send_bytes
      • recv_bytes
Example Output
infiniband,caname=mlx4_0,host=gfs03,phys_state=LinkUp,port=1,serial_number=DJY5232,state=ACTIVE,user=root rate_gb=40i,send_bytes=12340i,recv_bytes=2340i 1590720053000000000

Documentation

Index

Constants

View Source
const BASEDIR = "/sys/class/infiniband/"

BASEDIR - the sysfs entry for infiniband device

View Source
const DEFAULTLUN = 4

DEFAULTLUN -- the number of lun of hca port

Variables

This section is empty.

Functions

func ExtractIBRate

func ExtractIBRate(portratestr string) (int64, int64)

ExtractIBRate --- get a GB rate and number of luns

Types

type IBPort

type IBPort struct {
	ConfigfsPath string
	CA           string
	Port         string
	State        string
	PhysState    string
	RateGB       int64

	SendBytes int64
	RecvBytes int64

	NowXmitData  int64
	NowRecvData  int64
	NowEpoch     int64
	LastXmitData int64
	LastRecvData int64
	LastEpoch    int64
	// contains filtered or unexported fields
}

IBPort -- Ports of HCA card

func (*IBPort) CalcRate

func (s *IBPort) CalcRate()

CalcRate -- calculate speed of send and receive

func (*IBPort) Gather

func (s *IBPort) Gather() error

Gather -- gather metrics on one port

type Infiniband2

type Infiniband2 struct {
	IgnorDownPort       bool  `toml:"ignor_down_port"`
	ScanAfterIntervals  int64 `toml:"scan_after_intervals"`
	ScanIntervalCounter int64
	// contains filtered or unexported fields
}

Infiniband2 --

func (*Infiniband2) Description

func (s *Infiniband2) Description() string

Description -- this is necessary for telegraf plugins framework

func (*Infiniband2) FlushOut

func (s *Infiniband2) FlushOut(acc *telegraf.Accumulator, port *IBPort)

FlushOut -- call Accumulator to output

func (*Infiniband2) Gather

func (s *Infiniband2) Gather(acc telegraf.Accumulator) error

Gather -- invoked by telegraf at intervals

func (*Infiniband2) SampleConfig

func (s *Infiniband2) SampleConfig() string

SampleConfig --

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL