Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I tested on a linux VM in my lab with the command date +"%T.%6N" | nc -u 127.0.0.1 7777

It does not show such a high delta on my VM (Ubuntu 20.04 LTS):

sake@jump:~$ /usr/bin/tshark -c1 -ta -l -n -P -x -i lo -f "udp port 7777"; date +"%T.%6N"
Capturing on 'Loopback: lo'
    1 17:42:13.157521841    127.0.0.1 → 127.0.0.1    UDP 58 59670 → 7777 Len=16

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  00 2c e4 9c 40 00 40 11 58 22 7f 00 00 01 7f 00   .,..@[email protected]"......
0020  00 01 e9 16 1e 61 00 18 fe 2b 31 37 3a 34 32 3a   .....a...+17:42:
0030  31 33 2e 31 35 35 30 38 33 0a                     13.155083.

1 packet captured
17:42:13.219419
sake@jump:~$

Tested with the command date +"%T.%6N" | nc -u 127.0.0.1 7777

17:42:13.155083 (0.000) Date generated it's output 17:42:13.157521 (0.002) Libpcap timestamped the packet 17:42:13.219419 (0.062) Tshark exited

What does your system show with the test above?

I tested on a linux VM in my lab with the command date +"%T.%6N" | nc -u 127.0.0.1 7777

It does not show such a high delta on my VM (Ubuntu 20.04 LTS):

sake@jump:~$ /usr/bin/tshark -c1 -ta -l -n -P -x -i lo -f "udp port 7777"; date +"%T.%6N"
Capturing on 'Loopback: lo'
    1 17:42:13.157521841    127.0.0.1 → 127.0.0.1    UDP 58 59670 → 7777 Len=16

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  00 2c e4 9c 40 00 40 11 58 22 7f 00 00 01 7f 00   .,..@[email protected]"......
0020  00 01 e9 16 1e 61 00 18 fe 2b 31 37 3a 34 32 3a   .....a...+17:42:
0030  31 33 2e 31 35 35 30 38 33 0a                     13.155083.

1 packet captured
17:42:13.219419
sake@jump:~$

Tested with the command The timestamps I see are:

date +"%T.%6N" | nc -u 127.0.0.1 7777

17:42:13.155083 (0.000) Date generated it's output 17:42:13.157521 (0.002) Libpcap timestamped the packet 17:42:13.219419 (0.062) Tshark exited

exited (so printing to STDOUT had definitely finished already)

What does your system show with the test above?