Getting a quick histogram on the per physical capture ports can be quite helpful when configuring and patching a system
Step 1) Locate the capture file
Using the command
fmadiocli "show capture list"
The system will output a list of captures. example shown below
fmadio@fmadio200v4-636:$ fmadiocli "show capture list"
fmad fmadlua Mar 19 2025 (/opt/fmadio/bin/fmadiolua --nocal /opt/fmadio/bin/fmadiocli show capture list )
Disable cycle calibration
[Wed Mar 26 12:13:03 2025] CmdLine [show capture list]
[Wed Mar 26 12:13:03 2025] Cmd [show capture list ]
[Wed Mar 26 12:13:03 2025] Showing captures
[Wed Mar 26 12:13:03 2025] [wan0_20250325_0000 ] 148,361,445,376 B (Tue . 23:29:07 . 25-03-2025)
[Wed Mar 26 12:13:03 2025] [wan0_20250324_0000 ] 176,206,381,056 B (Mon . 23:59:58 . 24-03-2025)
[Wed Mar 26 12:13:03 2025] [wan0_20250323_0000 ] 124,999,958,528 B (Sun . 23:59:58 . 23-03-2025)
[Wed Mar 26 12:13:03 2025] [wan0_20250322_0000 ] 126,681,088,000 B (Sat . 23:59:59 . 22-03-2025)
[Wed Mar 26 12:13:03 2025] [wan0_20250321_0000 ] 698,711,015,424 B (Fri . 23:59:59 . 21-03-2025)
[Wed Mar 26 12:13:03 2025] [wan0_20250320_0000 ] 253,637,951,488 B (Fri . 00:00:00 . 21-03-2025)
.
.
[Wed Mar 26 12:13:03 2025] [ny2_election_10AM_20250205_1619 ] 5,218,116,829,184 B (Thu . 00:00:01 . 07-11-2024)
[Wed Mar 26 12:13:03 2025] [opra_election_20250125_2231 ] 3,273,740,517,376 B (Wed . 23:00:01 . 06-11-2024)
done 0.084506Sec 0.001408Min
fmadio@fmadio200v4-636:$
Locate the capture to be analyized. In this example we have selected the capture named
wan0_20250320_0000
Step 2) Run the processing
Using the above capture name run the command
sudo stream_cat -v --chunked <capture name> | capinfos2 --histo-port
This sequence will process the data at roughly 20Gbps sustained, example output is shown below
fmadio@fmadio200v4-636:~$ sudo stream_cat -v --chunked wan0_20250320_0000 | capinfos2 --histo-port
Enable Port Histogram
Chunked Packet output
stream_cat ioqueue: 4
TimeStamp[0] --pcap
TimeStamp[1] --pcap
TimeStamp[2] --pcap
TimeStamp[3] --pcap
TimeStamp[4] --pcap
TimeStamp[5] --pcap
TimeStamp[6] --pcap
TimeStamp[7] --pcap
FMAD Format Chunked
[20250326_121833] 0M Offset: 0GB ChunkID:21662485 TS:16:00:00.563.411.315 | Pending 241888 MB 4.459Gbps 0.870Mpps CPUIdle:0.000 CPUFetch:0.198 CPUSend:0.586
[20250326_121834] 3M Offset: 2GB ChunkID:21671120 TS:16:30:01.875.979.087 | Pending 239729 MB 17.666Gbps 3.445Mpps CPUIdle:0.000 CPUFetch:0.198 CPUSend:0.720
[20250326_121835] 6M Offset: 4GB ChunkID:21679726 TS:16:59:24.888.737.559 | Pending 237578 MB 17.607Gbps 3.433Mpps CPUIdle:0.000 CPUFetch:0.197 CPUSend:0.721
[20250326_121836] 10M Offset: 6GB ChunkID:21688300 TS:17:27:31.139.125.623 | Pending 235434 MB 17.541Gbps 3.421Mpps CPUIdle:0.000 CPUFetch:0.197 CPUSend:0.722
.
.
In the above we see there is 241GB “Pending” as the capture size is about 250GB and its processing at 17Gbps.
Step 3) Results
Once the process has completed (or partial process with Ctrl-C) the Histogram data is shown below
Total Packets: 44532390
TotalBytes : 28500729600
TotalPackets : 44532390
PayloadCRC : 524b6a016f940129
ErrorSeq : 0
ErrorPktSize : 0
LastByte : 0x00000000
SeqStart : 0x00000000 0x00000000 0x00000000 0x00000000 : 0x00000000
SeqEnd : 0x00000000 0x00000000 0x00000000 0x00000000 : 0x00000000
PacketCnt : 0 0 0 0
TimeOrder : 0
CRCFail : 0
CRCFailFNIC : 0
Time First : 20250319_235959 15:59:59.803.989.459 (1742399999.803989459)
Time Last : 20250320_062310 22:23:10.047.420.435 (1742422990.047420435)
TotalPCAPTime : 22990243430976 ns (383.171min)
Bandwidth : 0.010 Gbps
Packet Rate : 0.002 Mpps
Port Histogram:
Port:0 Pkt: 0 Byte: 0
Port:1 Pkt: 44532390 Byte: 28500729600
Port:2 Pkt: 0 Byte: 0
Port:3 Pkt: 0 Byte: 0
Port:4 Pkt: 0 Byte: 0
Port:5 Pkt: 0 Byte: 0
Port:6 Pkt: 0 Byte: 0
Port:7 Pkt: 0 Byte: 0
In the above case, we see all of the packets are on physical capture port 1.