Trait sysinfo::ProcessExt

source ·
pub trait ProcessExt {
Show 14 methods fn new(pid: Pid, parent: Option<Pid>, start_time: u64) -> Self; fn kill(&self, signal: Signal) -> bool; fn name(&self) -> &str; fn cmd(&self) -> &[String]; fn exe(&self) -> &Path; fn pid(&self) -> Pid; fn environ(&self) -> &[String]; fn cwd(&self) -> &Path; fn root(&self) -> &Path; fn memory(&self) -> u64; fn parent(&self) -> Option<Pid>; fn status(&self) -> ProcessStatus; fn start_time(&self) -> u64; fn cpu_usage(&self) -> f32;
}
Expand description

Contains all the methods of the Process struct.

Required Methods§

Create a new process only containing the given information.

On windows, the start_time argument is ignored.

Sends the given signal to the process.

Returns the name of the processus.

Returns the command line.

Returns the path to the processus.

Returns the pid of the processus.

Returns the environment of the process.

Always empty on Windows except for current processus.

Returns the current working directory.

Always empty on Windows.

Returns the path of the root directory.

Always empty on Windows.

Returns the memory usage (in kB).

Returns the parent pid.

Returns the status of the processus.

Returns the time of process launch (in seconds).

Returns the total CPU usage.

Implementors§