Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Binary represents zfs binary Binary = "zfs" // StatusOffline ... StatusOffline ZVolStatus = "Offline" // StatusHealthy ... StatusHealthy ZVolStatus = "Healthy" // StatusDegraded ... StatusDegraded ZVolStatus = "Degraded" // StatusRebuilding ... StatusRebuilding ZVolStatus = "Rebuilding" // NoDataSetAvailable ... NoDataSetAvailable ZVolStatus = "no datasets available" // InitializeLibuzfsClientErr ... InitializeLibuzfsClientErr ZVolStatus = "failed to initialize libuzfs client" // RebuildStatusInit ... RebuildStatusInit ZVolRebuildStatus = "INIT" // RebuildStatusDone ... RebuildStatusDone ZVolRebuildStatus = "DONE" // RebuildStatusErrored ... RebuildStatusErrored ZVolRebuildStatus = "ERRORED " // RebuildStatusFailed ... RebuildStatusFailed ZVolRebuildStatus = "FAILED" // RebuildStatusUnknown ... RebuildStatusUnknown ZVolRebuildStatus = "UNKNOWN" // RebuildStatusInProgress ... RebuildStatusInProgress ZVolRebuildStatus = "SNAP REBUILD INPROGRESS" // RebuildStatusActiveDataSetInProgress ... RebuildStatusActiveDataSetInProgress ZVolRebuildStatus = "ACTIVE DATASET REBUILD INPROGRESS" )
Variables ¶
View Source
var ( // Status is mapping of the zvol status with values Status = map[ZVolStatus]float64{ StatusOffline: 0, StatusHealthy: 1, StatusDegraded: 2, StatusRebuilding: 3, } // RebuildingStatus is mapping of rebuilding status of zvol with values RebuildingStatus = map[ZVolRebuildStatus]float64{ RebuildStatusInit: 0, RebuildStatusDone: 1, RebuildStatusInProgress: 2, RebuildStatusActiveDataSetInProgress: 3, RebuildStatusErrored: 4, RebuildStatusFailed: 5, RebuildStatusUnknown: 6, } )
Functions ¶
func IsNoDataSetAvailable ¶
IsNoDataSetAvailable check whether dataset available or not
func IsNotInitialized ¶
IsNotInitialized check whether libuzfs is initialized or not
Types ¶
type Stats ¶
type Stats struct {
Volumes []Volume `json:"stats"`
}
Stats represents list of volume
func StatsParser ¶
StatsParser parses the json response of zfs stats command.
type Volume ¶
type Volume struct { // Name contains name of pool appened with volume name. // It's of the form "<pool name>/<volume name>" Name string `json:"name"` Status ZVolStatus `json:"status"` // Status of volume RebuildStatus ZVolRebuildStatus `json:"rebuildStatus"` // RebuildStatus of volume SyncCount float64 `json:"syncCount"` // Total Sync processed on this volume ReadCount float64 `json:"readCount"` // Total Reads WriteCount float64 `json:"writeCount"` // Total Writes ReadBytes float64 `json:"readByte"` // Total Reads in bytes WriteBytes float64 `json:"writeByte"` // Total Writes in bytes SyncLatency float64 `json:"syncLatency"` // Latency involved in processing sync io's ReadLatency float64 `json:"readLatency"` // Latency involved in processing read io's WriteLatency float64 `json:"writeLatency"` // Latency involved in processing write io's RebuildCount float64 `json:"rebuildCnt"` // Total rebuild processed RebuildBytes float64 `json:"rebuildBytes"` // Total rebuild in bytes InflightIOCount float64 `json:"inflightIOCnt"` // Total IO's processing currently RebuildDoneCount float64 `json:"rebuildDoneCnt"` // Total no of rebuilds done DispatchedIOCount float64 `json:"dispatchedIOCnt"` // Total IO's dispatched to disk RebuildFailedCount float64 `json:"rebuildFailedCnt"` // Total no of failed rebuilds }
Volume represents the volume's various stats
type ZVolRebuildStatus ¶
type ZVolRebuildStatus string
ZVolRebuildingStatus is zvol's rebuilding status
type ZVolStatus ¶
type ZVolStatus string
ZVolStatus is zvol's status
func (ZVolStatus) String ¶
func (z ZVolStatus) String() string
Click to show internal directories.
Click to hide internal directories.