The second review of #129 found a read stuck in the kernel kept the file fresh and the module healthy, smartd as a second reader could wake or keep awake the drives the watch spares, and a board chip's maximum could stop a fan. Read each drive in its own goroutine from a root reader of the module's own, mark each read in flight, and say a read past its bound or a drive not looked at for twice its cadence; drop smartd; tell smartctl each drive's kind; take a SAS drive's standby; say a drive asleep since when.
70 lines
1.2 KiB
JSON
70 lines
1.2 KiB
JSON
{
|
|
"module": "sensors",
|
|
"version": "1",
|
|
"capabilities": [
|
|
"package-manager",
|
|
"service-manager"
|
|
],
|
|
"tools": [
|
|
"sensors_summary",
|
|
"sensors_temperatures",
|
|
"sensors_fans",
|
|
"sensors_drives",
|
|
"sensors_faults",
|
|
"sensors_health"
|
|
],
|
|
"resources": [
|
|
{
|
|
"id": "smartmontools",
|
|
"type": "package",
|
|
"package": "smartmontools"
|
|
},
|
|
{
|
|
"id": "drives",
|
|
"type": "process",
|
|
"name": "sensors-drives",
|
|
"artifact": "tools",
|
|
"run": [
|
|
"./sensors",
|
|
"drives"
|
|
],
|
|
"health": {
|
|
"kind": "unit"
|
|
}
|
|
},
|
|
{
|
|
"id": "watch",
|
|
"type": "process",
|
|
"name": "sensors-watch",
|
|
"artifact": "tools",
|
|
"run": [
|
|
"./sensors",
|
|
"watch"
|
|
],
|
|
"health": {
|
|
"kind": "tool",
|
|
"tool": "sensors_health",
|
|
"interval": "60s",
|
|
"timeout": "10s",
|
|
"looks": 2,
|
|
"grace": "60s"
|
|
}
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "tools",
|
|
"kind": "bundle",
|
|
"language": "go",
|
|
"system": "arch",
|
|
"from": "cmd/sensors",
|
|
"binary": "sensors",
|
|
"loads": [
|
|
"sensors"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|