disk

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatBytes

func FormatBytes(bytes uint64) string

func FormatBytesShort

func FormatBytesShort(bytes uint64) string

func GetHealth

func GetHealth(device string) string

func GetIOStats

func GetIOStats(device string) (readSpeed, writeSpeed float64)

func GetTemperature

func GetTemperature(device string) int

Types

type DiskInfo

type DiskInfo struct {
	Device      string
	MountPoint  string
	FSType      string
	Total       uint64
	Used        uint64
	Free        uint64
	Available   uint64
	Percent     float64
	InodesTotal uint64
	InodesUsed  uint64
	InodesFree  uint64
	Serial      string
	Model       string
	Vendor      string
	Size        string
	ReadSpeed   float64
	WriteSpeed  float64
	Temperature int
	Health      string
}

func GetDisks

func GetDisks(includeVirtual bool) ([]DiskInfo, error)

Jump to

Keyboard shortcuts

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