Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatteryInfo ¶ added in v0.0.3
BatteryInfo holds battery status (nil on desktops or if unavailable)
type FanInfo ¶ added in v0.0.5
type FanInfo struct {
Speed float64 `json:"speed"` // RPM
Name string `json:"name"` // Fan identifier
}
FanInfo holds fan speed readings
type GPUInfo ¶ added in v0.0.5
type GPUInfo struct {
Usage *float64 `json:"usage,omitempty"` // GPU utilization percent
MemoryUsed *uint64 `json:"memory_used,omitempty"` // VRAM used in bytes
MemoryTotal *uint64 `json:"memory_total,omitempty"` // Total VRAM in bytes
}
GPUInfo holds GPU metrics
type LoadAverages ¶ added in v0.0.3
type LoadAverages struct {
Load1 float64 `json:"load1"`
Load5 float64 `json:"load5"`
Load15 float64 `json:"load15"`
}
LoadAverages holds Unix-style load averages (nil on Windows)
type MachineType ¶ added in v0.0.5
type MachineType string
MachineType represents the type of machine
const ( MachineTypeLaptop MachineType = "laptop" MachineTypeDesktop MachineType = "desktop" MachineTypeServer MachineType = "server" MachineTypeVM MachineType = "virtual_machine" MachineTypeContainer MachineType = "container" MachineTypeUnknown MachineType = "unknown" )
type PlatformInfo ¶ added in v0.0.5
type PlatformInfo struct {
OS string `json:"os"` // darwin, linux, windows
Architecture string `json:"architecture"` // amd64, arm64
OSVersion string `json:"os_version"` // e.g., "14.0" for macOS Sonoma
Kernel string `json:"kernel"` // kernel version
}
PlatformInfo holds OS and architecture info
type Snapshot ¶
type Snapshot struct {
Timestamp time.Time `json:"timestamp"`
Uptime time.Duration `json:"uptime"`
MemoryTotal uint64 `json:"memory_total"`
MemoryUsed uint64 `json:"memory_used"`
MemoryPercent float64 `json:"memory_percent"`
CPUPercent float64 `json:"cpu_percent"`
DiskTotal uint64 `json:"disk_total"`
DiskUsed uint64 `json:"disk_used"`
DiskPercent float64 `json:"disk_percent"`
// Machine identity
MachineType MachineType `json:"machine_type"`
Platform *PlatformInfo `json:"platform,omitempty"`
TimeOfDay TimeOfDay `json:"time_of_day"`
// Optional metrics (nil if unavailable on platform)
LoadAverages *LoadAverages `json:"load_averages,omitempty"`
SwapTotal *uint64 `json:"swap_total,omitempty"`
SwapUsed *uint64 `json:"swap_used,omitempty"`
SwapPercent *float64 `json:"swap_percent,omitempty"`
Battery *BatteryInfo `json:"battery,omitempty"`
ProcessCount *int `json:"process_count,omitempty"`
NetworkIO *NetworkIO `json:"network_io,omitempty"`
Thermal *ThermalInfo `json:"thermal,omitempty"`
Fans []*FanInfo `json:"fans,omitempty"`
GPU *GPUInfo `json:"gpu,omitempty"`
}
Snapshot represents a moment-in-time capture of system state
func SnapshotFromJSON ¶ added in v0.0.2
SnapshotFromJSON deserializes a snapshot from a JSON string
type ThermalInfo ¶ added in v0.0.5
type ThermalInfo struct {
CPUTemp *float64 `json:"cpu_temp,omitempty"` // Celsius
GPUTemp *float64 `json:"gpu_temp,omitempty"` // Celsius
HighestTemp float64 `json:"highest_temp"` // Highest sensor reading
SensorCount int `json:"sensor_count"` // Number of sensors read
}
ThermalInfo holds temperature readings
Click to show internal directories.
Click to hide internal directories.