Documentation ¶
Index ¶
Constants ¶
View Source
const (
SectorSize = 512
)
Variables ¶
This section is empty.
Functions ¶
func DiskIOCounters ¶
func DiskIOCounters() (map[string]DiskIOCountersStat, error)
func GetDiskSerialNumber ¶
Types ¶
type DiskIOCountersStat ¶
type DiskIOCountersStat struct { ReadCount uint64 `json:"read_count"` WriteCount uint64 `json:"write_count"` ReadBytes uint64 `json:"read_bytes"` WriteBytes uint64 `json:"write_bytes"` ReadTime uint64 `json:"read_time"` WriteTime uint64 `json:"write_time"` Name string `json:"name"` IoTime uint64 `json:"io_time"` SerialNumber string `json:"serial_number"` }
func (DiskIOCountersStat) String ¶
func (d DiskIOCountersStat) String() string
type DiskPartitionStat ¶
type DiskPartitionStat struct { Device string `json:"device"` Mountpoint string `json:"mountpoint"` Fstype string `json:"fstype"` Opts string `json:"opts"` }
func DiskPartitions ¶
func DiskPartitions(all bool) ([]DiskPartitionStat, error)
Get disk partitions. should use setmntent(3) but this implement use /etc/mtab file
func (DiskPartitionStat) String ¶
func (d DiskPartitionStat) String() string
type DiskUsageStat ¶
type DiskUsageStat struct { Path string `json:"path"` Total uint64 `json:"total"` Free uint64 `json:"free"` Used uint64 `json:"used"` UsedPercent float64 `json:"used_percent"` InodesTotal uint64 `json:"inodes_total"` InodesUsed uint64 `json:"inodes_used"` InodesFree uint64 `json:"inodes_free"` InodesUsedPercent float64 `json:"inodes_used_percent"` }
func DiskUsage ¶
func DiskUsage(path string) (*DiskUsageStat, error)
func (DiskUsageStat) String ¶
func (d DiskUsageStat) String() string
Click to show internal directories.
Click to hide internal directories.