import nuttcp 8.2.2

OK sthen@

Comment:
network performance measurement tool

Description:
nuttcp is a network performance measurement tool intended for use
by network and system managers.  Its most basic usage is to determine
the raw TCP (or UDP) network layer throughput by transferring memory
buffers from a source system across an interconnecting network to
a destination system, either transferring data for a specified time
interval, or alternatively transferring a specified number of bytes.
In addition to reporting the achieved network throughput in Mbps,
nuttcp also provides additional useful information related to the
data transfer such as user, system, and wall-clock time, transmitter
and receiver CPU utilization, and loss percentage (for UDP transfers).
This commit is contained in:
bluhm 2020-05-18 13:38:42 +00:00
parent fc869e1d23
commit ed9d1ac3d5
5 changed files with 87 additions and 0 deletions

View File

@ -0,0 +1,40 @@
# $OpenBSD: Makefile,v 1.1.1.1 2020/05/18 13:38:42 bluhm Exp $
COMMENT = network performance measurement tool
DISTNAME = nuttcp-8.2.2
CATEGORIES = benchmarks
HOMEPAGE = https://www.nuttcp.net/
MAINTAINER = Alexander Bluhm <bluhm@openbsd.org>
# GPLv2
PERMIT_PACKAGE = Yes
WANTLIB = c
MASTER_SITES = https://nuttcp.net/nuttcp/
EXTRACT_SUFX = .tar.bz2
SEPARATE_BUILD = Yes
NO_TEST = Yes
# get rid of 12 MB unneeded crap
post-extract:
rm -rf -- ${WRKDIST}/cygwin/
do-build:
cd ${WRKBUILD} && ${CC} ${CFLAGS} ${WRKSRC}/nuttcp.c -o nuttcp
do-install:
${INSTALL_PROGRAM} ${WRKBUILD}/nuttcp ${PREFIX}/bin/
${INSTALL_MAN} ${WRKDIST}/nuttcp.8 ${PREFIX}/man/man8/
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/nuttcp/
${INSTALL_DATA} ${WRKDIST}/README ${PREFIX}/share/doc/nuttcp/
${INSTALL_DATA} ${WRKDIST}/examples.txt ${PREFIX}/share/doc/nuttcp/
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (nuttcp-8.2.2.tar.bz2) = fq16ieeqoFnSDjQELFihmMKYHK1ylVDROI3fyQNtOYM=
SIZE (nuttcp-8.2.2.tar.bz2) = 13070850

View File

@ -0,0 +1,29 @@
$OpenBSD: patch-nuttcp_c,v 1.1.1.1 2020/05/18 13:38:42 bluhm Exp $
time_t is long long
Index: nuttcp.c
--- nuttcp.c.orig
+++ nuttcp.c
@@ -9693,18 +9693,18 @@ prusage( register struct rusage *r0, register struct r
break;
case 'X':
- sprintf(outp, "%ld", t == 0 ? 0 : (r1->ru_ixrss-r0->ru_ixrss)/t);
+ sprintf(outp, "%lld", t == 0 ? 0 : (r1->ru_ixrss-r0->ru_ixrss)/t);
END(outp);
break;
case 'D':
- sprintf(outp, "%ld", t == 0 ? 0 :
+ sprintf(outp, "%lld", t == 0 ? 0 :
(r1->ru_idrss+r1->ru_isrss-(r0->ru_idrss+r0->ru_isrss))/t);
END(outp);
break;
case 'K':
- sprintf(outp, "%ld", t == 0 ? 0 :
+ sprintf(outp, "%lld", t == 0 ? 0 :
((r1->ru_ixrss+r1->ru_isrss+r1->ru_idrss) -
(r0->ru_ixrss+r0->ru_idrss+r0->ru_isrss))/t);
END(outp);

View File

@ -0,0 +1,10 @@
nuttcp is a network performance measurement tool intended for use
by network and system managers. Its most basic usage is to determine
the raw TCP (or UDP) network layer throughput by transferring memory
buffers from a source system across an interconnecting network to
a destination system, either transferring data for a specified time
interval, or alternatively transferring a specified number of bytes.
In addition to reporting the achieved network throughput in Mbps,
nuttcp also provides additional useful information related to the
data transfer such as user, system, and wall-clock time, transmitter
and receiver CPU utilization, and loss percentage (for UDP transfers).

View File

@ -0,0 +1,6 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2020/05/18 13:38:42 bluhm Exp $
@bin bin/nuttcp
@man man/man8/nuttcp.8
share/doc/nuttcp/
share/doc/nuttcp/README
share/doc/nuttcp/examples.txt