waitload

command
v0.184.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: BSD-3-Clause Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command waitload blocks until the host is quiet enough to measure on, and exits 0 only then: the 1-minute load average at or below a limit, and with --max-busy the CPU busy share too, for K consecutive readings.

⛔ WHY THIS EXISTS. An agent must not measure on a busy host (1-minute load above about 8), and no fleet program could WAIT for a quiet one: hostload reads the load once and exits 1, and the shell loop or `sleep` an agent would reach for is refused by guard-bash. An agent stopped on exactly that at 21:42 CET on 2026-11-18.

⛔ IT READS THE LOAD THROUGH loadavg.Avg1 AND THE BUSY SHARE THROUGH internal/procstat, the two readers hostload uses. A second reader would be a second place for the macOS sysctl decoding to be wrong.

⛔ THE LOOP IS BOUNDED BY A COUNT AND BY A DEADLINE, BOTH COMPUTED BEFORE THE FIRST READING (#327): the load is a value the host reports, and no predicate over a reported value is a bound this command controls. The count is the number of readings that fit in --timeout; the deadline is elapsed time.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL