nodes

package
v0.0.0-...-b86a68b Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	Id                int    `json:"id"`
	Name              string `json:"name"`
	Utilization       int    `json:"utilization"`
	MemoryUtilization Memory `json:"memory"`
	FanSpeed          int    `json:"fan_speed"`
	Temperature       int    `json:"temperature"`
	PowerUsage        int    `json:"power_usage"`
	Processes         []Process
}

func (*Device) GetDeviceName

func (d *Device) GetDeviceName() string

func (*Device) GetDevices

func (d *Device) GetDevices() []string

func (*Device) GetFanSpeed

func (d *Device) GetFanSpeed() string

func (*Device) GetGpuUtilization

func (d *Device) GetGpuUtilization() string

func (*Device) GetMemoryInfo

func (d *Device) GetMemoryInfo() string

func (*Device) GetPowerUsage

func (d *Device) GetPowerUsage() string

func (*Device) GetTemp

func (d *Device) GetTemp() string

func (*Device) Print

func (d *Device) Print()

type Memory

type Memory struct {
	Used       int64 `json:"used"`
	Free       int64 `json:"free"`
	Total      int64 `json:"total"`
	Percentage int   `json:"percentage"`
}

type Node

type Node struct {
	Name       string    `json:"name"`        // hostname
	Devices    []Device  `json:"devices"`     // devices
	Time       time.Time `json:"time"`        // current timestamp from message
	BootTime   int64     `json:"boot_time"`   // uptime of system
	ClockTicks int64     `json:"clock_ticks"` // cpu ticks per second
}

func (*Node) Print

func (n *Node) Print()

type Process

type Process struct {
	Pid             int
	UsedGpuMemory   int64
	Name            string
	Username        string
	RunTime         uint64
	ExtendedCommand string
}

func (*Process) GetExtendedCommand

func (p *Process) GetExtendedCommand() string

func (*Process) GetGpuMemoryUsage

func (p *Process) GetGpuMemoryUsage() string

func (*Process) GetName

func (p *Process) GetName() string

func (*Process) GetPid

func (p *Process) GetPid() string

func (*Process) GetProcesses

func (p *Process) GetProcesses() []string

func (*Process) GetRunUser

func (p *Process) GetRunUser() string

func (*Process) GetRuntime

func (p *Process) GetRuntime() string

Jump to

Keyboard shortcuts

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