title: Monitor network usage of a process
body: <p>This question might sound fairly repetitive, but there are subtle details which make it a bit different. </p>
  
  <p>I am looking for a simple tool (for Ubunut/Linux) to monitor network usage such that it gives the min, max, average, and time-plot of network usage by 1) a single process; and, 2) the system; only during the time when the process was running. The major requirement is that I am not looking for a GUI (or terminal GUI like top) based tool but I want this monitoring information to be pushed to a file so that I can perform some post-processing over that.</p>
  
  <p>I come across the following link which lists various options: <a href="http://www.binarytides.com/linux-commands-monitor-network/" rel="nofollow">http://www.binarytides.com/linux-commands-monitor-network/</a>. However, most tools are GUI based and ones which are not do not provide above information.</p>
  
  <p>Any help would be much appreciated.</p>