Menu

trafd - huge cpu usage

Chris K2
2005-10-12
2013-01-10
  • Chris K2

    Chris K2 - 2005-10-12

    Hi

    I've got a question - why trafd is using so much cpu?? I've got over 8 mbits on the router and after 5 minutes (interval between trafstat) trafd can increase up to 40% of usage.

     
    • Stas Degteff

      Stas Degteff - 2005-10-14

      1. You don't specify a version of trafd.
      2. You don't specify your CPU.
      Without this information i can't make detailed reply.

      Trafd uses bpf (bpfilter) pseudo-device based in core. Trafd self works in user-level. To retireve information collected in bpf, trafd switches between core and user levels. To store information into disk file trafd starts a child process.
      These actions is require big processor time on slow processors.
      If you uses old version of trafd, please install latest version (this version is named 'kazarov').
      To decrease cpu usage try save information each 10 minutes instead 5 minutes if this is possible.

       
    • Chris K2

      Chris K2 - 2005-10-18

      System FreeBSD 5.4, procesor Intel Pentium 4 3.0 GHz, NIC - two Intel Express 10/100

      trafd v4.0-snapshot-01.10.2002 - tcp/udp data traffic collector daemon (BPFT project)

      Ok. Now I understand why it is so much cpu usage.

      Saving iformation with longer interval even worse the case :(
      I use trafd for ip statistics (mrtg for curves) and trafic login, and it will be shade if I have to start my script work once again for anoter sniffer.

       

Log in to post a comment.