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]
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 ProcessExt for Process
[src]
fn new(pid: Pid, parent: Option<Pid>, start_time: u64) -> Process
[src]
Create a new process only containing the given information. Read more
fn kill(&self, signal: Signal) -> bool
[src]
Sends the given signal
to the process.
fn name(&self) -> &str
[src]
Returns the name of the processus.
fn cmd(&self) -> &[String]
[src]
Returns the command line.
fn exe(&self) -> &str
[src]
Returns the path to the processus.
fn pid(&self) -> Pid
[src]
Returns the pid of the processus.
fn environ(&self) -> &[String]
[src]
Returns the environment of the process. Read more
fn cwd(&self) -> &str
[src]
Returns the current working directory.
fn root(&self) -> &str
[src]
Returns the path of the root directory.
fn memory(&self) -> u64
[src]
Returns the memory usage (in kB).
fn parent(&self) -> Option<Pid>
[src]
Returns the parent pid.
fn status(&self) -> ProcessStatus
[src]
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]
Returns the time of process launch (in seconds).
fn cpu_usage(&self) -> f32
[src]
Return the total CPU usage.