sbm

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

commit 78f8481441825e078b9543dd5327cd515b63f29e
parent 54766cbfb7e6c0a099063710309225de4bc8f503
Author: sin <sin@2f30.org>
Date:   Mon, 22 Feb 2016 14:31:17 +0000

Fix txpps calculation

Diffstat:
Msbm.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sbm.c b/sbm.c @@ -236,7 +236,7 @@ loop(char *ifname, long count, struct timeval *delay) diffrxbits = diffrxbits * 1000 / tv2ms(&diff); difftxbits = difftxbits * 1000 / tv2ms(&diff); diffrxpps = (rxpps - oldrxpps) * 1000 / tv2ms(&diff); - difftxpps = (txpps - txpps) * 1000 / tv2ms(&diff); + difftxpps = (txpps - oldtxpps) * 1000 / tv2ms(&diff); print(ifname, diffrxbits, difftxbits, diffrxpps, difftxpps); oldrxbytes = rxbytes; oldtxbytes = txbytes;