Add fleet groups, agent screenshots, deploy guards, and Crucible polish.
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"encoding/json"
|
||||
"math"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"syscall"
|
||||
@@ -32,7 +31,7 @@ func collectResourcePressure() *ResourcePressure {
|
||||
|
||||
// ── CPU frequency via short PowerShell call ───────────────────────────────
|
||||
const cpuScript = `$c=Get-CimInstance Win32_Processor|Select-Object -First 1 CurrentClockSpeed,MaxClockSpeed;@{freq=[int]$c.CurrentClockSpeed;max=[int]$c.MaxClockSpeed}|ConvertTo-Json -Compress`
|
||||
if out, err := exec.Command("powershell", "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command", cpuScript).Output(); err == nil {
|
||||
if out, err := silentOutput("powershell", "-NoProfile", "-ExecutionPolicy", "Bypass", "-WindowStyle", "Hidden", "-Command", cpuScript); err == nil {
|
||||
var m map[string]interface{}
|
||||
if json.Unmarshal([]byte(strings.TrimSpace(string(out))), &m) == nil {
|
||||
if freq, ok := m["freq"].(float64); ok && freq > 0 {
|
||||
|
||||
Reference in New Issue
Block a user