Documentation
¶
Index ¶
Constants ¶
View Source
const ( MinimumVRAMBytes = uint64(8 * 1024 * 1024 * 1024) // MinimumRAMBytes is the "16 GB installed" floor. Windows reports usable // RAM after hardware reservations, so a real 16 GB machine shows ~15.9 GB; // a strict 16 GiB compare would fail every 16 GB gaming PC. 15 GiB usable // only admits machines with at least 16 GB installed in practice. MinimumRAMBytes = uint64(15 * 1024 * 1024 * 1024) MinimumDiskBytes = uint64(40 * 1024 * 1024 * 1024) )
View Source
const ( StatusPass = "pass" StatusFail = "fail" StatusWarn = "warn" StatusUnsupported = "unsupported" StatusSkipped = "skipped" )
Variables ¶
View Source
var NvidiaSMIQueryArgs = []string{
"--query-gpu=name,uuid,memory.total,driver_version,temperature.gpu,power.draw,power.limit,utilization.gpu",
"--format=csv,noheader,nounits",
}
Functions ¶
func WriteHuman ¶
func WriteHuman(w io.Writer, report DoctorReport)
Types ¶
type CheckResult ¶
type CommandRunner ¶
type DoctorOptions ¶
type DoctorReport ¶
type DoctorReport struct {
GeneratedAt time.Time `json:"generated_at"`
OS string `json:"os"`
Arch string `json:"arch"`
Overall string `json:"overall"`
Checks []CheckResult `json:"checks"`
GPUs []GPU `json:"gpus,omitempty"`
}
func RunDoctor ¶
func RunDoctor(ctx context.Context, opts DoctorOptions) DoctorReport
type ExecRunner ¶
type ExecRunner struct{}
type GPU ¶
type GPU struct {
Name string `json:"name"`
UUID string `json:"uuid"`
VRAMTotalMB int64 `json:"vram_total_mb"`
DriverVersion string `json:"driver_version"`
TemperatureC int `json:"temperature_c"`
PowerDrawW float64 `json:"power_draw_w"`
PowerLimitW float64 `json:"power_limit_w"`
UtilizationPercent int `json:"utilization_percent"`
}
func DetectNvidiaGPUs ¶
func DetectNvidiaGPUs(ctx context.Context, runner CommandRunner) ([]GPU, error)
func ParseNvidiaSMICSV ¶
Click to show internal directories.
Click to hide internal directories.