Versions in this module Expand all Collapse all v0 v0.209.1 Nov 8, 2026 v0.209.0 Nov 8, 2026 v0.207.0 Oct 30, 2026 v0.206.0 Oct 29, 2026 Changes in this version + const ContextRestart + const ContextSleepWake + const DirName + const FaultWindowMax + const HeartbeatEvery + const HeartbeatTTL + const KindVision + const PhaseAdmission + const PhaseCoherenceProbe + const PhaseColdLoad + const PhaseFinal + const PhaseRepack + const PhaseRunning + const PhaseWindowProbe + const VerdictBusyOutside + const VerdictFree + const VerdictHeldIdle + const VerdictHeldOrphaned + const VerdictHeldOverdue + const VerdictHeldStalled + const VerdictHeldWorking + const VerdictLoadedIdle + const VerdictStaleHolder + const VerdictTreeOrphan + const VerdictWorking + var ErrCardTableUnreadable = errors.New("the card table could not be read") + var ErrNoDriverEventSource = errors.New("gpuactivity: no driver event source on this OS") + func Assess(v View) (verdict, note string) + func CardsReadingOf(gpus []GPU, devices []string) gpulease.CardsReading + func ClassOf(e DriverEvent) string + func DirBeside(leaseDir string) string + func FaultStorePath(stateDir string) (string, error) + func FaultSummaryPath(stateDir string) (string, error) + func HeadlineOf(info gpulease.Info, h *Holder) gpulease.Info + func ParseBusTable(out string) map[string]BusCard + func ParsePMLines(raw string) []roledEvent + func RecordIncidents(path string, rep FaultReport, retained []Incident, now time.Time) (int, error) + func UtilWorking(gpus []GPU, devices []string) bool + func WriteSummary(path string, s FaultSummary) error + type BusCard struct + Index int + UUID string + type ClassCount struct + Class string + Count int + type ContextEvent struct + At time.Time + ID int + Kind string + Source string + func ParseBootList(raw string) ([]ContextEvent, error) + type DisplayCardProcs struct + Count int + GPUUUID string + Index int + Name string + func (d DisplayCardProcs) Sentence() string + type DriverEvent struct + At time.Time + Bus string + Card int + ID int + Source string + Text string + UUID string + func AttributeEvents(evs []DriverEvent, table map[string]BusCard) []DriverEvent + func ParseKernelLog(out string) []DriverEvent + func ParseWinEvents(out string) ([]DriverEvent, error) + func ReadDriverEvents(ctx context.Context) ([]DriverEvent, error) + func (e DriverEvent) Line() string + type FaultCard struct + Bus string + ByClass []ClassCount + Events int + InContext int + Incidents int + Index int + Last time.Time + Name string + RecoveryAction string + UUID string + func ParseFaultCards(out string) []FaultCard + type FaultReport struct + Cards []FaultCard + Events int + Incidents []Incident + Known []KnownError + LiveKernel []LiveKernelEvent + Notes []string + Repeats []Repeat + Retained int + Since time.Time + Until time.Time + Untimed int + WindowDays int + func ReadFaults(ctx context.Context, window time.Duration) (FaultReport, error) + func ReadFaultsRetained(ctx context.Context, window time.Duration, retained []Incident) (FaultReport, error) + type FaultSummary struct + Cards []FaultSummaryCard + Note string + ReadAt time.Time + Repeats []FaultSummaryRepeat + WindowDays int + func ReadSummary(path string) (*FaultSummary, error) + func Summarize(rep FaultReport, now time.Time) FaultSummary + type FaultSummaryCard struct + Bus string + Events int + InContext int + Incidents int + Incidents24h int + Index int + LastIncident time.Time + UUID string + type FaultSummaryRepeat struct + Bursts int + Bus string + Class string + From time.Time + To time.Time + UUID string + type GPU struct + AttachedUnknown bool + DisplayActive bool + DisplayAttached bool + Index int + MemTotalMiB int + MemUsedMiB int + Name string + UUID string + UtilKnown bool + UtilPct int + func ParseGPUs(out string) []GPU + func SampleGPUs(ctx context.Context) ([]GPU, error) + type GPUProcess struct + GPUUUID string + Name string + PID int + UsedKnown bool + UsedMiB int + func ParseProcesses(out string) []GPUProcess + func SampleProcesses(ctx context.Context) ([]GPUProcess, error) + type Handle struct + func Start(lockOverride, stateDir string, run Run) *Handle + func (h *Handle) End() + func (h *Handle) ID() string + func (h *Handle) OnAllowance(phase string, allowance time.Duration) + func (h *Handle) OnPhase(p string) + func (h *Handle) OnProgress(tokensOut int) + func (h *Handle) OnStep(step, tokensOut int) + func (h *Handle) Phase(p string) + func (h *Handle) Run() Run + func (h *Handle) Update(fn func(*Run)) + type Holder struct + AgeSec int + Alive bool + Class string + Command string + Devices []string + Draining bool + Epoch uint64 + Exclusive bool + Expired bool + ExpiredWhy string + ExpiresAt time.Time + Facts []string + GaveUpAt time.Time + GaveUpWhy string + HardEnd string + HeartbeatAgeSec int + Origin string + OrphanGraceS int + OrphanMarkErr string + Orphaned bool + OrphanedForS int + OrphanedSince string + Overdue bool + OverdueBySec int + OwnerNote string + OwnerPID int + OwnerSession string + OwnerState string + PID int + Progress *ProgressState + Reason string + RequestedSec int + Stalled bool + TermSec int + TreeOrphan bool + TreePIDs []int + TreeWhy string + Unattended bool + Yield *YieldState + YieldFile string + YieldNote string + func (h *Holder) StandingWord() string + type Incident struct + Cards []IncidentCard + Classes []ClassCount + Context string + ContextEvents []ContextEvent + End time.Time + Events int + LiveKernel []LiveKernelEvent + Reading string + Retained bool + Start time.Time + Units int + Unplaced int + func LoadRetained(path string) (incs []Incident, bad int, err error) + type IncidentCard struct + Bus string + Classes []ClassCount + Events int + Index int + UUID string + type KnownError struct + Basis string + Class string + Domain string + Meaning string + NVIDIAAction string + NVIDIAActionMeaning string + NVIDIAInvestigate string + Name string + Severity string + XidAnalogue int + func ClassifyEvent(e DriverEvent) KnownError + func ClassifyLiveKernel(code string) KnownError + type LiveKernelEvent struct + At time.Time + AtSource string + Code string + Dump string + Name string + Reports int + func ParseLiveKernelEvents(out string, loc *time.Location) ([]LiveKernelEvent, error) + type Options struct + ComfyDir string + DriverEvents func(ctx context.Context) ([]DriverEvent, error) + Endpoint string + LockOverride string + OrphanGrace time.Duration + ProcSampler func(ctx context.Context) ([]GPUProcess, error) + SampleGPU bool + Sampler func(ctx context.Context) ([]GPU, error) + Scope func(gpulease.Info) gpulease.Info + Seat string + SeatTimeout time.Duration + StateDir string + type ProgressState struct + AgeSec int + Detail string + File string + Problem string + StallSec int + State string + func (p *ProgressState) UnknownWhy() string + type Registry struct + func Open(lockOverride, stateDir string) (*Registry, error) + func OpenAt(dir string) *Registry + func (r *Registry) Begin(run Run) (*Handle, error) + func (r *Registry) Dir() string + func (r *Registry) List(now time.Time) []Run + func (r *Registry) OnSeat(now time.Time, names ...string) []Run + func (r *Registry) OnSeatPinned(now time.Time, pins []string, names ...string) []Run + func (r *Registry) Where(now time.Time, pred func(Run) bool) []Run + type Repeat struct + Bursts int + Bus string + Card int + Class string + From time.Time + To time.Time + UUID string + type Run struct + AllowanceMs int64 + Devices []string + Goal string + HeartbeatMs int64 + ID string + Kind string + LastProgressMs int64 + LivePhase string + MaxSteps int + Origin string + PID int + Phase string + Seat string + StartTimeMs int64 + StartedAtMs int64 + Step int + TokS float64 + TokensOut int + func (r Run) Age(now time.Time) time.Duration + func (r Run) Liveness(now time.Time) string + func (r Run) OnPin(pin string) bool + func (r Run) Summary(now time.Time) string + type SeatState struct + Canonical string + Err string + Inflight int + Loaded bool + Name string + Source string + Starting bool + Stopping bool + type View struct + At time.Time + DriverEvents []DriverEvent + DriverEventsNote string + DriverEventsTotal int + DriverEventsUnattributed int + GPUErr string + GPUs []GPU + Held bool + Holder *Holder + Leases []Holder + Note string + OtherDevices []string + Processes []GPUProcess + Runs []Run + Seat SeatState + Stale bool + Verdict string + func Snapshot(ctx context.Context, opts Options) View + func (v View) Lines() []string + func (v View) Map() map[string]any + type YieldState struct + ActedAt string + Action string + AskedAt string + Exit int + GraceSec int + Unanswered bool + Waiters int