[ previous ] [ next ] [ threads ]
 
 From:  Chris Buechler <cbuechler at gmail dot com>
 To:  Robert Staph <rstaph at digitalimpreza dot com>
 Cc:  m0n0wall at lists dot m0n0 dot ch
 Subject:  Re: [m0n0wall] Resetting interface counters
 Date:  Mon, 11 Oct 2004 15:48:22 -0400
On Mon, 11 Oct 2004 13:33:24 -0400, Robert Staph
<rstaph at digitalimpreza dot com> wrote:
> Whats an easy way to reset the interface counters (packets, col, bytes,
> errors, etc)?
> 

m0n0wall pulls those stats from netstat, but I can't seem to find a
flag to netstat that will clear them.  ('man netstat' talks about a
'-z' flag, but it doesn't seem to do what I anticipated it would)

From 'man netstat':
     netstat -s [-s] [-z] [-f protocol_family | -p protocol] [-M core]
             [-N system]
             Display system-wide statistics for each network protocol, for a
             particular protocol_family, or for a single protocol.  If -s is
             repeated, counters with a value of zero are suppressed.  If -z is
             also present, reset statistic counters after displaying them.


Maybe that will at least lead you in the right direction.  You can
execute netstat from /exec.php

-Chris