[][src]Enum rctl::Resource

pub enum Resource {
    CpuTime,
    DataSize,
    StackSize,
    CoreDumpSize,
    MemoryUse,
    MemoryLocked,
    MaxProcesses,
    OpenFiles,
    VMemoryUse,
    PseudoTerminals,
    SwapUse,
    NThreads,
    MsgqQueued,
    MsgqSize,
    NMsgq,
    Nsem,
    NSemop,
    NShm,
    ShmSize,
    Wallclock,
    PercentCpu,
    ReadBps,
    WriteBps,
    ReadIops,
    WriteIops,
}

An Enum representing a resource type

Variants

CpuTime

CPU time, in seconds

DataSize

datasize, in bytes

StackSize

stack size, in bytes

from the FreeBSD Handbook Chapter 13.13 - Resource Limits:

The maximum size of a process stack. This alone is not sufficient to limit the amount of memory a program may use, so it should be used in conjunction with other limits.

CoreDumpSize

coredump size, in bytes

from the FreeBSD Handbook Chapter 13.13 - Resource Limits:

The limit on the size of a core file generated by a program is subordinate to other limits on disk usage, such as filesize or disk quotas. This limit is often used as a less severe method of controlling disk space consumption. Since users do not generate core files and often do not delete them, this setting may save them from running out of disk space should a large program crash.

MemoryUse

resident setsize, in bytes

MemoryLocked

locked memory, in bytes

from the FreeBSD Handbook Chapter 13.13 - Resource Limits:

The maximum amount of memory a process may request to be locked into main memory using mlock(2). Some system-critical programs, such as amd(8), lock into main memory so that if the system begins to swap, they do not contribute to disk thrashing.

MaxProcesses

number of processes

OpenFiles

File descriptor table size

VMemoryUse

address space limit, in bytes

PseudoTerminals

number of PTYs

SwapUse

swapspace that may be reserved or used, in bytes

NThreads

number of threads

MsgqQueued

number of queued SysV messages

MsgqSize

SysVmessagequeue size, in bytes

NMsgq

number of SysV message queues

Nsem

number of SysV semaphores

NSemop

number of SysV semaphores modified in a single semop(2) call

NShm

number of SysV shared memorysegments

ShmSize

SysVshared memory size, in bytes

Wallclock

wallclock time, in seconds

PercentCpu

%CPU, in percents of a single CPU core

ReadBps

filesystem reads, in bytes per second

WriteBps

filesystem writes, in bytes per second

ReadIops

filesystem reads, inoperations per second

WriteIops

filesystem writes, in operations persecond

Implementations

impl Resource[src]

pub fn as_str(&self) -> &'static str[src]

Return the string representation of the resource

Examples

use rctl::Resource;
assert_eq!(Resource::CpuTime.as_str(), "cputime");

Trait Implementations

impl Clone for Resource[src]

impl Copy for Resource[src]

impl Debug for Resource[src]

impl Display for Resource[src]

impl Eq for Resource[src]

impl FromStr for Resource[src]

type Err = ParseError

The associated error which can be returned from parsing.

impl Hash for Resource[src]

impl<'a> Into<&'static str> for &'a Resource[src]

impl<'a> Into<String> for &'a Resource[src]

impl PartialEq<Resource> for Resource[src]

impl StructuralEq for Resource[src]

impl StructuralPartialEq for Resource[src]

Auto Trait Implementations

impl RefUnwindSafe for Resource

impl Send for Resource

impl Sync for Resource

impl Unpin for Resource

impl UnwindSafe for Resource

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.