Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Binary represent zpool binary Binary = "zpool" // Offline ... Offline ZpoolStatus = "OFFLINE" // Online ... Online ZpoolStatus = "ONLINE" // Degraded ... Degraded ZpoolStatus = "DEGRADED" // Faulted ... Faulted ZpoolStatus = "FAULTED" // Removed ... Removed ZpoolStatus = "REMOVED" Unavail ZpoolStatus = "UNAVAIL" // NoPoolAvailable ... NoPoolAvailable ZpoolStatus = "no pools available" // InitializeLibuzfsClientErr ... InitializeLibuzfsClientErr ZpoolStatus = "failed to initialize libuzfs client" // InCompleteStdoutErr is err msg when recieved output id incomplete InCompleteStdoutErr = "Couldn't receive complete output" // ZpoolLastSyncCommandErrorOrUnknownUnset is for setting value as 0 for zpool last sync metrics ZpoolLastSyncCommandErrorOrUnknownUnset = 0 // ZpoolLastSyncCommandErrorOrUnknownSet is for setting value as 1 for zpool last sync metrics ZpoolLastSyncCommandErrorOrUnknownSet = 1 )
Variables ¶
View Source
var ( // Status is map of zpool status with values Status = map[ZpoolStatus]float64{ Offline: 0, Online: 1, Degraded: 2, Faulted: 3, Removed: 4, Unavail: 5, NoPoolAvailable: 6, } )
Functions ¶
func IsNotAvailable ¶
IsNotAvailable checks whether any pool is availble or not.
func IsNotInitialized ¶
IsNotInitialized checks whether libuzfs client initialized or not.
Types ¶
type Stats ¶
type Stats struct { Status ZpoolStatus // Status represents status of a Pool Name string Used string // Used size of Pools Free string // Free size of Pools Size string // Size of pool UsedCapacityPercent string // Used size of pools in precent }
Stats is used to store the values of parsed stats of zpool list -Hp command
func ListParser ¶
ListParser parses output of zpool list -Hp Command: zpool list -Hp Output: cstor-5ce4639a-2dc1-11e9-bbe3-42010a80017a 10670309376 716288 10669593088 - 0 0 1.00 ONLINE -
Click to show internal directories.
Click to hide internal directories.