Disable Monitoring the ICM Protocol

  • harley


    Is there a way to disable which protocols bandwidthd records or graphs?

    I want to hide or disable ICMP.


  • Alestan

    Short answer:  Yes

    Long answer:  Yes, but how depends a bit on your configuration.  If you have bandwidthd generating the graphs itself, you will need to edit the source code.  In bandwidthd.c there is a function called Credit, near the end of it (inside a switch block) is 'case 1:'.  That block is where it tabulates ICMP data, removing the following line ('            Stats->icmp += size;') and recompiling should be sufficient.  (It would still show ICMP data in the legend, but every graph would show 0 icmp traffic sent.  (You should be able to edit the image file used as the legend to remove it if you desire.) 

    If you are using postgresql to store the data and then generating the graphs from that, the easier change that doesn't require recompiling bandwidthd is to edit the php code that generates the graphs.  Find the sql query that pulls the information and simply make it omit the ICMP column. 

    Catch is both of these methods will leave ICMP as part of the total traffic sent, it simply won't be in its own column.  To remove it completely, you would need to change the case statement in bandwidthd.c from '            Stats->icmp += size;' to '            Stats->total -= size;'.  For the php version, simply have it calculate its own total from the other columns.