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:
When instrumenting Go programs, use either the
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_RAWcapability (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.