Analyze kernel/sysctl tuning from a live node or sosreport snapshot and propose NTO recommendations
Analyzes kernel tuning and sysctl settings from live nodes or sosreports to propose NTO recommendations.
/plugin marketplace add openshift-eng/ai-helpers/plugin install test-coverage@ai-helpers[--sosreport PATH] [--format json|markdown] [--max-irq-samples N]node-tuning:analyze-node-tuning
/node-tuning:analyze-node-tuning [--sosreport PATH] [--collect-sosreport|--no-collect-sosreport] [--sosreport-output PATH] [--node NODE] [--kubeconfig PATH] [--oc-binary PATH] [--format json|markdown] [--max-irq-samples N] [--keep-snapshot]
The node-tuning:analyze-node-tuning command inspects kernel tuning signals gathered from either a live OpenShift node (/proc, /sys), an oc debug node/<name> snapshot captured via KUBECONFIG, or an extracted sosreport directory. It parses CPU isolation parameters, IRQ affinity, huge page allocation, critical sysctl settings, and networking counters before compiling actionable recommendations that can be enforced through Tuned profiles or MachineConfig updates.
Use this command when you need to:
Establish data source
/proc and /sys. Ensure the command runs on the target node (or within an SSH session / debug pod).oc debug: provide --node <name> (plus optional --kubeconfig and --oc-binary). The helper defaults to entering the RHCOS toolbox (backed by the registry.redhat.io/rhel9/support-tools image) via oc debug node/<name>, running sosreport --batch --quiet -e openshift -e openshift_ovn -e openvswitch -e podman -e crio -k crio.all=on -k crio.logs=on -k podman.all=on -k podman.logs=on -k networking.ethtool-namespaces=off --all-logs --plugin-timeout=600, streaming the archive locally (respecting --sosreport-output when set), and analyzing the extracted data. Use --toolbox-image (or TOOLBOX_IMAGE) to point at a mirrored support-tools image, --sosreport-arg to append extra flags (repeat per flag), or --skip-default-sosreport-flags to take full control. Host HTTP(S) proxy variables are forwarded when present but entirely optional. Add --no-collect-sosreport to skip sosreport generation entirely, and --keep-snapshot if you want to retain the downloaded files.--sosreport /path/to/sosreport-<timestamp> pointing to an extracted sosreport directory; the script auto-discovers embedded proc/ and sys/ trees.--proc-root or --sys-root as needed.Prepare workspace
.work/node-tuning/<hostname>/ to store generated reports (remote snapshots and sosreport captures may reuse this path or default to a temporary directory).--format json and --output for machine consumption.Invoke the analysis helper
python3 plugins/node-tuning/skills/scripts/analyze_node_tuning.py \
--sosreport "$SOS_DIR" \
--format markdown \
--max-irq-samples 10 \
--output ".work/node-tuning/${HOSTNAME}/analysis.md"
--sosreport and --node to evaluate the local environment.--max-irq-samples to cap the number of IRQ affinity overlaps listed in the report.Interpret results
net.core.netdev_max_backlog, vm.swappiness, THP state) with recommendations when thresholds are missed.TcpExt counters and sockstat data for backlog drops, syncookie failures, or orphaned sockets.Apply remediation
/node-tuning:generate-tuned-profile or MachineConfig workflows.proc/ or sys/ directories, unreadable sosreport path) and exits non-zero.Analyze a live node and print Markdown
/node-tuning:analyze-node-tuning --format markdown
Capture /proc and /sys via oc debug (sosreport by default) and analyze remotely
/node-tuning:analyze-node-tuning \
--node worker-rt-0 \
--kubeconfig ~/.kube/prod \
--format markdown
Collect a sosreport via oc debug (custom image + flags) and analyze it locally
/node-tuning:analyze-node-tuning \
--node worker-rt-0 \
--toolbox-image registry.example.com/support-tools:latest \
--sosreport-arg "--case-id=01234567" \
--sosreport-output .work/node-tuning/sosreports \
--format json
Inspect an extracted sosreport and save JSON to disk
/node-tuning:analyze-node-tuning \
--sosreport ~/Downloads/sosreport-worker-001 \
--format json \
--max-irq-samples 20
Limit the recommendation set to a handful of IRQ overlaps
/node-tuning:analyze-node-tuning --sosreport /tmp/sosreport --max-irq-samples 5
markdown default or json for structured data).oc debug node/<name> when direct access is not possible.oc debug; relies on the current oc context when omitted.oc binary (defaults to $OC_BIN or oc).oc debug (snapshots or sosreports) for later inspection.sosreport via oc debug node/<name>, download the archive, and analyze the extracted contents automatically (default behavior whenever --node is supplied and no other source is chosen).--node is supplied, falling back to the raw /proc//sys snapshot.registry.redhat.io/rhel9/support-tools:latest or TOOLBOX_IMAGE env).--sosreport-arg.