proc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2014 License: Apache-2.0 Imports: 10 Imported by: 0

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

func LiveProcs(prefix string) (map[int][]string, error)

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.

Jump to

Keyboard shortcuts

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