[][src]Trait rsys::linux::OsImplExt

pub trait OsImplExt {
    fn stat_block_device(&self, name: &str) -> Result<StorageDevice>;
fn stat_device_mapper(&self, name: &str) -> Result<DeviceMapper>;
fn stat_scsi_cdrom(&self, name: &str) -> Result<ScsiCdrom>;
fn stat_multiple_device_storage(
        &self,
        name: &str
    ) -> Result<MultipleDeviceStorage>;
fn block_size(&self, name: &str) -> Result<i64>;
fn memory(&self) -> Result<Memory>;
fn stat_process(&self, pid: i32) -> Result<Process>;
fn pids(&self) -> Result<Vec<i32>>;
fn processes(&self) -> Result<Processes>;
fn kernel_version(&self) -> Result<String>;
fn mounts(&self) -> Result<MountPoints>;
fn cores(&self) -> Result<Cores>;
fn processor(&self) -> Result<Processor>; }

Trait extending Rsys functionality with linux specific api

Required methods

fn stat_block_device(&self, name: &str) -> Result<StorageDevice>

Parses a StorageDevice object from system. If the provided name doesn't start with sd returns an error.

fn stat_device_mapper(&self, name: &str) -> Result<DeviceMapper>

Parses a DeviceMapper object from system. If the provided name doesn't start with dm returns an error.

fn stat_scsi_cdrom(&self, name: &str) -> Result<ScsiCdrom>

Parses a ScsiCdrom object from system. If the provided name doesn't start with sr returns an error.

fn stat_multiple_device_storage(
    &self,
    name: &str
) -> Result<MultipleDeviceStorage>

Parses a MultipleDeviceStorage object from system. If the provided name doesn't start with md returns an error.

fn block_size(&self, name: &str) -> Result<i64>

Returns block size of device in bytes

fn memory(&self) -> Result<Memory>

Returns detailed information about memory

fn stat_process(&self, pid: i32) -> Result<Process>

Returns detailed Process information parsed from /proc/[pid]/stat

fn pids(&self) -> Result<Vec<i32>>

Returns a list of pids read from /proc

fn processes(&self) -> Result<Processes>

Returns all processes currently seen in /proc parsed as Processes

fn kernel_version(&self) -> Result<String>

Returns kernel version of host os.

fn mounts(&self) -> Result<MountPoints>

Returns MountPoints read from /proc/mounts

fn cores(&self) -> Result<Cores>

Returns virtual Cores of host cpu

fn processor(&self) -> Result<Processor>

Returns a Processor object containing gathered information about host cpu

Loading content...

Implementors

Loading content...