One of my servers has a semi-predictable network input spike at 6:45 every day. It comes as early as 6:30 and as late as 6:50, but always lasts for less than 1 minute.
I'm trying to figure out how to capture all data about it and prevent it. I'm using AWS EC2 hosting, which allows me to use alarm triggers. Regardless of them, I figure I can just capture network usage every minute between 6 and 7 o'clock.
How can I automate it? I've read on this and other forums about ntop, and iftop, but I need it to run in batch modes. I'm guessing the best model is to collect statistics for 60 seconds, then print the results into a file, and start collecting statistics again. Or would it be better to continuously collect for 60 mintues?