[][src]Struct psutil::process::Process

pub struct Process { /* fields omitted */ }

Methods

impl Process[src]

pub fn new(pid: Pid) -> ProcessResult<Process>[src]

pub fn current() -> ProcessResult<Process>[src]

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

pub fn ppid(&self) -> ProcessResult<Option<Pid>>[src]

pub fn name(&self) -> ProcessResult<String>[src]

pub fn exe(&self) -> ProcessResult<PathBuf>[src]

pub fn cmdline(&self) -> ProcessResult<Option<String>>[src]

On Linux, an Ok(None) is usually due to the process being a kernel thread. The return value is different from Python psutil.

pub fn cmdline_vec(&self) -> ProcessResult<Option<Vec<String>>>[src]

New method, not in Python psutil. On Linux, an Ok(None) is usually due to the process being a kernel thread.

pub fn create_time(&self) -> Duration[src]

The process creation time as a Duration since the boot time. The return value is different from Python psutil.

pub fn parent(&self) -> ProcessResult<Option<Process>>[src]

Preemptively checks if the process is still alive.

pub fn parents(&self) -> Option<Vec<Process>>[src]

pub fn status(&self) -> ProcessResult<Status>[src]

pub fn cwd(&self) -> ProcessResult<PathBuf>[src]

pub fn username(&self) -> String[src]

pub fn get_nice(&self) -> i32[src]

pub fn set_nice(&self, nice: i32)[src]

pub fn num_ctx_switches(&self) -> Count[src]

pub fn num_threads(&self) -> Count[src]

pub fn threads(&self)[src]

pub fn cpu_times(&self) -> ProcessResult<ProcessCpuTimes>[src]

pub fn cpu_percent(&mut self) -> ProcessResult<Percent>[src]

Returns the cpu percent since the process was created, replaced, or since the last time this method was called. Differs from Python psutil since there is no interval argument.

pub fn memory_info(&self) -> ProcessResult<MemoryInfo>[src]

pub fn memory_full_info(&self)[src]

pub fn memory_percent(&self) -> ProcessResult<Percent>[src]

pub fn memory_percent_with_type(
    &self,
    r#type: MemType
) -> ProcessResult<Percent>
[src]

pub fn chidren(&self)[src]

pub fn open_files(&self) -> ProcessResult<Vec<OpenFile>>[src]

pub fn connections(&self)[src]

pub fn connections_with_type(&self, r#type: NetConnectionType)[src]

pub fn is_running(&self) -> bool[src]

pub fn is_replaced(&self) -> bool[src]

New method, not in Python psutil.

pub fn replace(&mut self) -> bool[src]

New method, not in Python psutil.

pub fn send_signal(&self, signal: Signal) -> ProcessResult<()>[src]

Preemptively checks if the process is still alive.

pub fn suspend(&self) -> ProcessResult<()>[src]

Preemptively checks if the process is still alive.

pub fn resume(&self) -> ProcessResult<()>[src]

Preemptively checks if the process is still alive.

pub fn terminate(&self) -> ProcessResult<()>[src]

Preemptively checks if the process is still alive.

pub fn kill(&self) -> ProcessResult<()>[src]

Preemptively checks if the process is still alive.

pub fn wait(&self)[src]

Trait Implementations

impl Clone for Process[src]

impl Debug for Process[src]

impl Eq for Process[src]

impl Hash for Process[src]

impl PartialEq<Process> for Process[src]

impl ProcessExt for Process[src]

impl ProcessExt for Process[src]

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]

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, 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.