pub struct Process {
pub pid: Option<i32>,
pub ppid: Option<i32>,
pub cmdline: Vec<String>,
pub uid: Option<i32>,
pub nspid: Vec<i32>,
pub process_start_from_boot: Option<u64>,
}
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. If it is a kernel thread there will only be one cmdline field and it will contain /proc/pid/comm.
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.
Implementations§
Trait Implementations§
Source§impl Message for Process
impl Message for Process
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
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,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.impl StructuralPartialEq for Process
Auto Trait Implementations§
impl Freeze for Process
impl RefUnwindSafe for Process
impl Send for Process
impl Sync for Process
impl Unpin for Process
impl UnwindSafe for Process
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more