Hi,

If tpcbench(8) is startet with -r0 it does not print statistics.
But there is still the header line.

  elapsed_ms          bytes         mbps   bwidth 

Make -r0 really quiet and document the feature.

ok?

bluhm

Index: tcpbench.1
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/usr.bin/tcpbench/tcpbench.1,v
retrieving revision 1.24
diff -u -p -r1.24 tcpbench.1
--- tcpbench.1  9 May 2018 11:17:51 -0000       1.24
+++ tcpbench.1  28 Sep 2018 18:12:54 -0000
@@ -114,6 +114,7 @@ In client mode the write buffer size is 
 .Fl B .
 .It Fl r Ar interval
 Specify the statistics interval reporting rate in milliseconds (default: 1000).
+If set to 0, nothing is printed.
 .It Fl S Ar space
 Set the size of the socket buffer used for the test stream.
 On the client this option will resize the send buffer;
Index: tcpbench.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/usr.bin/tcpbench/tcpbench.c,v
retrieving revision 1.57
diff -u -p -r1.57 tcpbench.c
--- tcpbench.c  8 Aug 2018 14:35:38 -0000       1.57
+++ tcpbench.c  28 Sep 2018 18:10:48 -0000
@@ -281,6 +281,9 @@ print_tcp_header(void)
 {
        char **kv;
 
+       if (ptb->rflag == 0)
+               return;
+
        printf("%12s %14s %12s %8s ", "elapsed_ms", "bytes", "mbps",
            "bwidth");
        for (kv = ptb->kvars;  ptb->kvars != NULL && *kv != NULL; kv++) 

Reply via email to