spdl.pipeline.ProcessStats¶
- class ProcessStats(pid: int, ppid: int, name: str, new: bool, minflt: int | None, majflt: int | None, utime: float | None, stime: float | None, cminflt: int | None, cmajflt: int | None, cutime: float | None, cstime: float | None, voluntary_ctxt_switches: int | None, nonvoluntary_ctxt_switches: int | None, rchar: int | None, wchar: int | None, read_bytes: int | None, write_bytes: int | None, num_threads: int | None, rss: int | None, rss_anon: int | None, rss_file: int | None, rss_shmem: int | None, peak_rss: int | None, swap: int | None, pss: int | None = None, pss_anon: int | None = None, anonymous: int | None = None, private: int | None = None)[source]¶
Counters of one process over the sampling interval.
Counters (faults, CPU time, context switches, I/O) are increases over the interval; memory values are as of the end of the interval.
Nonemeans the value is unavailable on this kernel or to this user, never zero.Added in version 0.9.0.
Attributes
Anonymous memory from
smaps_rollup, in bytes.what would be freed if it exited.
Proportional set size, in bytes.
Anonymous part of
pss, in bytes.Process ID.
Parent process ID.
The process's
comm(executable name, at most 15 bytes).The process was not seen in the previous sample, so its counters cover its whole life rather than the interval.
a page was mapped without disk I/O, such as first touch of freshly allocated memory.
the page had to be read from disk or swap.
CPU time in user mode, in seconds.
CPU time in kernel mode, in seconds.
Minor faults of child processes that exited and were reaped in the interval.
Major faults of child processes that exited and were reaped in the interval.
User CPU time, in seconds, of child processes reaped in the interval.
Kernel CPU time, in seconds, of child processes reaped in the interval.
Context switches because the process waited (I/O, lock, sleep).
Context switches because the scheduler preempted the process.
Bytes read through syscalls, including from the page cache.
Bytes written through syscalls.
Bytes the process caused to be read from storage.
Bytes the process caused to be written to storage.
Number of threads at the end of the interval.
Resident memory, in bytes.
Resident anonymous memory (heap, stacks, private mappings), in bytes.
Resident file-backed memory, in bytes.
Resident shared memory (
shm,tmpfs, shared anonymous), in bytes.Peak resident memory over the process's life (
VmHWM), in bytes.Swapped-out memory, in bytes.
- anonymous: int | None = None¶
Anonymous memory from
smaps_rollup, in bytes. Only withsmaps_rollup=True.
- minflt: int | None¶
a page was mapped without disk I/O, such as first touch of freshly allocated memory.
- Type:
Minor page faults
- new: bool¶
The process was not seen in the previous sample, so its counters cover its whole life rather than the interval.
- nonvoluntary_ctxt_switches: int | None¶
Context switches because the scheduler preempted the process.
- private: int | None = None¶
what would be freed if it exited. Only with
smaps_rollup=True.- Type:
Memory exclusive to the process (
Private_Clean + Private_Dirty), in bytes
- stime: float | None¶
CPU time in kernel mode, in seconds. Includes page-fault handling and syscalls.