Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotRoot = errors.New("must be root to access all process information")
)
Functions ¶
func LiveProcs ¶
LiveProcs is similar to `man 1 fuser`; it takes a prefix and returns a map of PIDs of any processes accessing files with the prefix. A process is considered to be accessing a file if it has an open file descriptor directly referencing the file, has an open Unix socket referencing a file, or has a file mapped into memory. This operation is inherently racy (both false positives and false negatives are possible) and hence this should be considered an approximation only. TODO(jonboulle): map filename(string) -> []int(pids) instead
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.