pub struct ProcessDetail {Show 13 fields
pub identity: ProcessIdentity,
pub working_directory: MetricState<Box<str>>,
pub root: MetricState<Box<str>>,
pub open_files: MetricState<u32>,
pub sockets: MetricState<u32>,
pub open_file_list: MetricState<OpenFileList>,
pub ancestry: MetricState<Vec<AncestorEntry>>,
pub children: MetricState<Vec<ProcessIdentity>>,
pub descendants: MetricState<u32>,
pub nice: MetricState<i32>,
pub cgroup: MetricState<Box<str>>,
pub container: MetricState<Box<str>>,
pub collected_at: SystemTime,
}Expand description
The expensive per-process fields, collected on demand for the selected process only (§8.6).
Environment variables are deliberately absent from this type, not merely hidden by default: §7.5 forbids showing their values, and §15.2 forbids logging them, so the safest design is never to read them at all.
The paths in ProcessDetail::open_file_list are user data of the same kind,
and they are read because §7.2 asks for them on screen. What §15.2 and §19
forbid is letting them leave the process, so they are redacted in the
Serialize implementation itself rather than by whatever serializes them — see
OpenFileEntry::path.
Fields§
§identity: ProcessIdentityWhich process this describes.
Checked against the current selection before rendering, so a late reply for a process the user has moved off is discarded rather than shown against the wrong row.
working_directory: MetricState<Box<str>>Current working directory.
root: MetricState<Box<str>>Filesystem root, which differs from / inside a container.
open_files: MetricState<u32>Open file descriptor count.
sockets: MetricState<u32>Open socket count.
open_file_list: MetricState<OpenFileList>The descriptors themselves, bounded by OpenFileList::MAX_LISTED.
Separate from ProcessDetail::open_files because the two cost different
things: the count is one cheap read on both platforms, while the list is one
syscall per descriptor. A platform that can count but not list therefore
reports a count and an MetricState::Unsupported list rather than
withholding both.
ancestry: MetricState<Vec<AncestorEntry>>Ancestry from the immediate parent up towards PID 1.
children: MetricState<Vec<ProcessIdentity>>Direct children.
descendants: MetricState<u32>Total descendants, including indirect ones (§2.4).
nice: MetricState<i32>Scheduling niceness.
cgroup: MetricState<Box<str>>cgroup path. Linux only.
container: MetricState<Box<str>>Container identity, where derivable from the cgroup path.
collected_at: SystemTimeWhen this detail was collected, so the UI can age it.
Implementations§
Source§impl ProcessDetail
impl ProcessDetail
Sourcepub fn pending(identity: ProcessIdentity, collected_at: SystemTime) -> Self
pub fn pending(identity: ProcessIdentity, collected_at: SystemTime) -> Self
An empty detail record for identity, with every field unmeasured.
Trait Implementations§
Source§impl Clone for ProcessDetail
impl Clone for ProcessDetail
Source§fn clone(&self) -> ProcessDetail
fn clone(&self) -> ProcessDetail
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more