add memory stats

This commit is contained in:
alu
2026-08-06 11:58:34 -07:00
parent 0998633e5c
commit b99bb45877
14 changed files with 448 additions and 143 deletions
+28
View File
@@ -0,0 +1,28 @@
package drivers
// MemoryUsage holds live RAM stats from /proc/meminfo
type MemoryUsage struct {
TotalGB float64
AvailableGB float64
UsedGB float64
UsedPercent float64
}
type UsageDriver interface {
ReadUsageSensors() (MemoryUsage, error)
}
// MemoryHardware holds physical RAM slot and module details
type MemoryHardware struct {
MaxCapacityGB float64
TotalSlots int
SlotsUsed int
Generations []string
Speeds []string
FormFactors []string
ModelNames []string
}
type HardwareDriver interface {
ReadHardwareSensors() (MemoryHardware, error)
}