Documentation
¶
Index ¶
- func Collect(cfg *config.Config) (*types.SystemInfo, error)
- func CollectBattery() (*types.BatteryData, error)
- func CollectCPU() (*types.CPUData, error)
- func CollectDisk(includeSMART bool) (*types.DiskData, error)
- func CollectGPU() (*types.GPUData, error)
- func CollectMemory() (*types.MemoryData, error)
- func CollectNetwork() (*types.NetworkData, error)
- func CollectProcesses() (*types.ProcessData, error)
- func CollectSMART() []types.SMARTInfo
- func CollectSystem() (*types.SystemData, error)
- type AtaSmartAttrs
- type DmidecodeMemory
- type NvidiaGPU
- type NvidiaSMILog
- type NvmeSmartLog
- type PowerOnTime
- type SmartAttribute
- type SmartStatus
- type SmartctlOutput
- type Temperature
- type UserCapacity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Collect ¶
func Collect(cfg *config.Config) (*types.SystemInfo, error)
Collect gathers all requested system information
func CollectBattery ¶ added in v1.0.3
func CollectBattery() (*types.BatteryData, error)
CollectBattery collects battery information on Linux
func CollectDisk ¶
CollectDisk gathers disk and partition information
func CollectMemory ¶
func CollectMemory() (*types.MemoryData, error)
CollectMemory gathers memory information
func CollectNetwork ¶
func CollectNetwork() (*types.NetworkData, error)
CollectNetwork gathers network interface information
func CollectProcesses ¶
func CollectProcesses() (*types.ProcessData, error)
CollectProcesses gathers process information
func CollectSMART ¶
CollectSMART gathers SMART data from drives
func CollectSystem ¶
func CollectSystem() (*types.SystemData, error)
CollectSystem gathers general system information
Types ¶
type AtaSmartAttrs ¶
type AtaSmartAttrs struct {
Table []SmartAttribute `json:"table"`
}
type DmidecodeMemory ¶
type DmidecodeMemory struct {
Handle string `json:"handle"`
Type string `json:"type"`
Size string `json:"size"`
FormFactor string `json:"form_factor"`
Locator string `json:"locator"`
BankLocator string `json:"bank_locator"`
MemoryType string `json:"type_detail"`
Speed string `json:"speed"`
Manufacturer string `json:"manufacturer"`
SerialNumber string `json:"serial_number"`
PartNumber string `json:"part_number"`
ConfiguredSpeed string `json:"configured_memory_speed"`
}
DmidecodeMemory represents dmidecode memory device output
type NvidiaGPU ¶
type NvidiaGPU struct {
ProductName string `xml:"product_name"`
UUID string `xml:"uuid"`
PCIBus string `xml:"pci>pci_bus"`
Temperature struct {
Current string `xml:"gpu_temp"`
} `xml:"temperature"`
Utilization struct {
GPU string `xml:"gpu_util"`
Memory string `xml:"memory_util"`
} `xml:"utilization"`
FBMemory struct {
Total string `xml:"total"`
Used string `xml:"used"`
Free string `xml:"free"`
} `xml:"fb_memory_usage"`
Power struct {
Draw string `xml:"power_draw"`
Limit string `xml:"power_limit"`
} `xml:"power_readings"`
Clocks struct {
Graphics string `xml:"graphics_clock"`
Memory string `xml:"mem_clock"`
} `xml:"clocks"`
FanSpeed string `xml:"fan_speed"`
DriverVersion string `xml:"driver_version"`
}
type NvidiaSMILog ¶
type NvidiaSMILog struct {
GPUs []NvidiaGPU `xml:"gpu"`
}
NvidiaSMILog represents the XML output from nvidia-smi
type NvmeSmartLog ¶
type PowerOnTime ¶
type PowerOnTime struct {
Hours uint64 `json:"hours"`
}
type SmartAttribute ¶
type SmartStatus ¶
type SmartStatus struct {
Passed bool `json:"passed"`
}
type SmartctlOutput ¶
type SmartctlOutput struct {
Device struct {
Name string `json:"name"`
InfoName string `json:"info_name"`
Type string `json:"type"`
Protocol string `json:"protocol"`
} `json:"device"`
ModelFamily string `json:"model_family"`
ModelName string `json:"model_name"`
SerialNumber string `json:"serial_number"`
UserCapacity UserCapacity `json:"user_capacity"`
SmartStatus SmartStatus `json:"smart_status"`
Temperature Temperature `json:"temperature"`
PowerOnTime PowerOnTime `json:"power_on_time"`
AtaSmartAttrs AtaSmartAttrs `json:"ata_smart_attributes"`
NvmeSmartLog NvmeSmartLog `json:"nvme_smart_health_information_log"`
}
SmartctlOutput represents the JSON output from smartctl
type Temperature ¶
type Temperature struct {
Current int `json:"current"`
}
type UserCapacity ¶
Click to show internal directories.
Click to hide internal directories.