Struct sysinfo::Process [−][src]
pub struct Process { pub uid: uid_t, pub gid: gid_t, pub tasks: HashMap<Pid, Process>, // some fields omitted }
Struct containing a process' information.
Fields
uid: uid_t
User id of the process owner.
gid: gid_t
Group id of the process owner.
tasks: HashMap<Pid, Process>
Tasks run by this process.
Trait Implementations
impl Clone for Process
[src]
impl Clone for Process
fn clone(&self) -> Process
[src]
fn clone(&self) -> Process
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 ProcessExt for Process
[src]
impl ProcessExt for Process
fn new(pid: Pid, parent: Option<Pid>, start_time: u64) -> Process
[src]
fn new(pid: Pid, parent: Option<Pid>, start_time: u64) -> Process
Create a new process only containing the given information. Read more
fn kill(&self, signal: Signal) -> bool
[src]
fn kill(&self, signal: Signal) -> bool
Sends the given signal
to the process.
fn name(&self) -> &str
[src]
fn name(&self) -> &str
Returns the name of the processus.
fn cmd(&self) -> &[String]
[src]
fn cmd(&self) -> &[String]
Returns the command line.
fn exe(&self) -> &str
[src]
fn exe(&self) -> &str
Returns the path to the processus.
fn pid(&self) -> Pid
[src]
fn pid(&self) -> Pid
Returns the pid of the processus.
fn environ(&self) -> &[String]
[src]
fn environ(&self) -> &[String]
Returns the environment of the process. Read more
fn cwd(&self) -> &str
[src]
fn cwd(&self) -> &str
Returns the current working directory. Read more
fn root(&self) -> &str
[src]
fn root(&self) -> &str
Returns the path of the root directory. Read more
fn memory(&self) -> u64
[src]
fn memory(&self) -> u64
Returns the memory usage (in kB).
fn parent(&self) -> Option<Pid>
[src]
fn parent(&self) -> Option<Pid>
Returns the parent pid.
fn status(&self) -> ProcessStatus
[src]
fn status(&self) -> ProcessStatus
Returns the status of the processus (idle, run, zombie, etc). None
means that
sysinfo
doesn't have enough rights to get this information.
fn start_time(&self) -> u64
[src]
fn start_time(&self) -> u64
Returns the time of process launch (in seconds).
fn cpu_usage(&self) -> f32
[src]
fn cpu_usage(&self) -> f32
Returns the total CPU usage.
impl Debug for Process
[src]
impl Debug for Process