Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatBytes ¶
FormatBytes converts bytes to human-readable format
Types ¶
type CPUStats ¶
type CPUStats struct {
Cores int `json:"cores"` // Number of CPU cores
Goroutines int `json:"goroutines"` // Number of active goroutines
}
CPUStats contains CPU statistics
type DiskStats ¶
type DiskStats struct {
Total uint64 `json:"total"` // Total disk space in bytes
Free uint64 `json:"free"` // Free disk space in bytes
Used uint64 `json:"used"` // Used disk space in bytes
Percent float64 `json:"percent"` // Usage percentage (0-100)
}
DiskStats contains disk usage statistics
type DiskUsage ¶
DiskUsage represents disk usage statistics
func GetDiskUsage ¶
GetDiskUsage returns raw disk usage for the given path. It is a thin wrapper around the platform-specific getDiskUsage.
type MemoryStats ¶
type MemoryStats struct {
Total uint64 `json:"total"` // Total memory in bytes
Available uint64 `json:"available"` // Available memory in bytes
Used uint64 `json:"used"` // Used memory in bytes
Percent float64 `json:"percent"` // Usage percentage (0-100)
}
MemoryStats contains memory usage statistics
type SystemStats ¶
type SystemStats struct {
Memory MemoryStats `json:"memory"`
Disk DiskStats `json:"disk"`
CPU CPUStats `json:"cpu"`
}
SystemStats contains system resource statistics
func GetSystemStats ¶
func GetSystemStats(sharedDir string) SystemStats
GetSystemStats collects current system statistics
Click to show internal directories.
Click to hide internal directories.