DiskStat

Struct DiskStat 

Source
struct DiskStat {
    sectors_read: u64,
    sectors_written: u64,
}
Expand description

Disk IO stat information from /proc/diskstats file.

To fully understand these fields, please see the iostats.txt kernel documentation.

This type only contains the value sysinfo is interested into.

The fields of this file are:

  1. major number
  2. minor number
  3. device name
  4. reads completed successfully
  5. reads merged
  6. sectors read
  7. time spent reading (ms)
  8. writes completed
  9. writes merged
  10. sectors written
  11. time spent writing (ms)
  12. I/Os currently in progress
  13. time spent doing I/Os (ms)
  14. weighted time spent doing I/Os (ms)

Doc reference: https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats

Doc reference: https://www.kernel.org/doc/Documentation/iostats.txt

Fields§

§sectors_read: u64§sectors_written: u64

Implementations§

Source§

impl DiskStat

Source

fn new_from_line(line: &str) -> Option<(String, Self)>

Returns the name and the values we’re interested into.

Trait Implementations§

Source§

impl Debug for DiskStat

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for DiskStat

Source§

fn eq(&self, other: &DiskStat) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for DiskStat

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.