proc

package
v2.7.7 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package proc contains utilities for monitoring the resource use of processes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MonitorProcessGroup

func MonitorProcessGroup(ctx context.Context, pid int)

MonitorProcessGroup produces metrics about a process group until the context is canceled.

func MonitorSelf

func MonitorSelf(ctx context.Context)

Types

type ProcessStats

type ProcessStats struct {
	FDCount        int
	RChars, WChars uint64 // read/write to any fd
	RSysc, WSysc   uint64
	RBytes, WBytes uint64 // read/write to disk; see proc(5)
	CanceledWBytes int64
	CPUTime        float64
	ResidentMemory int
	OOMScore       int
}

type SystemStats

type SystemStats struct {
	CPUTime float64
}

Jump to

Keyboard shortcuts

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