Struct sysinfo::Process[][src]

pub struct Process {
    pub uid: uid_t,
    pub gid: gid_t,
    pub status: Option<ThreadStatus>,
    // some fields omitted
}
Expand description

Struct containing a process’ information.

Fields

uid: uid_t

User id of the process owner.

gid: gid_t

Group id of the process owner.

status: Option<ThreadStatus>

Status of process (running, stopped, waiting, etc). None means sysinfo doesn’t have enough rights to get this information.

This is very likely this one that you want instead of process_status.

Trait Implementations

impl Clone for Process[src]

fn clone(&self) -> Process[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Process[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl ProcessExt for Process[src]

fn new(pid: Pid, parent: Option<Pid>, start_time: u64) -> Process[src]

fn kill(&self, signal: Signal) -> bool[src]

Sends the given signal to the process. Read more

fn name(&self) -> &str[src]

Returns the name of the process. Read more

fn cmd(&self) -> &[String][src]

Returns the command line. Read more

fn exe(&self) -> &Path[src]

Returns the path to the process. Read more

fn pid(&self) -> Pid[src]

Returns the pid of the process. Read more

fn environ(&self) -> &[String][src]

Returns the environment of the process. Read more

fn cwd(&self) -> &Path[src]

Returns the current working directory. Read more

fn root(&self) -> &Path[src]

Returns the path of the root directory. Read more

fn memory(&self) -> u64[src]

Returns the memory usage (in kB). Read more

fn virtual_memory(&self) -> u64[src]

Returns the virtual memory usage (in kB). Read more

fn parent(&self) -> Option<Pid>[src]

Returns the parent pid. Read more

fn status(&self) -> ProcessStatus[src]

Returns the status of the processus. Read more

fn start_time(&self) -> u64[src]

Returns the time of process launch (in seconds). Read more

fn cpu_usage(&self) -> f32[src]

Returns the total CPU usage (in %). Notice that it might be bigger than 100 if run on a multicore machine. Read more

fn disk_usage(&self) -> DiskUsage[src]

Returns number of bytes read and written to disk. Read more

Auto Trait Implementations

impl RefUnwindSafe for Process

impl Send for Process

impl Sync for Process

impl Unpin for Process

impl UnwindSafe for Process

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 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, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.