I am debugging a problem where two servers get stuck in a loop when communicates with each other. After a server restart the problem will start at some point, it can be in an hour
or in a day. I want to tcpdump the traffic when the problem starts so I can find out what
makes it happen.

My plan is to restart the servers then let tcpdump capture the traffic and then analyze the
result. However I would like tcpdump to stop after a few thousand packets captured to
avoid having to monitor it, since I don't know when the traffic will start.