pub struct Snapshot {Show 15 fields
pub timestamp_ms: u64,
pub host: HostInfo,
pub cpu: CpuStats,
pub memory: MemoryStats,
pub gpus: Vec<GpuStats>,
pub sensors: Vec<SensorChip>,
pub power: PowerStats,
pub disks: Vec<DiskIo>,
pub filesystems: Vec<FilesystemUsage>,
pub raid: RaidStats,
pub smart: Vec<SmartDevice>,
pub networks: Vec<NetworkStats>,
pub processes: Vec<ProcessInfo>,
pub process_count: usize,
pub lhm_error: Option<String>,
}Expand description
One full measurement of a host.
Fields§
§timestamp_ms: u64Wall-clock time of the measurement, in milliseconds since the Unix epoch.
host: HostInfoStatic-ish information about the host.
cpu: CpuStatsCPU load, frequency and temperature.
memory: MemoryStatsPhysical memory and swap.
gpus: Vec<GpuStats>Discrete and integrated GPUs that could be queried.
sensors: Vec<SensorChip>Raw hardware sensor chips (temperatures and fans), grouped by chip.
power: PowerStatsPower draw summary.
disks: Vec<DiskIo>I/O activity per physical block device.
filesystems: Vec<FilesystemUsage>Capacity of mounted filesystems.
raid: RaidStatsSoftware RAID state (btrfs and mdadm).
smart: Vec<SmartDevice>SMART health per drive, from files written by a privileged timer.
networks: Vec<NetworkStats>Network interface traffic.
processes: Vec<ProcessInfo>Process list. May be truncated by the source (see Snapshot::truncate_processes).
process_count: usizeTotal number of processes on the host, even if processes was truncated.
lhm_error: Option<String>Windows: why LibreHardwareMonitor, the source of temperatures, fans
and CPU power, could not be read. None when it was read, when it is
disabled in the configuration, and on other platforms.
Implementations§
Source§impl Snapshot
impl Snapshot
Sourcepub fn truncate_processes(&mut self, limit: usize)
pub fn truncate_processes(&mut self, limit: usize)
Keeps only the limit processes with the highest CPU usage.
Used to reduce the payload when a host is shown in an overview rather
than in detail. Kernel threads are dropped first: the overview does not
show them, and busy kworkers would otherwise take places in the top
limit and leave the list short. process_count keeps the original
total.