From 79c3a398f469d146fb0eedbae6b08cb6a237bb65 Mon Sep 17 00:00:00 2001 From: "Sergey A. Osokin" Date: Wed, 23 Jun 2004 12:01:33 +0000 Subject: Make small improvement: print packets per second in topmode. Original patch from: Gleb Smirnoff Fixed patch from, approved by: Dmitry Morozovsky (maintainer) --- net-mgmt/ehnt/files/patch-ehnt__display.c | 39 +++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) (limited to 'net-mgmt/ehnt/files/patch-ehnt__display.c') diff --git a/net-mgmt/ehnt/files/patch-ehnt__display.c b/net-mgmt/ehnt/files/patch-ehnt__display.c index a88d33586331..a0af8adcd2d3 100644 --- a/net-mgmt/ehnt/files/patch-ehnt__display.c +++ b/net-mgmt/ehnt/files/patch-ehnt__display.c @@ -2,8 +2,43 @@ $FreeBSD$ --- ehnt_display.c.orig Thu Oct 4 22:18:29 2001 -+++ ehnt_display.c Thu May 20 16:06:07 2004 -@@ -246,7 +246,7 @@ ++++ ehnt_display.c Wed Jun 23 14:35:08 2004 +@@ -110,7 +110,9 @@ + ShowReportTimeHeader(stats); + + if ( ! report_inout ) { +- printf (" Total %10.0fkbits/s\n",stats->InBoundTotal*8/((interval)*1024)); ++ printf (" Total %10.0fkbits/s, %10.0fkpps\n", ++ stats->InBoundTotal*8/((interval)*1024), ++ stats->InBoundTotalPkts/((interval)*1024)); + if ( e_cfg->topmode != ETM_PROTO ) { + printf ("Rank|-------------Source----------------| |---------------Dest----------------|\n"); + } +@@ -151,8 +153,9 @@ + printf ("Rank|-------------Source----------------| |---------------Dest----------------|\n"); + } + printf("%s",header); +- printf (" O U T B O U N D (total %.0fkbits/s)\n", +- stats->OutBoundTotal*8/((interval)*1024)); ++ printf (" O U T B O U N D (total %.0fkbits/s, %.0fkpps)\n", ++ stats->OutBoundTotal*8/((interval)*1024), ++ stats->OutBoundTotalPkts/((interval)*1024)); + + for (i=1; i<= (int)(e_cfg->screenlength - headersize)/2 + 1; i++) { + printf("%2d:",i); +@@ -183,8 +186,9 @@ + } + printf("\n"); + } +- printf (" I N B O U N D (total %.0fkbits/s)\n", +- stats->InBoundTotal*8/((interval)*1000)); ++ printf (" I N B O U N D (total %.0fkbits/s, %.0fkpps)\n", ++ stats->InBoundTotal*8/((interval)*1024), ++ stats->InBoundTotalPkts/((interval)*1024)); + for (i=1; i<= (int)(e_cfg->screenlength - headersize)/2; i++) { + printf("%2d:",i); + switch (e_cfg->topmode) { +@@ -246,7 +250,7 @@ static char str[100]; -- cgit v1.2.3