go-agent: github.com/newrelic/go-agent/v3/internal/sysinfo Index | Files

package sysinfo

import "github.com/newrelic/go-agent/v3/internal/sysinfo"


Package Files

bootid.go docker.go errors.go hostname.go hostname_linux.go memtotal.go memtotal_linux.go usage.go usage_posix.go


var (
    // ErrDockerNotFound is returned if a Docker ID is not found in
    // /proc/self/cgroup
    ErrDockerNotFound = errors.New("Docker ID not found")
var (
    // ErrFeatureUnsupported indicates unsupported platform.
    ErrFeatureUnsupported = errors.New("That feature is not supported on this platform")

func BootID Uses

func BootID() (string, error)

BootID returns the boot ID of the executing kernel.

func BytesToMebibytes Uses

func BytesToMebibytes(bts uint64) uint64

BytesToMebibytes converts bytes into mebibytes.

func DockerID Uses

func DockerID() (string, error)

DockerID attempts to detect Docker.

func Hostname Uses

func Hostname() (string, error)

Hostname returns the host name.

func PhysicalMemoryBytes Uses

func PhysicalMemoryBytes() (uint64, error)

PhysicalMemoryBytes returns the total amount of host memory.

type Usage Uses

type Usage struct {
    System time.Duration
    User   time.Duration

Usage contains process process times.

func GetUsage Uses

func GetUsage() (Usage, error)

GetUsage gathers process times.

Package sysinfo imports 12 packages (graph) and is imported by 4 packages. Updated 2020-07-07. Refresh now. Tools for package owners.