Skip to main content

update_unit_stats

Function update_unit_stats 

Source
pub async fn update_unit_stats(
    config: Arc<Config>,
    connection: Connection,
    locked_machine_stats: Arc<RwLock<MachineStats>>,
    fs_root: String,
) -> Result<()>
Expand description

Async wrapper that can update unit stats when passed a locked struct. fs_root is prepended to filesystem paths for unit file stats — empty string for the host, /proc/<pid>/root for containers.