pub struct ClamStats {Show 14 fields
pub pools: u64,
pub state: String,
pub threads_live: u64,
pub threads_idle: u64,
pub threads_max: u64,
pub threads_idle_timeout_secs: u64,
pub queue: u64,
pub mem_heap: String,
pub mem_mmap: String,
pub mem_used: String,
pub mem_free: String,
pub mem_releasable: String,
pub pools_used: String,
pub pools_total: String,
}Expand description
ClamStats provides all of the metrics that Clam provides via the STATS command
as at version 0.100.
Fields§
§pools: u64The number of pools available to ClamAV
state: StringThe state of the responding Clam Daemon
threads_live: u64The numbe of active threads owned by the Clam Daemon
threads_idle: u64The number of idle threads owned by the Clam Daemon
threads_max: u64The maximum number of threads the Clam Daemon can spawn
threads_idle_timeout_secs: u64The timeout (seconds) before a thread is determined to be idle
queue: u64The number of items in the queue awaiting processing
mem_heap: StringTotal memory allocated to the heap
mem_mmap: StringAmmount of mmap’d memory used
mem_used: StringTotal memory used by the daemon
mem_free: StringTotal memory available to the daemon not in use
mem_releasable: StringTotal memory re
pools_used: StringTotal number of pools in use by the daemon
pools_total: StringTotal number of pools available to the daemon
Implementations§
Source§impl ClamStats
impl ClamStats
Sourcepub fn parse(s_string: &str) -> ClamResult<Self>
pub fn parse(s_string: &str) -> ClamResult<Self>
ClamStats::parse takes a statistics output of the Clam STATS command and uses
nom to parse that into a strongly typed struct.
Given that this is likely to be the most volatile area of returned data, it is likely
that this will fail across different versions. This parses the data expected as of
version 0.100.0. If it cannot parse the data, then the result is returned in its
raw form insude ClamError::InvalidData.