From af9eb88e3ac74bf266adfb698fdbcad260122f4a Mon Sep 17 00:00:00 2001 From: Jon Schipp Date: Tue, 1 Oct 2013 11:42:53 -0700 Subject: ifpps: add option that omits CSV header Adds option -o|--omit-header which does not print the CSV header e.g. when the user does not need it. Signed-off-by: Jon Schipp Signed-off-by: Daniel Borkmann --- ifpps.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/ifpps.c b/ifpps.c index 0c24e7b..6e29ec5 100644 --- a/ifpps.c +++ b/ifpps.c @@ -75,12 +75,13 @@ static int show_median = 0, show_percentage = 0; static WINDOW *stats_screen = NULL; static struct utsname uts; -static const char *short_options = "d:n:t:clmpPWvh"; +static const char *short_options = "d:n:t:colmpPWvh"; static const struct option long_options[] = { {"dev", required_argument, NULL, 'd'}, {"num-cpus", required_argument, NULL, 'n'}, {"interval", required_argument, NULL, 't'}, {"csv", no_argument, NULL, 'c'}, + {"omit-header", no_argument, NULL, 'o'}, {"loop", no_argument, NULL, 'l'}, {"median", no_argument, NULL, 'm'}, {"promisc", no_argument, NULL, 'p'}, @@ -119,6 +120,7 @@ static void __noreturn help(void) " -n|--num-cpus Number of top hitter CPUs in ncurses mode (def: 5)\n" " -t|--interval