[−][src]Enum rctl::Resource
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 asamd(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
Methods
impl Resource
[src]
impl Resource
pub fn as_str(&self) -> &'static str
[src]
pub fn as_str(&self) -> &'static str
Return the string representation of the resource
Examples
use rctl::Resource; assert_eq!(Resource::CpuTime.as_str(), "cputime");
Trait Implementations
impl Eq for Resource
[src]
impl Eq for Resource
impl<'a> Into<&'static str> for &'a Resource
[src]
impl<'a> Into<&'static str> for &'a Resource
impl<'a> Into<String> for &'a Resource
[src]
impl<'a> Into<String> for &'a Resource
impl PartialEq<Resource> for Resource
[src]
impl PartialEq<Resource> for Resource
fn eq(&self, other: &Resource) -> bool
[src]
fn eq(&self, other: &Resource) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Copy for Resource
[src]
impl Copy for Resource
impl Clone for Resource
[src]
impl Clone for Resource
fn clone(&self) -> Resource
[src]
fn clone(&self) -> Resource
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Hash for Resource
[src]
impl Hash for Resource
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Display for Resource
[src]
impl Display for Resource
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Debug for Resource
[src]
impl Debug for Resource
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl FromStr for Resource
[src]
impl FromStr for Resource
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> ToString for T where
T: Display + ?Sized,
[src]
impl<T> ToString for T where
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more