drive

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 8 Imported by: 0

README

devices-drive

Storage information for the devices-* family: physical disks and volumes as static values, usage and I/O rates as dynamic ones. Windows + Linux, no cgo required.

basic detailed full
static disk model, size, HDD/SSD, controller; volume filesystems vendor, WWN, removability, partition counts serial numbers
dynamic per-volume total/free/used % per-disk read/write B/s cumulative I/O totals

Sources: ghw for the disk inventory, gopsutil for volumes and I/O counters. Synthetic block devices (snap loops, LUKS/LVM views, zram, empty card readers) are filtered out, and each exclusion is reported as a gap so a short list is explainable. SMART health/temperatures are on the roadmap.

$ devices-drive
$ devices-drive --level detailed --every 1   # watch I/O rates
$ devices-drive tui
$ devices-drive web :8080

MIT — see LICENSE.

Documentation

Overview

Package drive reports storage information for the jarvisfriends devices-* family: physical disks and their specs as static values, volume usage and I/O rates as dynamic ones. Works without cgo on Windows and Linux.

Sources: ghw for the physical disk inventory (model, size, drive type, controller, serial), gopsutil for volumes, usage, and I/O counters. Synthetic block devices (snap loops, device-mapper views, zram) are filtered out the same way harvest's inventory does, and each exclusion is reported as a gap so a short list is explainable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

Collector implements devices.Collector for the drive category.

func New

func New() *Collector

New builds the drive collector.

func (*Collector) Category

func (*Collector) Category() string

Category satisfies devices.Collector.

func (*Collector) Dynamic

func (c *Collector) Dynamic(ctx context.Context, level devices.Level) (devices.Snapshot, error)

Dynamic satisfies devices.Collector: per-volume usage always, I/O rates at Detailed once a previous sample exists to difference against.

func (*Collector) Static

func (*Collector) Static(ctx context.Context, level devices.Level) (devices.Snapshot, error)

Static satisfies devices.Collector: the physical disk inventory plus the volume layout (mountpoints and filesystems), which dynamic usage samples later merge onto by ID.

Directories

Path Synopsis
cmd
devices-drive command
Command devices-drive reports storage specs and live readings using the shared devices-common CLI: one-shot, --json, --every 0.25, --tui, --web.
Command devices-drive reports storage specs and live readings using the shared devices-common CLI: one-shot, --json, --every 0.25, --tui, --web.

Jump to

Keyboard shortcuts

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