Skip to main content

Process

Struct Process 

Source
pub struct Process {
Show 30 fields pub id: ProcId, pub ppid: Option<u32>, pub responsible_pid: Option<u32>, pub name: String, pub exe: String, pub cmdline: Vec<String>, pub cwd: Option<String>, pub uid: Option<u32>, pub user: Option<String>, pub cpu_pct: Measured<f64>, pub mem: MemBreakdown, pub disk_io: DiskIo, pub state: ProcState, pub threads: Option<u32>, pub idle_for_s: Measured<u64>, pub markers: Markers, pub cgroup: Option<String>, pub oom_score: Option<i32>, pub bundle_id: Option<String>, pub model_files: Vec<String>, pub age_s: Measured<u64>, pub cpu_time_s: Measured<f64>, pub duty_pct: Measured<f64>, pub idle_rent_gib_h: Measured<f64>, pub cwd_missing: Option<bool>, pub exe_change: Option<ExeChange>, pub project: Option<String>, pub transcript_mtime_ms: Measured<u64>, pub listening_no_clients: Option<bool>, pub ns: Option<NsIds>,
}

Fields§

§id: ProcId§ppid: Option<u32>§responsible_pid: Option<u32>

macOS responsible pid (helpers/XPC → launching app).

§name: String

Short name (comm / basename).

§exe: String

Executable path (may be empty when unreadable).

§cmdline: Vec<String>

argv. Raw in a live snapshot; redacted in every export.

§cwd: Option<String>§uid: Option<u32>§user: Option<String>§cpu_pct: Measured<f64>

Per-core percent (100 = one core busy); needs two samples.

§mem: MemBreakdown§disk_io: DiskIo§state: ProcState§threads: Option<u32>§idle_for_s: Measured<u64>

Seconds idle; Estimate quality means “≥ observed window” (no lineage data).

§markers: Markers§cgroup: Option<String>

Linux cgroup v2 path.

§oom_score: Option<i32>

Linux /proc/<pid>/oom_score.

§bundle_id: Option<String>

macOS bundle id of the owning app, when known.

§model_files: Vec<String>

Model weight files mapped/open (*.gguf, *.safetensors), when known.

§age_s: Measured<u64>

Seconds since the process started (now − start time).

§cpu_time_s: Measured<f64>

Total CPU time (user + system) since the process started, seconds.

§duty_pct: Measured<f64>

Duty cycle: CPU time ÷ age, in percent of one core (100 = one core busy for its whole life).

§idle_rent_gib_h: Measured<f64>

Idle rent: GiB-hours of footprint held while idle (footprint × idle time); always an estimate.

§cwd_missing: Option<bool>

Some(true): the working directory no longer exists; None: not checked / not readable.

§exe_change: Option<ExeChange>

The executable was deleted or replaced since the process started; None: unchanged or unknown.

§project: Option<String>

Project directory: git root of the cwd when known, else the cwd.

§transcript_mtime_ms: Measured<u64>

Agent session roots: modification time (ms since the epoch) of the session’s transcript file. The file’s content is never read.

§listening_no_clients: Option<bool>

Reserved for network data (not collected yet): Some(true) when the process listens on a port and has no clients. Feeds the listening_no_clients staleness signal.

§ns: Option<NsIds>

Linux namespace identities (/proc/<pid>/ns/*, own processes only); None = not read or not Linux (SPEC §11 “Namespaces”, crate::namespaces).

Trait Implementations§

Source§

impl Clone for Process

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Process

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Process

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Process

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Process

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Process

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Process

Auto Trait Implementations§

§

impl Forget for Process

§

impl Freeze for Process

§

impl Move for Process

§

impl RefUnwindSafe for Process

§

impl Send for Process
where RawVecInner: Send, &'static str: Send, String: Send,

§

impl Sync for Process
where RawVecInner: Sync, String: Sync,

§

impl Unpin for Process
where *const u8 is !null: Unpin, &'static str: Unpin, String: Unpin,

§

impl UnsafeUnpin for Process

§

impl UnwindSafe for Process
where RawVecInner: UnwindSafe, &'static str: UnwindSafe, String: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.