proc

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MustKillSignals = []syscall.Signal{syscall.SIGINT, syscall.SIGKILL}

Functions

func CalcCPUPercent added in v0.11.40

func CalcCPUPercent(ps []*process.Process) (float64, error)

func CalcMemoryUsage added in v0.11.40

func CalcMemoryUsage(ps []*process.Process) (uint64, error)

func CalcSelfAndAllChildrenCPUPercent added in v0.11.40

func CalcSelfAndAllChildrenCPUPercent() (float64, error)

func CalcSelfAndAllChildrenMemoryUsage added in v0.11.40

func CalcSelfAndAllChildrenMemoryUsage() (uint64, error)

func CalcSelfCPUPercent added in v0.11.40

func CalcSelfCPUPercent() (float64, error)

func CalcSelfMemoryUsage added in v0.11.40

func CalcSelfMemoryUsage() (uint64, error)

func Exists

func Exists(pid int) bool

func GetSelfAndAllChildrenProcess added in v0.11.40

func GetSelfAndAllChildrenProcess() ([]*process.Process, error)

func Kill added in v0.11.21

func Kill(pid int, sig syscall.Signal) error

func KillGroup added in v0.11.11

func KillGroup(pid int, sig syscall.Signal) error

func ListAllChildrenProcess added in v0.11.40

func ListAllChildrenProcess(p *process.Process) ([]*process.Process, error)

func MustKill added in v0.11.21

func MustKill(ctx context.Context, pid int, singleSigWaitExitSec int, sig ...syscall.Signal) error

func MustKillGroup added in v0.11.21

func MustKillGroup(ctx context.Context, pid int, singleSigWaitExitSec int, sig ...syscall.Signal) error

func WaitProcExit

func WaitProcExit(ctx context.Context, pid int, interval time.Duration, count int) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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