ovs-db-analysis
БесплатноЗапускает вложенные скриптыНе проверенAnalyze Open vSwitch data from sosreport
Об этом скилле
OVS Database and Flow Analysis
This skill provides detailed analysis of Open vSwitch (OVS) data collected via sosreport. It operates in four modes:
- Default mode: Full analysis - conf.db + all text files (requires ovsdb-tool, falls back to text files if not available)
- Database mode (
--db): Database only - analyze conf.db (requires ovsdb-tool) - Text files mode (
--flows-only): Text files only - no ovsdb-tool needed - Query mode (
--query): Run custom OVSDB JSON queries (requires ovsdb-tool)
When to Use This Skill
Use this skill when:
- Troubleshooting packet drops - Find drop flows being hit
- Analyzing flow performance - View top flows by packet count
- Analyzing OVS configuration from a sosreport
- Troubleshooting bridge, port, or interface issues
- Investigating DPDK vs kernelspace datapath
- Reviewing tunnel configurations (VXLAN, Geneve, GRE)
- Checking port statistics (drops, errors, traffic)
- Mapping Kubernetes pods to OVS interfaces
Prerequisites
Default mode (full analysis):
- ovsdb-tool must be installed (from openvswitch package)
- Falls back to
--flows-onlyif ovsdb-tool not found - Sosreport with
sos_commands/openvswitch/directory andconf.db
Database mode (--db):
- ovsdb-tool must be installed (from openvswitch package)
- Check:
which ovsdb-tool - Fedora/RHEL:
sudo dnf install openvswitch - Ubuntu/Debian:
sudo apt install openvswitch-common
- Check:
- Sosreport with
conf.dbfile
Text files mode (--flows-only):
- No special tools needed - works out of the box!
- Sosreport with
sos_commands/openvswitch/directory
Query mode (--query):
- ovsdb-tool must be installed
- Incompatible with
--flows-only
File Locations in Sosreport
The sosreport collects:
sosreport-hostname-date/
├── etc/openvswitch/conf.db (OVS database - for --db mode)
├── var/lib/openvswitch/conf.db (alternate location)
└── sos_commands/openvswitch/ (default mode uses these)
├── ovs-vsctl_-t_5_show (topology)
├── ovs-vsctl_-t_5_list_bridge (bridge details)
├── ovs-vsctl_-t_5_list_interface (interface details)
├── ovs-vsctl_-t_5_list_Open_vSwitch (system info)
├── ovs-ofctl_dump-flows_<bridge> (OpenFlow entries)
├── ovs-ofctl_dump-ports_<bridge> (Port statistics)
├── ovs-appctl_coverage.show (internal stats)
├── ovs-appctl_upcall.show (datapath health)
├── ovs-appctl_tnl.ports.show_-v (tunnel ports)
└── ...
Analysis Script
The analysis script is located at:
<plugin-root>/skills/ovs-db-analysis/scripts/analyze_ovs_db.py
Implementation Steps
Step 1: Locate the Analysis Script
SCRIPT_PATH=$(find ~ -name "analyze_ovs_db.py" -path "*/sosreport/skills/ovs-db-analysis/scripts/*" 2>/dev/null | head -1)
if [ -z "$SCRIPT_PATH" ]; then
echo "ERROR: analyze_ovs_db.py script not found."
exit 1
fi
Step 2: Run the Analysis
# Default: Full analysis - conf.db + text files (requires ovsdb-tool)
python3 "$SCRIPT_PATH" /path/to/sosreport-hostname-date/
# Analyze from archive
python3 "$SCRIPT_PATH" /path/to/sosreport-hostname-date.tar.xz
# Database only mode (requires ovsdb-tool)
python3 "$SCRIPT_PATH" /path/to/sosreport/ --db
# Text files only mode (no ovsdb-tool needed)
python3 "$SCRIPT_PATH" /path/to/sosreport/ --flows-only
Step 3: Custom Queries (Optional, requires --db)
For specific investigations, use raw OVSDB queries:
# Query all bridges
python3 "$SCRIPT_PATH" /path/to/sosreport/ --query '["Open_vSwitch", {"op":"select", "table":"Bridge", "where":[], "columns":["name","datapath_type","fail_mode"]}]'
# Query VXLAN interfaces
python3 "$SCRIPT_PATH" /path/to/sosreport/ --query '["Open_vSwitch", {"op":"select", "table":"Interface", "where":"type","==","vxlan", "columns":["name","options"]}]'
# Query interfaces with errors
python3 "$SCRIPT_PATH" /path/to/sosreport/ --query '["Open_vSwitch", {"op":"select", "table":"Interface", "where":[], "columns":["name","error"]}]'
Analysis Output
The default mode analyzes:
| Analysis | Source File | Description |
|---|---|---|
| System Info | ovs-vsctl_-t_5_list_Open_vSwitch |
OVS/DPDK version, system type, external IDs |
| Topology | ovs-vsctl_-t_5_show |
Bridge overview with ports grouped by type |
| Bridge Details | ovs-vsctl_-t_5_list_bridge |
Datapath type, fail mode, CT zones |
| Interfaces | ovs-vsctl_-t_5_list_interface |
By type, pod interfaces with mapping |
| OpenFlow | ovs-ofctl_dump-flows_* |
Flow counts, drops, top flows |
| Port Stats | ovs-ofctl_dump-ports_* |
RX/TX drops and errors |
| Tunnels | ovs-appctl_tnl.ports.show_-v |
Configured tunnel ports |
| Datapath Health | ovs-appctl_upcall.show |
Flow table usage vs limit |
| OVS Stats | ovs-appctl_coverage.show |
Internal counters (netlink, OVSDB, etc.) |
OpenFlow Analys
Установить ovs-db-analysis в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл ovs-db-analysis?
Analyze Open vSwitch data from sosreport
Как установить скилл ovs-db-analysis?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ovs-db-analysis запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic