ProcpsFormula class
Installs the process tools — ps and top — on a node.
Less cosmetic than it sounds: the agent's own monitor reports the process
table by shelling out to ps, and degrades to an empty list when it is
missing. A slim container image typically has neither, so a node on one
reports its CPU and memory perfectly well and no processes at all. This is
the formula that fills that in.
macOS ships both as part of the system, so there is no brew package here:
install short-circuits on a passing verify, and uninstall correctly reports
that removing /bin/ps is not something this formula does.
- Inheritance
-
- Object
- Formula
- CommandFormula
- PackageFormula
- ProcpsFormula
Constructors
- ProcpsFormula({CommandExecutor executor = const ProcessCommandExecutor()})
-
Creates the formula, optionally over a custom
executor.
Properties
- executor → CommandExecutor
-
Runs the underlying commands.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- packages → PackageNames
-
What the package is called, per manager.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spec → FormulaSpec
-
The static metadata describing this formula.
no setteroverride
- verifyStep → CommandStep
-
Both tools have to be there, and the version is reported when the host's
psis one that can say (procps-ng can; BSD and busybox cannot, and are not wrong to refuse--version).no setteroverride - versionPattern → RegExp
-
A regex capturing the version from the verify output.
no setterinherited
Methods
-
install(
FormulaContext context) → Future< FormulaResult> -
Installs the managed software.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
restart(
FormulaContext context) → Future< FormulaResult> -
Restarts the managed service.
inherited
-
run(
FormulaAction action, FormulaContext context) → Future< FormulaResult> -
Dispatches the given
actionto the matching method.inherited -
start(
FormulaContext context) → Future< FormulaResult> -
Starts the managed service.
inherited
-
status(
FormulaContext context) → Future< FormulaStatusReport> -
Present first, running second.
inherited
-
statusFrom(
ExecResult result) → FormulaStatus -
Maps a statusStepFor probe's outcome to a status.
inherited
-
statusStepFor(
String osName) → CommandStep? -
The probe that says whether what this formula manages is running, or
nullwhen it manages nothing that runs.inherited -
stepFor(
FormulaAction action, String osName) → CommandStep? -
Returns the command template for
actiononosName, ornullif the action is unsupported on that platform.inherited -
stop(
FormulaContext context) → Future< FormulaResult> -
Stops the managed service.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
uninstall(
FormulaContext context) → Future< FormulaResult> -
Uninstalls the managed software.
inherited
-
update(
FormulaContext context) → Future< FormulaResult> -
Updates the managed software toward the target version.
inherited
-
validate(
FormulaContext context) → Future< ValidationResult> -
Validates that the managed software is present and healthy.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited