Categorygithub.com/segmentio/taskstats
modulepackage
0.0.0-20190328215536-52f398ff659c
Repository: https://github.com/segmentio/taskstats.git
Documentation: pkg.go.dev

# README

taskstats Build Status GoDoc Go Report Card

Package taskstats provides access to Linux's taskstats interface, for sending per-task, per-process, and cgroup statistics from the kernel to userspace.

For more information on taskstats, please see:

Notes

  • When instrumenting Go programs, use either the taskstats.Self() or taskstats.TGID() method. Using the PID() method on multithreaded programs, including Go programs, will produce inaccurate results.

  • Access to taskstats requires that the application have at least CAP_NET_RAW capability (see capabilities(7)). Otherwise, the application must be run as root.

  • If running the application in a container (e.g. via Docker), it cannot be run in a network namespace -- usually this means that host networking must be used.

MIT Licensed.

# Functions

New creates a new Client.

# Structs

CGroupStats contains statistics for tasks of an individual cgroup.
A Client provides access to Linux taskstats information.
Stats contains statistics for an individual task.