I capture data with tshark and save certain data from the packet header to process them in order to detect some incedants in the network. I saved the data in a table in my lua program (which is running in the cmd with tshark using the command (-Xlua_script:))
and now i want to process the data of each minute alone while capturing is running. It’s an online processing. Firstly:Any body knows if this could be implemented?Secondly I need a timer, I don’t know how to do this, and i want a way that i can take the data in the tables to process them, reset the tables to get the new data of the next minute without losing any data.
Any suggestions or ideas??
I capture data with tshark and save certain data from the packet header to
Share
there isn’t the concept of a ‘timer’ in lua like some other languages, where you can create one and set up an event handler and have your main program notified when the timer goes off… however you can periodically check os.clock() to determine how long its been since you’ve done some processing and if a minute has elapsed, go ahead and process the data.
something like this might be what you need: