The situation is this - There is one script on the server which make ping to somewhere and I don't know to where. I want to see to which machine is this ping make and why is returning FAILED.
What I make is to turn tcpdump in one terminal and at the same time turning the script which make ping in second terminal but I'm not sure that is capturing the actual ping.
This is the command I use
tcpdump -w - | tee ping.pcap | tcpdump -r -
Is this the right way of doing this or there is other way?
Edit:
The problem is that when I start tcpdump there is a lot of traffic and I can't recognize which one is from this ping...