Skip to main content

Snapshot

Struct Snapshot 

Source
pub struct Snapshot {
Show 19 fields pub schema_version: u32, pub taken_at_ms: u64, pub host: HostInfo, pub memory: HostMemory, pub cpu: HostCpu, pub oom: Oom, pub accelerators: Vec<Accelerator>, pub thermal: Thermal, pub processes: Vec<Process>, pub groups: Vec<Group>, pub model_servers: Vec<ModelServer>, pub sandboxes: Vec<Sandbox>, pub source_status: BTreeMap<String, SourceStatus>, pub self_pid: Option<u32>, pub cohorts: Vec<Cohort>, pub duplicates: Vec<DuplicateSet>, pub net: Net, pub cgroups: Vec<CgroupMem>, pub isolation: Isolation,
}
Expand description

One consistent view of the machine. Output of the sampler + attribution + adapters.

Fields§

§schema_version: u32§taken_at_ms: u64§host: HostInfo§memory: HostMemory§cpu: HostCpu§oom: Oom§accelerators: Vec<Accelerator>§thermal: Thermal§processes: Vec<Process>§groups: Vec<Group>§model_servers: Vec<ModelServer>§sandboxes: Vec<Sandbox>§source_status: BTreeMap<String, SourceStatus>

Per source name (e.g. “macos.procs”, “linux.meminfo”, “adapter.ollama”).

§self_pid: Option<u32>

pid of the oomtop process that produced this snapshot.

§cohorts: Vec<Cohort>

Leftovers bucketed by the agent session that ended (crate::staleness::cohorts).

§duplicates: Vec<DuplicateSet>

More than one live instance of one fingerprint in one project (crate::staleness::duplicates).

§net: Net

Ports and “who talks to whom” (crate::net): sockets from the socket source, listeners, links and findings computed by crate::net::analyze. Left out of JSON when no socket source ran.

§cgroups: Vec<CgroupMem>

Linux cgroup v2 memory accounting of container / pod cgroups and of every cgroup with a memory limit (SPEC §8.3 per-limit forecast, §11).

§isolation: Isolation

Containers, local Kubernetes clusters, per-limit forecasts, VM slack, namespace sets and stale containers (SPEC §8.3, §11; crate::cluster).

Implementations§

Source§

impl Snapshot

Source

pub fn process(&self, id: ProcId) -> Option<&Process>

Finds a process by identity.

Source

pub fn process_by_pid(&self, pid: u32) -> Option<&Process>

Finds a process by pid only (for ppid/responsible lookups inside one snapshot).

Source

pub fn group(&self, id: &str) -> Option<&Group>

Source

pub fn group_of(&self, id: ProcId) -> Option<&Group>

The group containing a process, if attributed.

Trait Implementations§

Source§

impl Clone for Snapshot

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 Snapshot

Source§

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

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

impl Default for Snapshot

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for Snapshot

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 Snapshot

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 Snapshot

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 Snapshot

Auto Trait Implementations§

§

impl Forget for Snapshot

§

impl Freeze for Snapshot

§

impl Move for Snapshot

§

impl RefUnwindSafe for Snapshot

§

impl Send for Snapshot
where RawVecInner: Send, &'static str: Send, String: Send, NodeRef<Owned, String, SourceStatus, LeafOrInternal>: Send, BoxRaw<(String, SourceStatus)>: Send, NodeRef<Owned, String, u32, LeafOrInternal>: Send, BoxRaw<(String, u32)>: Send, NodeRef<Owned, String, String, LeafOrInternal>: Send, BoxRaw<(String, String)>: Send,

§

impl Sync for Snapshot
where RawVecInner: Sync, String: Sync, NodeRef<Owned, String, SourceStatus, LeafOrInternal>: Sync, BoxRaw<(String, SourceStatus)>: Sync, NodeRef<Owned, String, u32, LeafOrInternal>: Sync, BoxRaw<(String, u32)>: Sync, NodeRef<Owned, String, String, LeafOrInternal>: Sync, BoxRaw<(String, String)>: Sync,

§

impl Unpin for Snapshot
where *const u8 is !null: Unpin, &'static str: Unpin, String: Unpin, *const LeafNode<String, SourceStatus> is !null: Unpin, Box<(String, SourceStatus)>: Unpin, *const LeafNode<String, u32> is !null: Unpin, Box<(String, u32)>: Unpin, *const LeafNode<String, String> is !null: Unpin, Box<(String, String)>: Unpin,

§

impl UnsafeUnpin for Snapshot
where *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, &'static str: UnsafeUnpin, String: UnsafeUnpin, PhantomData<f64>: UnsafeUnpin, PhantomData<CoreKind>: UnsafeUnpin, PhantomData<OomKiller>: UnsafeUnpin, PhantomData<OomThreshold>: UnsafeUnpin, PhantomData<OomKill>: UnsafeUnpin, PhantomData<Accelerator>: UnsafeUnpin, PhantomData<ClusterFreq>: UnsafeUnpin, PhantomData<TempSensor>: UnsafeUnpin, PhantomData<Process>: UnsafeUnpin, PhantomData<Group>: UnsafeUnpin, PhantomData<ModelServer>: UnsafeUnpin, PhantomData<Sandbox>: UnsafeUnpin, *const LeafNode<String, SourceStatus> is !null: UnsafeUnpin, PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin, PhantomData<Box<(String, SourceStatus)>>: UnsafeUnpin, PhantomData<Cohort>: UnsafeUnpin, PhantomData<DuplicateSet>: UnsafeUnpin, PhantomData<Socket>: UnsafeUnpin, PhantomData<NetGap>: UnsafeUnpin, PhantomData<Listener>: UnsafeUnpin, PhantomData<Tunnel>: UnsafeUnpin, PhantomData<NetFinding>: UnsafeUnpin, PhantomData<PortConflict>: UnsafeUnpin, PhantomData<LinkNode>: UnsafeUnpin, PhantomData<Vec<u32>>: UnsafeUnpin, PhantomData<Link>: UnsafeUnpin, *const LeafNode<String, u32> is !null: UnsafeUnpin, PhantomData<Box<(String, u32)>>: UnsafeUnpin, PhantomData<CgroupMem>: UnsafeUnpin, PhantomData<ContainerInfo>: UnsafeUnpin, PhantomData<KubeContextSummary>: UnsafeUnpin, PhantomData<KubeApiData>: UnsafeUnpin, PhantomData<LimitStatus>: UnsafeUnpin, PhantomData<Cluster>: UnsafeUnpin, PhantomData<VmSlack>: UnsafeUnpin, PhantomData<NamespaceSet>: UnsafeUnpin, PhantomData<StaleContainer>: UnsafeUnpin,

§

impl UnwindSafe for Snapshot

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.