--- projects/libstatgrab/examples/network_traffic.c 2003/05/11 17:05:24 1.1 +++ projects/libstatgrab/examples/network_traffic.c 2003/11/07 18:43:56 1.4 @@ -1,7 +1,7 @@ /* * i-scream central monitoring system - * http://www.i-scream.org.uk - * Copyright (C) 2000-2002 i-scream + * http://www.i-scream.org + * Copyright (C) 2000-2003 i-scream * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -51,7 +51,7 @@ int main(int argc, char **argv){ int num_network_stats; /* Parse command line options */ - while ((c = getopt(argc, argv, "d:bkm")) != EOF){ + while ((c = getopt(argc, argv, "d:bkm")) != -1){ switch (c){ case 'd': delay = atoi(optarg); @@ -103,7 +103,7 @@ int main(int argc, char **argv){ printf("\033[%d;2H%-25s : %5lld", line_number++, "Network Interface Tx", (network_stats->tx / 1024)); break; case 'm': - printf("\033[%d;2H%-25s : %5.2f m", line_number++, "Network Interface Tx", network_stats->rx / (1024.00*1024.00)); + printf("\033[%d;2H%-25s : %5.2f m", line_number++, "Network Interface Rx", network_stats->rx / (1024.00*1024.00)); printf("\033[%d;2H%-25s : %5.2f m", line_number++, "Network Interface Tx", network_stats->tx / (1024.00*1024.00)); } printf("\033[%d;2H%-25s : %ld ", line_number++, "Network Interface systime", (long) network_stats->systime);