pub struct LocalSource { /* private fields */ }Expand description
Collects snapshots of the machine rigtop runs on.
Implementations§
Source§impl LocalSource
impl LocalSource
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a source with the default configuration. See LocalSource::with_config.
Sourcepub fn with_config(config: &Config) -> Self
pub fn with_config(config: &Config) -> Self
Creates a source and takes a warm-up sample, so that the first
DataSource::poll (after at least MIN_POLL_INTERVAL) already
has rates.
Only collection-related settings (the SMART directory) are used here; display settings such as sensor labels are applied by front-ends.
Why NVIDIA GPUs are unavailable, if NVML failed to initialize.
Trait Implementations§
Source§impl DataSource for LocalSource
impl DataSource for LocalSource
Source§fn signal_process(
&mut self,
pid: u32,
signal: ProcessSignal,
) -> Result<(), SourceError>
fn signal_process( &mut self, pid: u32, signal: ProcessSignal, ) -> Result<(), SourceError>
Sends
signal to process pid on the monitored host, with the
privileges of the user the source runs as.Source§fn set_interval(&mut self, _interval: Duration)
fn set_interval(&mut self, _interval: Duration)
Tells the source how often it will be polled. Remote sources forward
this to the agent, which samples on its own schedule; local sources
need nothing.
Source§fn set_process_limit(&mut self, _limit: Option<usize>)
fn set_process_limit(&mut self, _limit: Option<usize>)
Limits snapshots to the top
limit processes by CPU (None: all).
Remote sources use this to save bandwidth for hosts in an overview.Auto Trait Implementations§
impl !RefUnwindSafe for LocalSource
impl !UnwindSafe for LocalSource
impl Freeze for LocalSource
impl Send for LocalSource
impl Sync for LocalSource
impl Unpin for LocalSource
impl UnsafeUnpin for LocalSource
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