MCPcopy
hub / github.com/google/gvisor / tryToPrintFailureLogs

Function tryToPrintFailureLogs

tools/gpu/drivers/install_driver.go:321–340  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

319}
320
321func tryToPrintFailureLogs() {
322 // nvidia driver installers print failure logs to this path.
323 const logPath = "/var/log/nvidia-installer.log"
324 f, err := os.OpenFile(logPath, os.O_RDONLY, 0644)
325 if err != nil {
326 log.Warningf("failed to stat nvidia-installer.log: %v", err)
327 return
328 }
329 defer f.Close()
330
331 out, err := io.ReadAll(f)
332 if err != nil {
333 log.Warningf("failed to read nvidia-installer.log: %v", err)
334 return
335 }
336
337 for _, line := range strings.Split(string(out), "\n") {
338 fmt.Printf("[nvidia-installer]: %s\n", line)
339 }
340}
341
342// ValidateChecksum validates the checksum of the driver.
343func ValidateChecksum(ctx context.Context, version string, checksums nvproxy.Checksums) error {

Callers 1

installDriverFunction · 0.85

Calls 3

WarningfFunction · 0.92
CloseMethod · 0.65
SplitMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…