TCP stream health
tcp_healthAnalyze per-stream TCP health from a capture: handshake, retransmissions by loss location, reordering, zero windows, resets, and MTU or PMTUD black-hole problems, with duplicate mirrored packets removed.
Instructions
Health of every TCP stream, with copies of the same packet (mirror, SPAN,
several interfaces) removed first, so they are not counted as retransmissions the
way tshark's own analysis counts them. Per stream: the handshake (SYN retries,
SYN to SYN-ACK and SYN-ACK to ACK times as seen from the capture point, MSS,
window scale, SACK); per direction the data segments and retransmissions split by
where the loss happened (lost_before_capture: a gap later filled by a
retransmission; retransmitted_after_capture: the capture saw the original;
missed_by_capture: acknowledged by the receiver but absent from the file, so
not network loss), reordering, duplicate ACKs, zero windows, keep-alives;
resets with likely_from endpoint or middlebox, judged by the reset's TTL and
source MAC against that side's other packets, and the idle time before it; ICMP
fragmentation-needed / packet-too-big about the stream (a mirrored copy of an ICMP
error counts once, summary.icmp_copies_dropped); and MTU problems against
mtu (an MSS too large for the path, DF packets above it, full-size segments
retransmitted and never acknowledged while small ones pass: a PMTUD black hole).
issues says it in plain words; streams with issues come first. stream is
tshark's tcp.stream index; filter is a display filter ANDed with tcp.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "tcp_health"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Same forms as start | |
| mtu | No | Path MTU in bytes for the MTU checks | |
| path | Yes | Capture file (absolute, in an allowed dir) or open_capture handle | |
| limit | No | Most rows per page | |
| start | No | ISO 8601, epoch s, +Ns from start, -Ns from end | |
| filter | No | Extra display filter, ANDed | |
| offset | No | Rows to skip (next_offset) | |
| output | No | summary: all but rows, plus 3 rows (<8 KB) | rows |
| redact | No | Replace subscriber identifiers in this result with tokens; ids+ips hides every IP too | off |
| stream | No | tcp.stream index of one connection | |
| columns | No | Row keys to keep (frame keys stay) | |
| max_output_kb | No | Lower output cap, KB |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| error | No | ||
| offset | No | ||
| window | No | ||
| dropped | No | ||
| streams | No | rows with keys: stream, client, server, first, last, duration_s, packets, copies_dropped, handshake, client_to_server, server_to_client, resets, icmp, df_above_mtu, df_above_mtu_acknowledged, loss, issues | |
| summary | No | ||
| has_more | No | ||
| path_mtu | No | ||
| returned | No | ||
| next_offset | No | ||
| total_found | No | ||
| total_matched | No | ||
| display_filter | No | ||
| packets_matched | No | ||
| packets_scanned | No | ||
| total_is_lower_bound | No |