package iscsi
import "github.com/prometheus/procfs/iscsi"
Index ¶
- func ReadWriteOPS(iqnPath string, tpgt string, lun string) (readmb uint64, writemb uint64, iops uint64, err error)
- type FILEIO
- type FS
- func NewFS(sysfsPath string, configfsMountPoint string) (FS, error)
- func (fs FS) GetFileioUdev(fileioNumber string, objectName string) (*FILEIO, error)
- func (fs FS) GetIblockUdev(iblockNumber string, objectName string) (*IBLOCK, error)
- func (fs FS) GetRBDMatch(rbdNumber string, poolImage string) (*RBD, error)
- func (fs FS) GetRDMCPPath(rdmcpNumber string, objectName string) (*RDMCP, error)
- func (fs FS) ISCSIStats() ([]*Stats, error)
- func (fs FS) Path(p ...string) string
- type IBLOCK
- type LUN
- type RBD
- type RDMCP
- type Stats
- type TPGT
Functions ¶
func ReadWriteOPS ¶
func ReadWriteOPS(iqnPath string, tpgt string, lun string) (readmb uint64, writemb uint64, iops uint64, err error)
ReadWriteOPS read and return the stat of read and write in megabytes, and total commands that send to the target.
Types ¶
type FILEIO ¶
type FILEIO struct {
Name string // name of the fileio
Fnumber string // number related to the backstore
ObjectName string // place holder for object in iscsi object
Filename string // link to the actual file being export
}
FILEIO struct for backstore info.
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
FS represents the pseudo-filesystem configfs, which provides an interface to iscsi kernel data structures in sysfs as /sys and configfs as /sys/kernel/config.
func NewFS ¶
NewFS returns a new configfs mounted under the given mount point. It will error and return empty FS if the mount point can't be read. For the ease of use, an empty string parameter configfsMountPoint will call internal fs for the default sys path as /sys/kernel/config.
func (FS) GetFileioUdev ¶
GetFileioUdev is getting the actual info to build up the FILEIO data and match with the enable target.
func (FS) GetIblockUdev ¶
GetIblockUdev is getting the actual info to build up the IBLOCK data and match with the enable target.
func (FS) GetRBDMatch ¶
GetRBDMatch is getting the actual info to build up the RBD data and match with the enable target.
func (FS) GetRDMCPPath ¶
GetRDMCPPath is getting the actual info to build up RDMCP data.
func (FS) ISCSIStats ¶
ISCSIStats getting iscsi runtime information.
func (FS) Path ¶
Path is a helper function to get configfs path.
type IBLOCK ¶
type IBLOCK struct {
Name string // name of the iblock
Bnumber string // number related to the backstore
ObjectName string // place holder for object in iscsi object
Iblock string // link to the actual block being export
}
IBLOCK struct for backstore info.
type LUN ¶
type LUN struct {
Name string // name of the lun
LunPath string // file path of the lun
Backstore string // backstore of the lun
ObjectName string // place holder for object
TypeNumber string // place holder for number of the device
}
LUN struct for sys logical unit number info.
type RBD ¶
type RBD struct {
Name string // name of the rbd
Rnumber string // number related to the backstore
Pool string // place holder for the rbd pool
Image string // place holder for the rbd image
}
RBD struct for backstore info.
type RDMCP ¶
type RDMCP struct {
Name string // name of the rdm_cp
ObjectName string // place holder for object name
}
RDMCP struct for backstore info.
type Stats ¶
Stats struct for all targets info.
func GetStats ¶
GetStats is the main iscsi status information func for building the path and prepare info for enable iscsi.
type TPGT ¶
type TPGT struct {
Name string // name of the tpgt group
TpgtPath string // file path of tpgt
IsEnable bool // is the tpgt enable
Luns []LUN // the Luns that tpgt has
}
TPGT struct for sys target portal group tag info.
Source Files ¶
- Version
- v0.16.1 (latest)
- Published
- Apr 19, 2025
- Platform
- windows/amd64
- Imports
- 8 packages
- Last checked
- 10 months ago –
Tools for package owners.