From 8345c9ca76f80cbb4a1b27c57fdc7dfdb07ca167 Mon Sep 17 00:00:00 2001 From: "Carlos R. Mafra" Date: Sun, 11 Jan 2015 21:31:40 +0000 Subject: [PATCH] wmnet: increase polling delay to 0.1 sec and maxrate to 120kb --- wmnet/wmnet.c | 4 ++-- wmnet/wmnet.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wmnet/wmnet.c b/wmnet/wmnet.c index 79cc9e7..9873663 100644 --- a/wmnet/wmnet.c +++ b/wmnet/wmnet.c @@ -295,7 +295,7 @@ void setup_wmnet(int argc, char **argv) { " -n, --normalstate start up in normal, shaped state\n" " -t, --txcolor=COLOR color for tx\n" " -r, --rxcolor=COLOR color for rx\n" - " -x, --maxrate=BYTES max transfer rate for graph scale (default 6000)\n" + " -x, --maxrate=BYTES max transfer rate for graph scale (default 120000)\n" " -p, --promisc=DEVICE put DEVICE into promiscuous mode to apply\n" " accounting rules to all network packets\n" " -u, --unpromisc=DEVICE turn off promiscuous mode on DEVICE\n" @@ -303,7 +303,7 @@ void setup_wmnet(int argc, char **argv) { " -l, --logscale use a logarithmic scale (great for ethernet\n" " connections with -x 10000000)\n" " -d DELAY delay time for polling statistics\n" - " in microseconds (default 25000)\n" + " in microseconds (default 100000)\n" "\n"); printf("Compiled in drivers: [%s]\n\n", available_drivers()); printf("Report bugs to joff@iastate.edu\n"); diff --git a/wmnet/wmnet.h b/wmnet/wmnet.h index 32280eb..97a4b48 100644 --- a/wmnet/wmnet.h +++ b/wmnet/wmnet.h @@ -78,7 +78,7 @@ struct timeval timenow, timelast; unsigned long long int totalbytes_in, totalbytes_out, lastbytes_in, lastbytes_out; unsigned long long int totalpackets_in, totalpackets_out, lastpackets_in, lastpackets_out; unsigned int diffbytes_in, diffbytes_out; -unsigned int delayTime = 25000, displayDelay = 55000, maxRate = 6000; +unsigned int delayTime = 100000, displayDelay = 55000, maxRate = 120000; unsigned int out_rule = 2, in_rule = 1, graphbox_height = 44; /* number of rule in /proc/net/ip_acct to use */ char *in_rule_string = NULL, *out_rule_string = NULL, *device=NULL; Bool current_tx = False, current_rx = False, rx, tx, logscale = False;