pub struct Process {
pub pid: Option<i32>,
pub ppid: Option<i32>,
pub cmdline: Vec<String>,
pub cmdline_is_comm: Option<bool>,
pub uid: Option<i32>,
pub nspid: Vec<i32>,
pub process_start_from_boot: Option<u64>,
pub is_kthread: Option<bool>,
}
Expand description
Representation of a process.
Fields§
§pid: Option<i32>
The UNIX process ID, aka thread group ID (as per getpid()) in the root PID namespace.
ppid: Option<i32>
The parent process ID, as per getppid().
cmdline: Vec<String>
The command line for the process, as per /proc/pid/cmdline, broken up on NUL bytes. If it is a kernel thread or a zombie, there will only be one cmdline field and it will contain /proc/pid/comm.
cmdline_is_comm: Option<bool>
If true, the |cmdline| field was filled with the main thread’s “comm” field instead. Introduced in: perfetto v50.
uid: Option<i32>
The uid for the process, as per /proc/pid/status.
nspid: Vec<i32>
The non-root-level process IDs if the process runs in a PID namespace.
Read from the NSpid entry of /proc/
process_start_from_boot: Option<u64>
Timestamp of when the process was created, in nanoseconds from boot. Parsed from starttime in /proc/pid/stat. Recorded if record_process_age config option is set. Resolution of “clock ticks”, usually 10ms.
is_kthread: Option<bool>
If true, the process is a kernel thread. Set only on linux v6.4+. For traces from older devices, it is possible to infer most kthreads by checking that they’re a descendant of kthreadd (pid=2), or are the idle process (pid=0). Introduced in: perfetto v50.
Implementations§
Source§impl Process
impl Process
Sourcepub fn process_start_from_boot(&self) -> u64
pub fn process_start_from_boot(&self) -> u64
Returns the value of process_start_from_boot
, or the default value if process_start_from_boot
is unset.
Sourcepub fn is_kthread(&self) -> bool
pub fn is_kthread(&self) -> bool
Returns the value of is_kthread
, or the default value if is_kthread
is unset.
Sourcepub fn cmdline_is_comm(&self) -> bool
pub fn cmdline_is_comm(&self) -> bool
Returns the value of cmdline_is_comm
, or the default value if cmdline_is_comm
is unset.
Trait Implementations§
Source§impl Message for Process
impl Message for Process
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
.