server

package
v0.0.0-...-345fb63 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: GPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Server

func Server() error

func ServerInfo

func ServerInfo() interface{}

Types

type Gpu

type Gpu struct {
	GpuName     string         `xml:"product_name"`
	BiosVersion string         `xml:"vbios_version"`
	FanSpeed    string         `xml:"fan_speed"`
	Utilization GpuUtilization `xml:"utilization"`
	Temperature GpuTemperature `xml:"temperature"`
	Clock       GpuClock       `xml:"clocks"`
}

type GpuClock

type GpuClock struct {
	GpuClock    string `xml:"graphics_clock"`
	GpuMemClock string `xml:"mem_clock"`
}

type GpuTemperature

type GpuTemperature struct {
	GpuTemp string `xml:"gpu_temp"`
}

type GpuUtilization

type GpuUtilization struct {
	GpuUsage    string `xml:"gpu_util"`
	MemoryUsage string `xml:"memory_util"`
}

type Query

type Query struct {
	DriveVersion string `xml:"driver_version"`
	Gpu          Gpu    `xml:"gpu"`
}

func GPUInfo

func GPUInfo() (*Query, error)

Gets GPU information by calling nvidia-smi in XML output

type SysInfo

type SysInfo struct {
	Hostname string `bson:hostname`
	Platform string `bson:platform`
	CPU      string `bson:cpu`
	RAM      uint64 `bson:ram`
	Disk     uint64 `bson:disk`
	GPU      *Query `xml: GpuInfo`
}

SysInfo saves the basic system information

Jump to

Keyboard shortcuts

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