ntop / nDPI

Open Source Deep Packet Inspection Software Toolkit
http://www.ntop.org
GNU Lesser General Public License v3.0
3.84k stars 896 forks source link

Calculate average time to classify packets #136

Closed Diego-IFAL closed 8 years ago

Diego-IFAL commented 8 years ago

Hello, I wonder if it is possible to calculate the average time for sorting the packages, as well as whether it is possible to calculate the average time CPU usage. I need this information for my Master's degree. Thanks.

kYroL01 commented 8 years ago

Hello. Need more info. How can you use nDPI ? What about "sorting the packages" ? I think is possibile to calculate the CPU usage by nDPI to show the avg time it use the CPU, but: 1) We need to understand how to integrate this features 2) We have to do a clean work to avoid useless overhead for the library

lmangani commented 8 years ago

@Diego-IFAL If you want to calculate iterations just fork the ndpireader example and add some timers/counters and their output for your one time usage. I don't think this request should drive any changes to the codebase.

Diego-IFAL commented 8 years ago

Thank you for your attention, I do not plan to be implemented the function to calculate the average time for the classification of packages or to calculate the average time spent CPU usage. I wish someone would help me implement this function in nDPIReader so I can continue my master. I'm not a programmer and I need urgently calculate this information to be able to model the nDPIReader. I believe that my work will be of great value to the growth of nDPI.

kYroL01 commented 8 years ago

@Diego-IFAL I'd like to help you, but I need time and to understand better what you need. Maybe I could try to add this feature in my fork branch before commit into the official nDPI, because I cannot add if this could spread the overhead of the library, ok ? How urgent you need this ? Because you know, we have other many things to do.

Diego-IFAL commented 8 years ago

Hello KyroL01, I talked to Luca Deri and he explained to me that the average time spent in packet processing can be achieved by the "1 / nDPI throughput"; The "nDPI throughput" is already provided on the outcome of nDPIReader. Regarding the use of CPU I can check this in ubuntu processes monitor. Now I need to know if it is possible, in a generic way, calculate the average time of packet capture, I saw that there is a function in nDPIReader that captures the packets to further classify this traffic. Can you help me with this task? The level of urgency is maximum.

Thanks for listening.

kYroL01 commented 8 years ago

@Diego-IFAL I'll see what I can do for help you.

Diego-IFAL commented 8 years ago

@kYroL01 Thank you, that's very important to me. Just to help you understand, I need to divide time use of nDPIReader by modules, for example, the packet capture function has spent "x" time running; the packet classification function spent "x" time running. According to Luca Deri, the average time spent in the packet classification can be obtained by "nDPI throughput" as already told you, then believe (I'm not a programmer) that would be enough to put a timer on the packet capture function ing when reading a file 'pcap' or capture the network card. Once again thank you for your help.

lucaderi commented 8 years ago

Closing this issue as the user contacted me privately