sbm

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

commit c1a0c5055310876235e7de09a120cf21db105001
parent 720ecec4e098282ea0dce51683b152fda2306462
Author: sin <sin@2f30.org>
Date:   Fri, 19 Feb 2016 11:21:37 +0000

Move sleep to top so first reading is sensible

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

diff --git a/sbm.c b/sbm.c @@ -184,6 +184,7 @@ loop(char *ifname) sample(ifname, &oldrxbytes, &oldtxbytes, &oldrxpps, &oldtxpps); for (;;) { + sleep(1); sample(ifname, &rxbytes, &txbytes, &rxpps, &txpps); print(ifname, (rxbytes - oldrxbytes) * 8, @@ -194,7 +195,6 @@ loop(char *ifname) oldtxbytes = txbytes; oldrxpps = rxpps; oldtxpps = txpps; - sleep(1); } }