This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Lua script eating memory

0

I have run a Lua script on tshark on many capture files i have, but if i run this files sequentially i see that the number of packets is decreasing means that i am loosing some data. So I had to restart CMD every time to run the Lua script throw tshark. I asking is this from the memory eating effect?? if so is there any garbage collection tool for cleaning the memory ??

asked 10 Jun '13, 12:17

Ashraf's gravatar image

Ashraf
166610
accept rate: 0%


One Answer:

0

I asking is this from the memory eating effect??

hard to tell without information about the nature of your script. Do you generate any data structures yourself?

Anyway: tshark uses the dissecting engine of Wireshark and it will continuously consume RAM as it builds internal state (growing data structures) about conversations and other things needed to do the dissection. However that should not lead to 'missed packets' in your Lua script.

Is it possible to post the script somewhere?

if so is there any garbage collection tool for cleaning the memory ??

Currently there is no 'garbage collection' available in tshark/wireshark. Such a thing would be really interesting for a long term monitoring solution with tshark/wireshark.

Regards
Kurt

answered 11 Jun '13, 03:13

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%

The script is very simple it is a listener just to collect the time stamp and Length of the frame

(11 Jun '13, 03:27) Ashraf

i see that the number of packets is decreasing means that i am loosing some data.

well, then I don't see a correlation between the memory consumption and your observed 'data loss'. Either there is a bug in the wireshark code or your listener contains an error. Can you post the code and possibly a sample capture file?

BTW: How do you recognize the 'data loss'?

(11 Jun '13, 05:46) Kurt Knochner ♦