limits

package
v0.0.0-...-1206814 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2015 License: MIT, MIT Imports: 6 Imported by: 0

Documentation

Overview

limits.Limits describes data in /proc/<pid>/limits.

Use limits.New() to create a new limits.Limits object from data in a limits file.

Index

Constants

View Source
const (
	Bytes     Unit = "bytes"
	Seconds        = "seconds"
	Processes      = "processes"
	Files          = "files"
	Signals        = "signals"
	Locks          = "locks"
	Us             = "us"
	Unknown        = "unknown"
)
View Source
const UNLIMITED = -1

Variables

This section is empty.

Functions

This section is empty.

Types

type Limit

type Limit struct {
	SoftValue int
	HardValue int
	// contains filtered or unexported fields
}

type Limits

type Limits struct {
	CpuTime          *Limit
	FileSize         *Limit
	DataSize         *Limit
	StackSize        *Limit
	CoreFileSize     *Limit
	ResidentSet      *Limit
	Processes        *Limit
	OpenFiles        *Limit
	LockedMemory     *Limit
	AddressSpace     *Limit
	FileLocks        *Limit
	PendingSignals   *Limit
	MsgqueueSize     *Limit
	NicePriority     *Limit
	RealtimePriority *Limit
	RealtimeTimeout  *Limit
}

Limits is abstraction for /proc/<pid>/limit

Each Limit pointer pointers to a Limit object, which has the HardValue, SoftValue, and Units.

If no limit is found, it will be nil.

func New

func New(path string) (*Limits, error)

Create a Limit instance from a /proc/<pid>/limits path

type Unit

type Unit string

Jump to

Keyboard shortcuts

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