[−][src]Struct psutil::process::Process
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]
&self,
r#type: MemType
) -> ProcessResult<Percent>
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]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Process> for Process
[src]
impl ProcessExt for Process
[src]
fn environ(&self) -> Result<HashMap<String, String>>
[src]
fn get_ionice(&self) -> i32
[src]
fn set_ionice(&self, _nice: i32)
[src]
fn get_rlimit(&self) -> i32
[src]
fn set_rlimit(&self, _nice: i32)
[src]
fn io_counters(&self) -> IoCounters
[src]
fn get_cpu_affinity(&self) -> i32
[src]
fn set_cpu_affinity(&self, _nice: i32)
[src]
fn cpu_num(&self) -> i32
[src]
fn memory_maps(&self)
[src]
fn procfs_stat(&self) -> ProcessResult<ProcfsStat>
[src]
fn procfs_statm(&self) -> ProcessResult<ProcfsStatm>
[src]
fn procfs_status(&self) -> ProcessResult<ProcfsStatus>
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,