ctlstats

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

SPDX-Licence-Identifier: Apache-2.0 AND BSD-2-Clause-FreeBSD

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStats

func GetStats() map[uint32]Ctl_io_stats

Wrapper around CGO code to collect the statistics of every LUN

Types

type CtlPortList

type CtlPortList struct {
	Targets []Target `xml:"targ_port"`
	// contains filtered or unexported fields
}

func GetTargets

func GetTargets() CtlPortList

Wrapper around CGO code to get the list of targets

func (CtlPortList) GetLunId

func (cp CtlPortList) GetLunId(lunNumber uint) (uint, error)

Get Lun ID in target from kernel LUN number

func (CtlPortList) GetLunTarget

func (cp CtlPortList) GetLunTarget(lunNumber uint) *Target

Do a reverse match of Kernel Lun number to Target

type Ctl_io_stats

type Ctl_io_stats struct {
	Bytes      map[Ctl_stats_types]uint64
	Operations map[Ctl_stats_types]uint64
	Dmas       map[Ctl_stats_types]uint64
}

Statistics exported for a specific LUN or Port

type Ctl_stats_types

type Ctl_stats_types int
const (
	CTL_STATS_NO_IO Ctl_stats_types = iota
	CTL_STATS_READ
	CTL_STATS_WRITE
)

type Initiator

type Initiator struct {
	Id   uint   `xml:"id,attr"`
	Name string `xml:",chardata"`
}

type LUN

type LUN struct {
	Id        uint `xml:"id,attr"`
	LunNumber uint `xml:",chardata"`
}

type Target

type Target struct {
	Name       string      `xml:"target"`
	LUN        []LUN       `xml:"lun"`
	Initiators []Initiator `xml:"initiator"`
}

Jump to

Keyboard shortcuts

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