You can SSH into twenty switches and type show interface status by hand. At four hundred, the wall you hit has nothing to do with SSH. It is that you now hold several thousand command outputs, none of them comparable to each other, and the only question worth answering — what changed, and what deviates from the rest — is buried in text no parser has touched.
Parallelism is the easy half
Start with arithmetic you can do on a napkin. Four hundred switches, twelve commands each, is 4,800 command runs. At roughly two and a half seconds per command per device — connect, authenticate, disable paging, run, read — a serial loop takes about 3.3 hours. Put 50 devices in flight and the wall clock falls to about four minutes. That part is solved: Netmiko, Nornir, Ansible's network_cli connection, or a Go binary with a worker pool will all do it.
Now count what comes back. If a competent engineer needs 20 seconds to read one output, a full sweep is 4,800 × 20 seconds, or roughly 26 hours of reading — and that is before anyone writes down what they found. Run the sweep every morning and you have hired a person to be a slow, inconsistent parser. Fan-out is a lunch break. Fan-in is the project.
One command, several dialects
show version is not one command. It is a family of commands that happen to share a spelling. Parsing by column position breaks the moment a fleet spans several hardware generations and OS trains.
| What varies | Why naive parsing fails |
|---|---|
| Header and field names | Uptime is router uptime on one platform and Kernel uptime on another |
| Column layout | A new interface type adds a column and shifts every field one position right |
| Paging prompts | Interactive --More-- truncates output unless paging is disabled first |
| Error strings | An unsupported command returns different text per platform, which a regex may read as data |
Across a real fleet, one command can carry four or more distinct output schemas, plus per-version drift inside each. The fix is not a better regex. It is template-based parsing — TextFSM, TTP, or the Genie parsers that ship with pyATS — with a template selected by platform and version, and a hard failure when no template matches.
The runbook that survives contact with a fleet
Most failed sweeps are missing one of six things, and all six are cheap.
- Make SSH non-interactive. Key-based auth,
BatchMode=yes, and a pinnedknown_hosts. If a device prompts, the job fails rather than hangs. - Disable paging before anything else. Send
terminal length 0as the first command in every session and verify it took effect. - Bound concurrency per device, not just per job. One session per device, many devices in flight. Oversubscribing a supervisor CPU is how a read-only sweep becomes an outage.
- Use three timeouts, not one: connect, per-command, and whole-job. A per-command timeout short enough to fail fast is what keeps one unreachable switch from stalling the sweep.
- Write raw output before parsing. Object storage, keyed by device, command, and timestamp.
- Treat unparsed output as a failure, not a warning. A silent parse miss is worse than a crash, because it looks like an answer.
Raw text is the system of record
Here is the design decision that determines whether any of this ages well: the raw CLI string is the record, and the parsed table is a view over it. When you discover six weeks from now that your uptime template misread 1 year, 4 weeks as four weeks, a fix should let you retroactively reparse every capture you kept — not just the ones from tomorrow.
If you cannot re-derive last quarter's answers from last quarter's raw output, you do not have observability — you have screenshots.
Parsed data with no raw backing is a one-way door. Keep the text, version the templates, and store the template version alongside each parsed row so you know exactly which rows need reprocessing after a fix.
The queries worth running across a fleet
Fan-out is only useful if it collapses to a small answer. Four queries consistently earn their keep:
- Config drift. Diff
show running-configagainst a golden config per platform family and report only the lines that differ. - Version skew. Group
show versionby software release to find the stragglers before a published CVE does it for you. - Physical layer. Scan
show interfacescounters for non-zero CRC and input errors — surfacing six ports out of 9,600 on a 400-switch fleet is a short list someone will actually chase. - Port capacity. Join
show interfaces statuswith a utilization sample to find access ports pinned above 70% during business hours.
Each of these is a group-by on parsed columns, not a reading assignment. The value was never that you ran 4,800 commands. It is that the result was nine lines long and a human acted on it before lunch.
Where this is heading
Polling show commands over SSH is a snapshot of a system that never stops changing, and the fleet is moving to streaming telemetry over gNMI and NETCONF dial-out for exactly that reason. The useful split is intent, not protocol. If you would page a human about a signal, model it once and stream it. If you would only ever look at it while investigating an incident, leave it as a show command and keep the capture. The show command does not disappear — it becomes the forensics layer, executed with scoped read-only credentials, per-command audit, and raw output retained. Teams that get this boundary right stop running sweeps to find out what is happening and start running them to prove what happened.

