info

package module
v0.0.0-...-eb1f4aa Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 7 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// InitMemUsed init mem used
	InitMemUsed uint64
	// InitDiskUsed init disk used
	InitDiskUsed uint64
)

Functions

func CPUInfo

func CPUInfo(args ...int) (string, error)

CPUInfo returns the cpu info

func CPUPercent

func CPUPercent() ([]float64, error)

CPUPercent returns the amount of use cpu in percent.

func Disk

func Disk(pt ...bool) ([]*disk.UsageStat, error)

Disk init the disk

func DiskFree

func DiskFree() (uint64, error)

DiskFree returns the amount of free disk in bytes.

func DiskPercent

func DiskPercent() (string, error)

DiskPercent returns the amount of use disk in percent.

func DiskTotal

func DiskTotal() (uint64, error)

DiskTotal returns the amount of total disk in bytes.

func DiskUsed

func DiskUsed() (uint64, error)

DiskUsed returns the amount of use disk in bytes.

func KernelVer

func KernelVer() (string, error)

KernelVer returns the kernel version as a string.

func MemFree

func MemFree() (uint64, error)

MemFree returns the amount of free memory in bytes.

func MemPercent

func MemPercent() (string, error)

MemPercent returns the amount of use memory in percent.

func MemTotal

func MemTotal() (uint64, error)

MemTotal returns the amount of total memory in bytes.

func MemUsed

func MemUsed() (uint64, error)

MemUsed returns the amount of used memory in bytes.

func Platform

func Platform() (string, error)

Platform returns the platform name and OS Version.

func PlatformInfo

func PlatformInfo() (platform, family, osVersion string, err error)

PlatformInfo fetches system platform information.

func ToGB

func ToGB(data uint64) uint64

ToGB bytes to gb

func ToKB

func ToKB(data uint64) uint64

ToKB bytes to kb

func ToMB

func ToMB(data uint64) uint64

ToMB bytes to mb

func Uptime

func Uptime() (uint64, error)

Uptime returns the system uptime in seconds.

func UsedDisk

func UsedDisk() (uint64, error)

UsedDisk returns the amount of use disk in bytes after init() func.

func UsedMem

func UsedMem() (uint64, error)

UsedMem returns the amount of riot used memory in bytes after init() func.

Types

This section is empty.

Jump to

Keyboard shortcuts

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