[Console]::OutputEncoding = [Text.Encoding]::UTF8 $cap = "$env:TEMP\opencode\sym_close.pcap" $ts = "C:\Program Files\Wireshark\tshark.exe" Write-Host "=== DMX stream (1092) per-10s buckets ===" $dmx = @(& $ts -r $cap -Y "udp.length==1092" -T fields -e frame.time_relative 2>$null) Write-Host ("total: " + $dmx.Count) if ($dmx.Count -gt 0) { $buckets = @{} foreach ($t in $dmx) { $b = [int]([double]$t / 10); if ($buckets.ContainsKey($b)) { $buckets[$b]++ } else { $buckets[$b] = 1 } } foreach ($k in ($buckets.Keys | Sort-Object)) { Write-Host (" t={0,4}-{1,-4}s : {2}" -f ($k*10), ($k*10+10), $buckets[$k]) } Write-Host (" last DMX t=" + $dmx[$dmx.Count-1]) } Write-Host "=== last 25 frames overall ===" & $ts -r $cap -T fields -e frame.time_relative -e ip.src -e ip.dst -e udp.length 2>$null | Select-Object -Last 25 Write-Host "=== any AECH/AERE (560) ===" & $ts -r $cap -Y "udp.length==560" -T fields -e frame.time_relative -e ip.src 2>$null