diff options
Diffstat (limited to 'src/app/data_harvester/processes/mod.rs')
-rw-r--r-- | src/app/data_harvester/processes/mod.rs | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/src/app/data_harvester/processes/mod.rs b/src/app/data_harvester/processes/mod.rs index 283080b3..7dbaca1a 100644 --- a/src/app/data_harvester/processes/mod.rs +++ b/src/app/data_harvester/processes/mod.rs @@ -75,23 +75,48 @@ impl Default for ProcessSorting { #[derive(Debug, Clone, Default)] pub struct ProcessHarvest { + /// The pid of the process. pub pid: Pid, - pub parent_pid: Option<Pid>, // Remember, parent_pid 0 is root... + + /// The parent PID of the process. Remember, parent_pid 0 is root. + pub parent_pid: Option<Pid>, + + /// CPU usage as a percentage. pub cpu_usage_percent: f64, + + /// Memory usage as a percentage. pub mem_usage_percent: f64, + + /// Memory usage as bytes. pub mem_usage_bytes: u64, - // pub rss_kb: u64, - // pub virt_kb: u64, + + /// The name of the process. pub name: String, + + /// The exact command for the process. pub command: String, + + /// Bytes read per second. pub read_bytes_per_sec: u64, + + /// Bytes written per second. pub write_bytes_per_sec: u64, + + /// The total number of bytes read by the process. pub total_read_bytes: u64, + + /// The total number of bytes written by the process. pub total_write_bytes: u64, + + /// The current state of the process (e.g. zombie, asleep) pub process_state: String, + + /// The process state represented by a character. TODO: Merge with above as a single struct. pub process_state_char: char, - /// This is the *effective* user ID. + /// This is the *effective* user ID of the process. #[cfg(target_family = "unix")] pub uid: Option<libc::uid_t>, + // pub rss_kb: u64, + // pub virt_kb: u64, } |