I want to measure the duration of a TCP/UDP packet from network to process.

Let's say that I develop a Linux process, which provides a kind of web service. My process is listening on the port 8999 and expecting some HTTP request. If I'm right, a HTTP request will first enter into the network of my machine and then will be moved from the network to my process by the Kernel. What I need is to measure this duration.

Is there some common method or tool to do so?

  • The netfilter project includes a library named libnetfilter_log, which provides access to the kernel's packet log. It includes a function nflog_get_timestamp (see netfilter.org/projects/libnetfilter_log/doxygen/html/…), which retrieves the reception timestamp, if I understand it right. DISCLAIMER: I have never used libnetfilter_log. – berndbausch Jan 18 at 4:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.