Add fleet groups, agent screenshots, deploy guards, and Crucible polish.

This commit is contained in:
AetherForge
2026-06-02 20:51:52 -07:00
parent 01d76b3730
commit 41b5ec7a88
66 changed files with 1773 additions and 388 deletions

View File

@@ -2,8 +2,11 @@ package client
import (
"os/exec"
"runtime"
"strconv"
"strings"
"crypto-miner-agent/deploy"
)
// ResourcePressure is a mining-specific runtime snapshot sent every heartbeat.
@@ -55,11 +58,21 @@ func (r *ResourcePressure) Throttled() bool {
// probeGPU queries nvidia-smi for temperature and utilisation.
// Returns (nil, nil) when no NVIDIA GPU is present or nvidia-smi is absent.
func probeGPU() (tempC, usagePct *int) {
out, err := exec.Command(
"nvidia-smi",
"--query-gpu=temperature.gpu,utilization.gpu",
"--format=csv,noheader,nounits",
).Output()
var out []byte
var err error
if runtime.GOOS == "windows" {
out, err = deploy.HiddenOutput(
"nvidia-smi",
"--query-gpu=temperature.gpu,utilization.gpu",
"--format=csv,noheader,nounits",
)
} else {
out, err = exec.Command(
"nvidia-smi",
"--query-gpu=temperature.gpu,utilization.gpu",
"--format=csv,noheader,nounits",
).Output()
}
if err != nil {
return nil, nil
}