Documentation
¶
Overview ¶
Package check_resources implements the ctx system check-resources subcommand.
It collects system resource metrics (memory, swap, disk, load) and emits a warning when any resource hits danger severity.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cmd ¶
Cmd returns the "ctx system check-resources" subcommand.
Returns:
- *cobra.Command: Configured check-resources subcommand
func Run ¶
Run executes the check-resources hook logic.
Collects system resource snapshots, evaluates alert thresholds, and emits a relay warning box when any resource is at danger level. Throttled by session pause state.
Parameters:
- cmd: Cobra command for output
- stdin: standard input for hook JSON
Returns:
- error: Always nil (hook errors are non-fatal)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.