pub struct FtraceCpuStats {
pub cpu: Option<u64>,
pub entries: Option<u64>,
pub overrun: Option<u64>,
pub commit_overrun: Option<u64>,
pub bytes_read: Option<u64>,
pub oldest_event_ts: Option<f64>,
pub now_ts: Option<f64>,
pub dropped_events: Option<u64>,
pub read_events: Option<u64>,
}
Expand description
Per-CPU kernel buffer stats for the ftrace data source gathered from /sys/kernel/tracing/per_cpu/cpuX/stats.
Fields§
§cpu: Option<u64>
CPU index.
entries: Option<u64>
Number of entries currently in the kernel buffer.
overrun: Option<u64>
Number of events lost in kernel buffers due to overwriting of old events before userspace had a chance to drain them. Valid if the buffer is in “overwrite” mode, otherwise see |dropped_events|.
commit_overrun: Option<u64>
This should always be zero. If not the buffer size is way too small or something went wrong with the tracer. Quoting the kernel: “number of commits failing due to the buffer wrapping around while there are uncommitted events, such as during an interrupt storm”.
bytes_read: Option<u64>
Size of entries currently in the kernel buffer (see |entries|) in bytes. The field should be named “bytes”, but is misnamed for historical reasons. This value has known inaccuracies before Linux v6.6: https://github.com/torvalds/linux/commit/45d99ea
oldest_event_ts: Option<f64>
The timestamp for the oldest event still in the ring buffer. Unit: seconds for typical trace clocks (i.e. not tsc/counter).
now_ts: Option<f64>
The current timestamp. Unit: seconds for typical trace clocks (i.e. not tsc/counter).
dropped_events: Option<u64>
If the kernel buffer has overwrite mode disabled, this will show the number of new events that were lost because the buffer was full. This is similar to |overrun| but only for the overwrite=false case.
read_events: Option<u64>
The number of events read (consumed) from the buffer by userspace.
Implementations§
Source§impl FtraceCpuStats
impl FtraceCpuStats
Sourcepub fn entries(&self) -> u64
pub fn entries(&self) -> u64
Returns the value of entries
, or the default value if entries
is unset.
Sourcepub fn overrun(&self) -> u64
pub fn overrun(&self) -> u64
Returns the value of overrun
, or the default value if overrun
is unset.
Sourcepub fn commit_overrun(&self) -> u64
pub fn commit_overrun(&self) -> u64
Returns the value of commit_overrun
, or the default value if commit_overrun
is unset.
Sourcepub fn bytes_read(&self) -> u64
pub fn bytes_read(&self) -> u64
Returns the value of bytes_read
, or the default value if bytes_read
is unset.
Sourcepub fn oldest_event_ts(&self) -> f64
pub fn oldest_event_ts(&self) -> f64
Returns the value of oldest_event_ts
, or the default value if oldest_event_ts
is unset.
Sourcepub fn now_ts(&self) -> f64
pub fn now_ts(&self) -> f64
Returns the value of now_ts
, or the default value if now_ts
is unset.
Sourcepub fn dropped_events(&self) -> u64
pub fn dropped_events(&self) -> u64
Returns the value of dropped_events
, or the default value if dropped_events
is unset.
Sourcepub fn read_events(&self) -> u64
pub fn read_events(&self) -> u64
Returns the value of read_events
, or the default value if read_events
is unset.
Trait Implementations§
Source§impl Clone for FtraceCpuStats
impl Clone for FtraceCpuStats
Source§fn clone(&self) -> FtraceCpuStats
fn clone(&self) -> FtraceCpuStats
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for FtraceCpuStats
impl Debug for FtraceCpuStats
Source§impl Default for FtraceCpuStats
impl Default for FtraceCpuStats
Source§impl Message for FtraceCpuStats
impl Message for FtraceCpuStats
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
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>
self
.