sbm

simple bandwidth monitor
git clone git://git.2f30.org/sbm.git
Log | Files | Refs | LICENSE

commit d861a9cfef7ca732d6cc47fc79635508715f7bbb
parent bd6082d68e1faa6bd6009a29befd84a3053a5b21
Author: sin <sin@2f30.org>
Date:   Sat Feb 13 10:37:54 +0000

Reset counters in case the interface is not up

Diffstat:
sbm.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/sbm.c b/sbm.c @@ -75,6 +75,7 @@ sample(char *ifname, unsigned long long *rxbytes, unsigned long long *txbytes, struct if_msghdr *ifm; struct sockaddr_dl *sdl = NULL; + *rxbytes = *txbytes = *rxpps = *txpps = 0; mib[0] = CTL_NET; mib[1] = PF_ROUTE; mib[2] = 0;