NAME

sys-monitor-lite - Collect lightweight system metrics as JSON or YAML

SYNOPSIS

sys-monitor-lite --once
sys-monitor-lite --interval 5 --collect cpu,mem --output jsonl

DESCRIPTION

Collects metrics exposed by Sys::Monitor::Lite and prints them as JSON, JSON Lines, or YAML. Use --collect to limit which subsystems are gathered.

OPTIONS

--interval NUM

Collect every NUM seconds. Defaults to 5 seconds when running continuously.

--once

Collect a single sample (default when --interval is not provided).

--collect LIST

Comma-separated list of metrics to gather (e.g. cpu,mem,disk). Available metrics: system, cpu, load, mem, disk, disk_io, net, process.

--output FORMAT

Output format: json (default), jsonl for JSON Lines, or yaml.

--pretty

Pretty-print JSON output (ignored for JSON Lines).

--check

Run a single collection, evaluate thresholds, print a compact status, and exit with a Nagios-compatible exit code (0=OK, 1=WARN, 2=CRIT).

--warn EXPR

Warning threshold expression such as mem.used_pct80>. Can be repeated. Automatically enables --check.

--crit EXPR

Critical threshold expression such as mem.used_pct90>. Can be repeated. Automatically enables --check.

--top FIELD=COUNT

Return only the top COUNT processes by CPU usage or RSS (e.g. --top cpu=5 or --top rss=10). Automatically enables the process metric.

--watch NAMES

Comma-separated list of process names/commands to include (e.g. --watch nginx,sssd). Automatically enables the process metric.

--help

Show this help message.

AUTHOR

Shingo Kawamura <kawamurashingo@cpan.org>

COPYRIGHT AND LICENSE

MIT License. See the LICENSE file bundled with this distribution.