I have a capture file with Modbus/RTU traffic. I'm using user DLT to set it as mbrtu protocol. The file contains about 450000 packets. I would like to apply this filter in wireshark
but it tooks about 15 minutes to perform filtering. In tshark using following command, it tooks just 7 seconds with the same result.
When i split input file using I'm using Wireshark 2.2.5 on Linux. I have Intel [email protected] and 8GB of RAM. Wireshark takes just 300 MB of RAM and utilizes one core at 100%. Am I doing something wrong? Is there some way to speed up the wireshark gui? asked 23 Mar '17, 13:21 j123b567 edited 23 Mar '17, 13:26 |
2 Answers:
Without having done any investigation note that your tshark command line is just read filtering and then writing to the output whereas Wireshark is filtering and displaying. Not sure if that accounts for all the difference though, you would need to profile the runs to see what's going on. answered 24 Mar '17, 02:46 grahamb ♦ showing 5 of 6 show 1 more comments |
Hi, I think the problem is with the code in packet-mbtcp.c function dissect_modbus_response() on the second pass when it tries to find the corresponding request it goes through all packets from the end. The code should be changed to separate conversation and per packet data and store the per packet data only on the first pass for retrieval on the second pass. answered 04 Apr '17, 04:13 Anders ♦ This sounds good. I just don't understand, why tshark works, because it should also perform two-pass dissection. (I have used parameter (04 Apr '17, 04:26) j123b567 Although possibly not related to the issue, Modbus TCP allows multiple requests to be "in flight" so it's not guaranteed that the response will be in the next "message". (04 Apr '17, 07:37) grahamb ♦ If you can please test or deskcheck https://code.wireshark.org/review/#/c/20927/1 (05 Apr '17, 04:33) Anders ♦ |
Loading and displaying the file without filter tooks 0.7 seconds. Loading the file in Wireshark with read filter tooks 7 seconds (same as tshark), but filter can't be undone - I must reload the file with different filter. I will try the same on Windows machine. I don't have time to profile the Wireshark now, but will try it in the future.
Same on windows, linux wireshark (qt5) and linux wireshark-gtk. Maybe, there are some GUI updates during display filtering that drastically decrease performance.
After filtering, there is about 132 incorrect packets in ~450k captured. Ok, I can open bug report for this. Until then, here is the file to play with https://jaybee.cz/files/rs485.pcap.gz
To what protocol should the DLT be connected?
@Anders mbrtu