public class ProcessSnapshot
Immutable process observation. All getters are O(1); check status first. CPU is 0..100 percent of the whole machine's logical CPU capacity. residentMemoryBytes is RSS/working set; privateMemoryBytes is anonymous RSS on Linux, private committed bytes on Windows, owned resident pages on KlynOS. These private-memory definitions are intentionally not interchangeable.
if row.status(ProcessField.NAME) == MetricStatus.AVAILABLE: print(row.name)
| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | cpuKernelTimeNscpuKernelTimeNs as ULong |
cpuKernelTimeNs observation, in bytes/ns where applicable. |
| public readonly property | cpuPercentcpuPercent as Double |
Whole-machine normalized CPU; the first observation is NOT_READY. |
| public readonly property | cpuUserTimeNscpuUserTimeNs as ULong |
cpuUserTimeNs observation, in bytes/ns where applicable. |
| public readonly property | executablePathexecutablePath as String |
executablePath observation, in bytes/ns where applicable. |
| public readonly property | identityidentity as ProcessIdentity |
Stable identity; unavailable identities cannot be used for control. |
| public readonly property | namename as String |
name observation, in bytes/ns where applicable. |
| public readonly property | parentPidparentPid as ULong |
parentPid observation, in bytes/ns where applicable. |
| public readonly property | pidpid as ULong |
Enumerated PID, including when optional identity fields are inaccessible. |
| public readonly property | privateMemoryBytesprivateMemoryBytes as ULong |
privateMemoryBytes observation, in bytes/ns where applicable. |
| public readonly property | residentMemoryBytesresidentMemoryBytes as ULong |
residentMemoryBytes observation, in bytes/ns where applicable. |
| public readonly property | statestate as ProcessState |
Portable lifecycle state. |
| public readonly property | threadCountthreadCount as UInt |
threadCount observation, in bytes/ns where applicable. |
| public readonly property | userIduserId as String |
userId observation, in bytes/ns where applicable. |
| public readonly property | userNameuserName as String |
userName observation, in bytes/ns where applicable. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | ProcessSnapshotProcessSnapshot(data as ProcessSample, cpu as Double, cpuStatus as MetricStatus) |
Runtime adapter constructor. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | statusstatus(notnull field as ProcessField) as MetricStatus |
Returns availability without reading a scalar or throwing for missing data. |