add memory stats
This commit is contained in:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user