go-sysinfo – github.com/elastic/go-sysinfo Index | Files | Directories

package sysinfo

import "github.com/elastic/go-sysinfo"

Index

Functions

func Go

func Go() types.GoInfo

Go returns information about the Go runtime.

func Host

func Host() (types.Host, error)

Host returns information about host on which this process is running. If host information collection is not implemented for this platform then types.ErrNotImplemented is returned. On Darwin (macOS) a types.ErrNotImplemented is returned with cgo disabled.

func Process

func Process(pid int) (types.Process, error)

Process returns a types.Process object representing the process associated with the given PID. The types.Process object can be used to query information about the process. If process information collection is not implemented for this platform then types.ErrNotImplemented is returned.

func Processes

func Processes() ([]types.Process, error)

Processes return a list of all processes. If process information collection is not implemented for this platform then types.ErrNotImplemented is returned.

func Self

func Self() (types.Process, error)

Self return a types.Process object representing this process. If process information collection is not implemented for this platform then types.ErrNotImplemented is returned.

Source Files

system.go

Directories

PathSynopsis
internal
providers
providers/aixPackage aix implements the HostProvider and ProcessProvider interfaces for providing information about IBM AIX on ppc64.
providers/darwinPackage darwin implements the HostProvider and ProcessProvider interfaces for providing information about MacOS.
providers/linuxPackage linux implements the HostProvider and ProcessProvider interfaces for providing information about Linux.
providers/shared
providers/windowsPackage windows implements the HostProvider and ProcessProvider interfaces for providing information about Windows.
types
Version
v1.13.0
Published
Feb 12, 2024
Platform
js/wasm
Imports
7 packages
Last checked
now

Tools for package owners.