sys

package
v1.3.22 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 11 Imported by: 1

Documentation

Overview

Package sys provides methods to read system information

  • Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.

Package sys provides methods to read system information

  • Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.

Package sys provides methods to read system information

  • Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.

Package sys provides methods to read system information

  • Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.

Package sys provides methods to read system information

  • Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.

Package sys provides methods to read system information

  • Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.

Package sys provides methods to read system information

  • Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Containerized

func Containerized() bool

func NumCPU

func NumCPU() int

func SetMaxProcs

func SetMaxProcs()

SetMaxProcs sets GOMAXPROCS = NumCPU unless already overridden via Go environment

Types

type LoadAvg

type LoadAvg struct {
	One, Five, Fifteen float64
}

func LoadAverage

func LoadAverage() (avg LoadAvg, err error)

LoadAverage returns the system load average

type MemStat

type MemStat struct {
	Total      uint64
	Used       uint64
	Free       uint64
	BuffCache  uint64
	ActualFree uint64
	ActualUsed uint64
	SwapTotal  uint64
	SwapFree   uint64
	SwapUsed   uint64
}

func (*MemStat) Get

func (mem *MemStat) Get() error

func (*MemStat) String

func (mem *MemStat) String() string

type ProcCPUStats

type ProcCPUStats struct {
	User     uint64
	System   uint64
	Total    uint64
	LastTime int64
	Percent  float64
}

type ProcMemStats

type ProcMemStats struct {
	Size     uint64
	Resident uint64
	Share    uint64
}

type ProcStats

type ProcStats struct {
	CPU ProcCPUStats
	Mem ProcMemStats
}

func ProcessStats

func ProcessStats(pid int) (ProcStats, error)

Jump to

Keyboard shortcuts

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