lsof

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: May 23, 2016 License: BSD-3-Clause, BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecError

type ExecError struct {
	// contains filtered or unexported fields
}

ExecError is an error running lsof

func (ExecError) Error

func (e ExecError) Error() string

type FileDescriptor

type FileDescriptor struct {
	FD   string
	Type FileType
	Name string
}

FileDescriptor defines a file in use by a process

type FileType

type FileType string

FileType defines the type of file in use by a process

const (
	FileTypeUnknown FileType = ""
	FileTypeDir     FileType = "DIR"
	FileTypeFile    FileType = "REG"
)

type Process

type Process struct {
	PID             string
	Command         string
	UserID          string
	FileDescriptors []FileDescriptor
}

Process defines an process using an open file. Properties here are strings for compatibility with different platforms.

func MountPoint

func MountPoint(dir string) ([]Process, error)

MountPoint returns processes using the mountpoint "lsof /dir"

Jump to

Keyboard shortcuts

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