linux

package
v0.0.0-...-b95a7b5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package linux contains Linux-specific pieces of interrogation which are nonetheless testable on arbitrary platforms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GPUs

func GPUs(ctx context.Context, lspciOutput string, versionGetters VendorsToVersionGetters) ([]string, error)

GPUs returns a slice of Swarming-style descriptors of all the GPUs on the host, in all precisions: "vendorID", "vendorID-deviceID", and, if detectable, "vendorID-deviceID-driverVersion". nvidiaVersionGetter is a thunk that returns the version of the installed Nvidia driver. intelVersionGetter is similar but for the Intel driver.

func OSVersions

func OSVersions(platform, version string) []string

func VendorAndBrand

func VendorAndBrand(cpuInfo io.Reader) (vendor, brandString string, err error)

VendorAndBrand returns the vendor and brand string of the first encountered CPU in the provided contents of /proc/cpuinfo. Extraction may fail and they may be empty--those are valid values--even if error is nil.

Types

type VendorsToVersionGetters

type VendorsToVersionGetters = map[string]func(context.Context) string

VendorsToVersionGetters is a map of vendor IDs to functions that return GPU driver versions for those vendors' products.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL