netperf: Remove from tree.

Not actively used and there is a recipe available.
This commit is contained in:
Augustin Cavalier
2017-04-25 10:55:29 -04:00
parent 61c3b8c1e7
commit 5495e4f674
29 changed files with 0 additions and 26650 deletions
-1
View File
@@ -38,7 +38,6 @@ SubInclude HAIKU_TOP src tests kits net icmp ;
SubInclude HAIKU_TOP src tests kits net ipv6 ;
HaikuSubInclude libnetapi ;
SubInclude HAIKU_TOP src tests kits net multicast ;
SubInclude HAIKU_TOP src tests kits net netperf ;
SubInclude HAIKU_TOP src tests kits net posixnet ;
SubInclude HAIKU_TOP src tests kits net service ;
SubInclude HAIKU_TOP src tests kits net sock ;
-215
View File
@@ -1,215 +0,0 @@
This file is here for people to list their contributions to the
netperf benchmark. When you enhance or fix something, put your name
and a description of the what/where/whey/why/how here. If you like,
feel free to include an email address.
I would like to apologize in advance to anyone I've forgotten to
include.
Rick Jones <[email protected]>
Responsible for initial packaging and release of netperf and
"editorial" continuity for subsequent releases.
Karen Choy
Code to allow netserver to run as a standalone daemon.
Dave Shield <[email protected]>
Wrote the first revision of the netperf and netserver manpages.
Sarr Blumson <[email protected]>
Fixes for AIX 3.1 and 3.2. Also fixes for Solaris 2.1 without
realizing it ;-)
Jeff Smits <[email protected]>
Fixes for TCP_RR and UDP_RR on sytems with an htonl that is not a no-op.
Warren Burnett <somewhere in Kansas>
Example code for DLPI tests.
Several Folks
Code to tell SunOS 4 to *not* restart system calls on receipt of a
signal.
Fore Systems Inc.
Manpages for the FORE API and question answering
David Channin
Access to systems running the Fore ATM API
Jonathan Stone <[email protected]>
Include file fixes for Ultrix
Bruce Barnett <[email protected]>
Bunches of warnings fixes and lint picks for Solaris 2.3
Herman Dierks et al <[email protected]>
Code to calculate confidence intervals for tests
Hal Murray <[email protected]>
Helpful suggestions for the scripts to make them more compatible with
the netperf database (http://www.cup.hp.com/netperf/NetperfPage.html).
His prompting finally got me off my whatever to put the confidence
interval stuff from the guys at IBM into netperf
Peter Skopp [email protected]
Fixes to make netperf more secure.
Tom Wilson <[email protected]>
A fix to send_udp_rr to correct bogus throughput values.
Thorsten Lockert <[email protected]>
A bunch of clean-up for the *BSD OSes
Serge Pachkovsky <[email protected]>
Code for low-priority soaker process for AIX and SGI
The fine folks at Adaptec
The initial port of netperf (1.9PL4) to Windows NT 3.51.
Robin Callender <[email protected]>
The PPC binaries for the 1.9PL4 port of netperf to NT and for assorted
code clean-ups and help with CPU utilization measurements.
"Todd J. Derr" <[email protected]>
For offering to take-on support of the Fore ATM API files with 2.1 and
for his help in making the tar files and such more user-friendly
Michael Shuldman <[email protected]>
Improvements to the makefile and additional checks for OpenBSD
Kris Corwin
discovery of a debug statement outside of if (debug) that may have
been the cause of all the nasty connection refused errors in random
UDP_RR tests...
Charles Harris
Initial prototype of the TCP_SENDFILE test support
Philip Pishioneri of Cornel
Conversion of the netperf.ps manul to PDF format.
The Hewlett-Packard OpenVMS folks
Assistance with the port to OpenVMS
Munechika SUMIKAWA @ KAME Project / FreeBSD.org
IPv6 fixes
Jan Iven of CERN
initial mods for sendfile() under Linux
Fabrice Bacchella
for pointing-out that Solaris 9 has a copy of Linux sendfile()
Andrew Gallatin
for assistance with the FreeBSD sysctl() stuff, and later making it
calibration-free
fixes to configure to recognize Solaris 11
Mark Cooper
pointing-out the need for -lresolv when compiling -DDO_DNS on RedHat
7.1
Carl Mascott
finding some cut-and-paste erors in create_data_socket error logging
Fabrice Bacchella
Fixes for -DHISTOGRAM and -DUNIX on Mac OS X, updates to usage strings
Spencer Frink
Fixes and Cleanup for WIN32. Many over many years.
Nicholas Thomas
Fixes for DLPI on SVR4 Streams under Linux
Dave Craig
Fixes for getaddrinfo error returns
David Mosberger of HP
Workaround for the Linux getsockopt() bug that returns more than that
for which one asked.
Stephen Burger of HP
Code to implement the netserver CPU binding.
Vladislav "Vlad" Yasevich of HP
Initial SCTP tests. Enhancements to the configure.ac sources to show
the way to make many of the LIBS="foo" before ./configure unnecessary.
Padmanabhan "Paddu" S N of HP
Patches for /proc/stat CPU util and recv_tcp_rr.
Cary Coutant and other hp-mac-users of HP
Access to Mac OS X systems for porting netperf 2.4.0
Chris Bertin of HP
Access to AIX for initial porting of netperf 2.4.0
James Carlson
Assistance finding the right magic to compile SCTP on Solaris 10.
Gavin
Pointers on Solaris 10 Microstate accounting.
Brent Draney
Getting netcpu_perfstat.c in running order on AIX and other misc
fixups in places such as BSD.
Samuel Ying
Change struct sockaddr to struct sockaddr storage in netserver.c
Rodolpho Boer
Fix for default message size in UDP_STREAM when defualt SO_SNDBUF size
is > max UDP datagram size.
Michael Dorff
Getting netperf/netserver to compile under Windows with MS Visual
Studio 2003
George Davis
Changes to deal with different floating-point formats.
Anonymous
Changes to retrieve CPU util on MacOS X.
Dickon Reed
Patches to attend to some windows in TCP_CRR and TCP_CC under Windows
Bret McKee <[email protected]>
Fixes to get netcpu_looper compiling and working after the "netcpu"
split
Hans Blom
Improvements to closing/redirecting stdin/stdout/stderr in netserver
Martin Brown
RPM support in the form of netperf.spec.in and related configure.ac
etc changes
Shilpi Agarwal
Changes to allow UDP_STREAM to use connected sockets on both sides.
Steve Reinhardt <[email protected]>
Fixes for buffer filling.
Gisle Vanem
Fixes for Windows compilation under MingW/gcc.
Scott Weitzenkamp
Patches to enable demo mode in the UDP_STREAM test
Emir Halepovic
Feedback on the manual
Kouhei Sutou
Generate netperf_version.h and netperf.spec via configure rather than
makefile, include limits to get PathMAX on FreeBSD.
Dan Yost
Fix to fflush() each interim result in demo mode to make things
happier for folks redirecting same to a file.
Alexander Duyck
Fixes to replace struct sockaddr_in with struct sockaddr_storage
Anonymous
Support for sendfile() on OSX
-43
View File
@@ -1,43 +0,0 @@
Copyright (C) 1993 Hewlett-Packard Company
ALL RIGHTS RESERVED.
The enclosed software and documentation includes copyrighted works
of Hewlett-Packard Co. For as long as you comply with the following
limitations, you are hereby authorized to (i) use, reproduce, and
modify the software and documentation, and to (ii) distribute the
software and documentation, including modifications, for
non-commercial purposes only.
1. The enclosed software and documentation is made available at no
charge in order to advance the general development of
high-performance networking products.
2. You may not delete any copyright notices contained in the
software or documentation. All hard copies, and copies in
source code or object code form, of the software or
documentation (including modifications) must contain at least
one of the copyright notices.
3. The enclosed software and documentation has not been subjected
to testing and quality control and is not a Hewlett-Packard Co.
product. At a future time, Hewlett-Packard Co. may or may not
offer a version of the software and documentation as a product.
4. THE SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS".
HEWLETT-PACKARD COMPANY DOES NOT WARRANT THAT THE USE,
REPRODUCTION, MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR
DOCUMENTATION WILL NOT INFRINGE A THIRD PARTY'S INTELLECTUAL
PROPERTY RIGHTS. HP DOES NOT WARRANT THAT THE SOFTWARE OR
DOCUMENTATION IS ERROR FREE. HP DISCLAIMS ALL WARRANTIES,
EXPRESS AND IMPLIED, WITH REGARD TO THE SOFTWARE AND THE
DOCUMENTATION. HP SPECIFICALLY DISCLAIMS ALL WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
5. HEWLETT-PACKARD COMPANY WILL NOT IN ANY EVENT BE LIABLE FOR ANY
DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
(INCLUDING LOST PROFITS) RELATED TO ANY USE, REPRODUCTION,
MODIFICATION, OR DISTRIBUTION OF THE SOFTWARE OR DOCUMENTATION.
-44
View File
@@ -1,44 +0,0 @@
SubDir HAIKU_TOP src tests kits net netperf ;
Depends netperf : install_netperf_scripts ;
if ! $(TARGET_PLATFORM_BONE_COMPATIBLE) {
SubDirCcFlags -DBUILDING_R5_LIBNET -Dclose=closesocket ;
}
SubDirCcFlags -w -DHAVE_CONFIG_H ;
local net_files =
netcpu_none.c
netlib.c
netsh.c
nettest_bsd.c
nettest_unix.c
;
Objects $(net_files) ;
SimpleTest netperf :
netperf.c
[ FGristFiles $(net_files:S=$(SUFOBJ)) ]
: $(TARGET_NETWORK_LIBS)
;
SimpleTest netserver :
netserver.c
[ FGristFiles $(net_files:S=$(SUFOBJ)) ]
: $(TARGET_NETWORK_LIBS)
;
HaikuInstall install_netperf_scripts : [ FDirName $(HAIKU_TEST_DIR) kits net netperf ] :
arr_script
packet_byte_script
snapshot_script
tcp_range_script
tcp_rr_script
tcp_stream_script
udp_rr_script
udp_stream_script
;
-49
View File
@@ -1,49 +0,0 @@
BE SURE TO READ THE MANUAL. EVEN THOUGH IT MAY BE OUTDATED.
This is a brief readme file for the netperf TCP/UDP/sockets/etc
performance benchmark. This is here mostly as a boot-strap. The real
information is in the manual, which can be found in netperf.ps and
online from http://www.netperf.org/netperf/NetperfPage.html. The
sources, and a limited number of binaries, can be found from
ftp://ftp.cup.hp.com/dist/networking/benchmarks/netperf/ .
BE SURE TO READ THE MANUAL. EVEN THOUGH IT MAY BE OUTDATED.
There is a COPYRIGHT file included. It is called COPYING because that
is what autosomethingorother wanted. It is based on what the HP Legal
Eagles gave me. I am not sure if the legalese is clear, but the intent
is to say "Here is a benchmark. Use it in good health. Pass it along,
port it, enhance it. You didn't pay for this tool, so don't expect it
to be perfect ;-)" The rest of it is there to keep the layers happy...
While the copyright is pretty much in spirit an "open source" one, it
is not in letter - I never took the time to try to get it approved.
If you feel strongly about the license of the code you use and want
something under the GPL, consider netperf4:
http://www.netperf.org/svn/netperf4/trunk
Feel free to report netperf results in public forums, but please be
excruciatingly complete in your description of the test envorinment.
The old netperf database at:
http://www.netperf.org/netperf/NetperfPage.html
is no more - or rather the utilities for accessing it no longer run.
The data is still present in the tree, albeit _VERY_ old now.
There is an Internet mailing list devoted to netperf. It is called
netperf-talk and it is hosted on netperf.org. Subscription requests
should go to [email protected].
Please DO NOT SEND subscription requests to netperf-talk!
If you run into severe difficulties, or are just feeling chatty,
please feel free to drop some email to me - Rick Jones
<[email protected]>. Be sure to include a meaningful subject lines.
happy benchmarking,
rick jones
BE SURE TO READ THE MANUAL. EVEN THOUGH IT MAY BE OUTDATED.
-762
View File
@@ -1,762 +0,0 @@
These are the Release Notes leading-up to Revision 2.4.4 of netperf:
Things changed in this release:
*) The LOC_CPU and REM_CPU tests will report their respective beliefs
as to the number of CPUs present when the verbosity is set to more
than one. This can be used when trying to diagnose issues with CPU
utilization.
*) A kind soul who wishes to remain anonymous provided a patch to
enable use of sendfile() on OSX.
*) Fix a misplaced \n in a format string of send_tcp_maerts, courtesy
of Alexander Duyck.
*) There is an experimental global -r option which will allow one to
include CPU utilization measurements, but make the decision about
hitting confidence based on the result only. The test banner will
reflects this when -r is used.
*) It is no longer necessary to specify a file with the global -F
option when running a _SENDFILE test. Netperf will create a
temporary file and populate it with random data and use that. If
running aggregate tests it is strongly suggested one use a -F
option. Otherwise, the overhead spent creating and populating the
temporary file will be included in the CPU utilization calculation.
*) The configure script recognizes Solaris 11 and selects the correct
CPU utilization mechanism - or rather it selects the same mechanism
as is used in Solaris 10. Fix courtesy of Andrew Gallatin.
*) Convert a number of struct sockaddr_in's to struct
sockaddr_storage's and add requisite casts to deal with some abort
problems on Windows and perhaps other platforms as well. Kudos to
Alexander Duyck.
*) One can now pass a value of 'x' to the global -f option to specify
the units as transactions per second. This is the default for any
request/response test, which is determined by there being a "double
`r'" in the name - eg "RR," "rr," "Rr," or "rR." At present only
the TCP_RR test actually looks for this to be set.
*) One can request bits/bytes per second as the primary output of a
TCP_RR test by setting the global -f option to [kmgKMG] as with any
of the "STREAM" tests. This converts the primary throughput metric
to a bitrate (byterate) following the verbosity rules for a STREAM
test. Service demand remains usec/Transaction regardless of the
setting of the global -f option.
A verbosity level of 2 or more will cause the TCP_RR test to report
calculated average RTT latency, transaction rate, and inbound and
outbound transfer rates regardless of the primary units selected
with the global -f paramter. If the primary output is transactions
per second, the reported inbound and outbound transfer rates will
be 10^6 bits per second, otherwise, they honor the setting of the
global -f option.
All of this is EXPERIMENTAL and subject to change without prior
notice in future versions of netperf.
*) Replace "break" with "break 2" in acinclude.m4 for a socklen macro
*) The default for the requested socket buffer size is changed from 0
to -1 to enable passing a value of 0 under Windows, which tells that
stack one wishes to enable copy-avoidance.
*) Call fflush() on each interim result displayed in demo mode to make
things happier for folks redirecting same to a file. From Dan
Yost.
*) In theory each distinct netserver child will have a debug log with
its pid appended to the name, somewhat like what appears to happen
under Windows.
*) A new global, command-line option to netperf and netserver has been
added. The -V option will cause netperf/netserver to display its
version and exit.
*) Setting -I without setting -i will now implicitly set the iteration
minimum and maximums as if a -i 10,3 were set. Also, some further
sanity checking on the bounds for each is made.
*) Fixed a typo in the manual (found by Emir Halepovic) so the
description for the -s and -S options properly specifies they
affect the data connection.
These are the Release Notes for Revision 2.4.3 of netperf:
Things changed in this release:
*) The UDP_STREAM test includes --enable-demo support, courtesy of
patches from Scott Weitzenkamp.
*) The nettest_dns.* files have been removed from the release and the
repository. Those wishing to perform DNS server tests should
migrate to netperf4 which has better support for DNS test.
*) Fixes for compiling under Windows with Mingw/gcc courtesy of Gisle
Vanem.
*) A new global option - -N - has been added. When specified, this
option will tell netperf to not bother to try to establish a
control connection with a remote netserver. Instead, netperf will
only attempt to make a data connection to the remote system. By
default, this will be to the "discard" service for a "STREAM" or
"SENDFILE" test, the "echo" service for a "RR" test and the
"chargen" service for a "MAERTS" test. Any "remote" settings are
changed to reflect their being unused in the test, and a "no
control" tag is added to the test banner when -N is specified.
This still needs to be propagated to other test files - at least
for those for which it may make sense.
*) The tests in nettest_bsd.c have been altered to not actually take
timestamps and deltas in --enable-histogram unless the verbosity
level has been set to actually display a histogram. This reduces
the overhead measurably, even on systems with "fast" time calls,
which _may_ mean that a future release of netperf may have
histogram support enabled by default.
This still needs to be propagated to other test files. Patches
from the community would be most welcome :)
*) Eliminate a bogus fprintf from the signal catching routine which
was being executed when both intervals and demo mode were active at
the same time.
*) The nettest_ipv6.* files are no longer included in the source
tar/zip file. IPv6 functionality has been subsumed into the
nettest_bsd.* files for some time now.
*) Use a higher resolution "time" source for HISTOGRAM support under
Windows, courtesy of Spencer Frink. Prior to this it had no better
than 10ms granularity which could lead to some rather strange
looking results :)
*) A bug fix reporting recv_size rather than send_size in TCP_MAERTS
when CPU utilization was requested.
*) A bug fix for buffer filling from a file to properly advance the
buffer pointer when the file is smaller than the send buffer.
*) Enable certain UDP tests which previously used unconnected sockets
to use connected sockets. Courtesy of Shilpi Agarwal.
*) The OSX CPU utilization code actually gets put into the tarball in
a make dist now :)
*) The check to make sure that getaddrinfo returned ai_protocol and/or
ai_socktype's matching that which we requested is done for all socket
and/or protocol types and a warning is emitted if it returns any which
do not match.
*) The linux CPU affinity code has been made capable of binding to
CPU's >=32 on a 32-bit compilation and >=64 on a 64-bit
compilation.
*) More complete closing/redirecting of stdin/stdout/stderr/where in
netserver to make it easier to launch netserver at the far-end of a
remote shell. Courtesy of Hans Blom.
*) Sendfile changes for Solaris courtesy of Andrew Gallatin.
*) "spec" file support to generate RPMs courtesy of Martin Brown
These are the Release Notes for Revision 2.4.2 of netperf:
Things changed in this release:
*) Fixes for floating point format differences, courtesy of George
Davis.
*) Additions for CPU util support on MacOS X, courtesy of Anonymous.
*) Processor affinity is now supported on AIX 5.3 (perhaps earlier)
via the bindprocessor system call.
*) Fixes for test lockups with TCP_CRR and TCP_CC under Windows
courtesy of Dikon Reed.
*) Fixes to netcpu_looper.c to get it to actually compile :)
*) Have netcpu_looper use the bind_to_specific_processor() call
provided by netlib since that knows about more platforms than the
code in netcpu_looper did. The looper CPU binding will use a
mapping to handle cases where the CPU id's on the system may not be
a contiguous space starting from zero. At present, the code that
setups the mapping only knows about retrieving actual CPU ids under
HP-UX.
*) The netcpu_sysctl method becomes calibration-free, courtesy of
Andrew Gallatin
These are the Release Notes for Revision 2.4.1 of netperf:
Things changed in this release:
*) There is now a -B global command-line argument that will append its
parameter as a string to the end of result lines when test banners
have been suppressed. this is to make it easier to distinguish one
result from another when aggregate restults are being run in
parallel, without having to resort to having the individual results
shell redirected to a file. This has been done for some of the
tests in nettest_bsd.c, but not all of them, nor for the tests in
the other nettest_mumble.c files.
*) There is now an --enable-spin configure option that will enable
intervals if not already enabled and will have the sender sit and
spin in a tight loop until time for the next interval rather than
wait for an interval timer to expire. This means it should be
possible to have a much finer granularity on the interval, at the
expense of an EXTREME increase in CPU utilization. (To the extent
I'm considering disabling measurement of local CPU utilization when
that mode is enabled, and bursts have been requested - your
feedback on that topic would be most appreciated)
If only --enable-intervals is used with configure, the old set the
interval timer and wait method is still used.
If --enable-spin is configured, the test banner will include "spin
intervals" rather than the "intervals" from a plain
--enable-intervals. The sit and spin will either use
gettimeofday(), or gethrtime() if gethrtime() is available.
This has been implemented in the tests of nettest_bsd.c but none of
the others. Volunteers would be most welcome. I would entertain
the notion of making the implementation a series of inline
functions in netlib. This holds true for the demo mode - why will
become clear when you look at nettest_bsd.c. While things are
considerably cleaner than they were before, with reuse within
nettest_bsd.c, there is no resuse with the rest of the
nettest_mumble.c files.
*) the -w option for the interval time now takes three optional
suffixes. if the suffix is 'm' (eg 10m) it will assume the user has
specified time in units of milliseconds. if the suffix is 'u' it
will assume microseconds, and if 's' seconds. no suffix remains
milliseconds for backwards compatability with previous netperf
versions.
*) It should be possible to successfully compile with
--enable-intervals.
These are the Release Notes for Revision 2.4.1 of netperf:
Things changed in this release:
*) netcpu_pstatnew.c has been altered to workaround a bug in the
interrupt cycle accounting in HP-UX 11.23 that is not expected to
be resolved until a later release. basically, some interrupt time
is not counted, which means the sum of idle, user, kernel and
interrupt is less than the cycles per second multiplied by the
elapsed time. the workaround preserves the "no calibration
required" nature of the pstatnew CPU utilization mechanism. you
can see more in netcpu_pstatnew.c and/or in debug output.
*) in netlib.c recv_response has been renamed
recv_response_timed(addl_time) which is now used in
calibrate_remote_cpu in place of the "sleep(40);recv_response()"
sequence. This then allows the REM_CPU test to complete in less
than 40 seconds when the remote's CPU utilization mechanism does
not require calibration. The value of "addl_time" is added to the
tc_sec field of the select() timeout. A "new" recv_response has
been added that simply calls recv_response_timed(0) - this is to
minimize the number of changes needed elsewhere in the code.
*) hopefully, this release fixes problems people have been having with
the configure script failing when picking a type for socklen_t.
now, instead of generating an error, it emits a warning and simply
tries socklen_t
*) the configure script no longer looks for the size of an in_port_t
*) netlib.c now has code to perform processor binding for Tru64, but
the configure script may or may not detect it correctly. This means
that one may have to edit the config.h file by hand to get the
functionality.
*) it is known that netperf will compile under Windows XP and 2003
using the DDK it is possible that netperf 2.4.1 will compile on a
Windows system under VC++/Visual Studio. It might even work!-) See
the README.window file for additional details.
Things _NOT_ changed in this release:
*) The automagic determination of the number and type of parameters to
sched_setaffinity under Linux remains brittle at best.
These are the Release Notes for Revision 2.4.0 of netperf:
Things changed in this release:
*) Netperf has been converted to use a configure script. Yes boys and
girls, after 12 years of distributing netperf with just a makefile
I have finally bitten the bullet and cast my fate to autoconf,
automake, etc. To get the most basic netperf built all you should
need to do is:
cd to the netperf directory
./configure
make
and perhaps
make install
(Note, I've not done much with make install - I'm hemming and
hawing over what the default installation location should be)
Please keep in mind that this is the first time I've tried to use
autoconf et al. I am sure there are things that should be done
differently and would welcome any and all constructive criticisms.
I suspect there are several places where I've not fully
demonstrated being of the autoconf body - particulary as pertains
to include files being in "#if mumble #endif" blocks. Fixes would
be most welcome.
*) Speaking of becomming one with various GNU tools, work on a new
netperf manual has begun, with the source being a texinfo document
that is converted to "all" the other formats. This resides in doc/
.
*) The platform-specific parts of CPU utilization measurement have
been broken-out into separate .c files and selected at configure
time a la the pcap_mumble files of tcpdump. This makes
src/netlib.c _much_ easier to read and the addition of new CPU
utilization mechanisms much easier.
*) New HP-UX 11.23 and Solaris 10 CPU utilization measurement
mechanisms (called pstatnew and kstat10 respectively) need no
calibration step. Both have variations on microstate accounting.
HP-UX 11.23 still identifies the method in the headers as 'P' for
pstat. The kstat10 method is identified as 'M' for Microstate.
Scripts which make calibration runs with LOC_CPU and REM_CPU may
continue to do so, they will just run forty to eighty seconds
faster on platforms with the calibration-free CPU util mechanisms.
*) Automatic detection of CPU utilization mechanism for HP-UX, Linux,
AIX, *BSD and Solaris. If you do not like what the configure
script selects, you can use --enable-cpuutil=<foo> .
*) The "times" (aka 'T') CPU utilization mechanism has been removed.
It was never very accurate at all, only showing CPU time charged to
the process, and with interrupts and other network processing it is
rarely chaged to a or the correct process. It and other methods
may remain in the format_cpu_method() routine of src/netlib.c for
historical purposes only.
*) CAVEAT - the "kstat" mechanism is KNOWN TO BE BOGUS for Solaris.
It does not include time spent processing interrupts, and
networking benchmarks will generate at least a few of those...
This affects _ALL_ versions of Solaris with kstat.
So, do NOT trust any CPU util figures where netperf says the method
was 'K' for kstat - unless perhaps it reports 100% CPU util.
Solaris 10 takes a step in the right direction adding microstate
accounting similar to what netperf uses on HP-UX 11.23. HOWEVER,
Solaris 10's accounting for user/kernel/idle is done in _parallel_
with interrupt, which means they overlap. Doubleplusungood. Netperf
attempts to compensate for that with some handwaving
(src/netcpu_kstat10.c)
*) Initial support for SCTP has been added with the SCTP_STREAM and
SCTP_RR tests. These tests use the libsctp mechanisms for
increased portability. It has been explained that libsctp should
not impart all that much overhead and it does make things rather
simpler.
*) Netperf now uses getaddrinfo() to resolve hostnames and IP
addresses. A replacement getaddrinfo() is provided for those
platforms where the configure script cannot tell that getaddrinfo
is present.
There are cases where a host's getaddrinfo call may return results
that ignore the hints for protocol. Netperf catches these and
reports a warning so you can pester your OS source for fixes.
Solaris getaddrinfo() seems to return results with SCTP procotol
cleared.
Mac OS X getaddrinfo botches when the service/port is specified as
"0" so one must specify a port number on the netperf command line.
AIX 5.something getaddrinfo has a different but similar problem
with "0" as a port/service name as well.
Linux 2.6 and HP-UX 11i getaddrinfo seem to be fine - at least as
far as netperf goes :)
*) A "Demo Mode" has been added to the main BSD Sockets/TCP/UDP tests:
TCP_STREAM, TCP_MAERTS, TCP_SENDFILE, TCP_RR, TCP_CC, TCP_CRR and
UDP_RR. It has not been added to UDP_STREAM. This mode is enabled
with --enable-demo when configuring netperf, which activates a
global "-D" option. By default, -D will cause interim results
(throughput or transactions/s only, not CPU util) from the
netperf's perspective to be emitted no sooner than once per second.
An optional parameter can specify another interval in units
(floating point) of seconds:
-D 1.5
will make the reporting interval at least 1.5 seconds.
This mode makes no use of explicit interval timers since that can
be so, well fun on different platforms. Instead, an initial guess
of how many units of work must be done to consume the desired
reporting interval is made, and that guess is refined throughout
the entire test. If something happens to dramatically slow-down
the test, the reproting interval may become must larger for a few
intervals. When things speed-up it is detected very quickly. As
with the --enable-historgram support, if gethrtime() is available
on the platform, it will be used in lieu of gettimeofday(). In any
case, the number of calls to gettimeofday()/gethrtime() is much,
Much, MUCH smaller than for --enable-histogram so while there may
be a measurable effect on the results, it should be rather small.
*) The global -H option has been enhanced to take an optional address
family specification for the control connection:
-H <remote>,<family>
Unlike other comma-separated options, where specifying only one
thing will set both, here specifying only one thing will be
ass-u-me-d to be the <remote> and will leave <family> defaulted
(AF_UNSPEC). Family can be specified as "4" or "inet" for
AF_INET, "6" or "inet6" for AF_INET6.
*) A new global -L option has been added to specify the local name/IP
and/or address family for the control connection:
-L <local>,<family>
Unlike other comma-separated options, where specifying only one
thing will set both, here specifying only one thing will be
ass-u-me-d to be the <local> and will leave <family> defaulted
(AF_UNSPEC). Family can be specified as "4" or "inet" for
AF_INET, "6" or "inet6" for AF_INET6.
*) Test-specific -H and -L options are present for the TCP, UDP and
SCTP tests, which are now (intended to be) IP protocol version
agnostic.
*) Global -4 and -6 options will set the both the local and remote
address family to either AF_INET or AF_INET6 respectively.
*) Test-specific -4 and -6 options have been added for TCP, UDP and
SCTP tests.
*) Since the basic TCP UDP and SCTP tests are no longer IPv4-only, the
nettest_ipv6.[ch] files are only included in the source
distribution for historical interest.
*) The main test banners for the TCP, UDP and SCTP tests have been
enhanced to give both local and remote addressing information for
the data connection.
*) Compilation under Windows is likely FUBAR at this point. I _hope_
to start trying to do builds under the DDK soon, but am not sure
when I'll be able to start. Any and all assistance you can give
there would be most welcome.
*) Various and sundry fixes. TCP_RR should no longer go into an
infinite loop when you abort netperf. I'm sure there are others.
*) Unix domain socket tests are compiled-in with --enable-unix=yes at
configure time.
*) DLPI tests are compiled-in with --enable-dlpi=yes at configure
time.
*) XTI tests are compiled-in with --enable-xti=yes at configure time.
Things not changed in this release:
*) Seems like everything has changed :)
These are the Release Notes for Revision 2.3pl2 of netperf:
Things changed in this release
*) One can bind netperf or netserver to specific CPUs with the -T
option. This is a generalization of some HP-UX and netserver specific
work from 2.3pl1.
*) Extend the kludge to workaround the Linux setsockopt/getsockopt
bizzarreness to the socket buffer sizes for the remote side in
addition to the local side.
*) Fix the lack of initialization of times_up in recv_tcp_maerts()
that caused confidence intervals to fail miserably.
*) Other misc fixes - than you to all of you who sent them.
These are the Release Notes for revision 2.3pl1 of netperf:
Things changed in this release
*) The bind() call in create_data_socket() in the file nettest_bsd.c
is no longer conditional on the user's specifying an IP address or
port number to which the data socket should be bound. This fixes
the "connection refused" errors in the UDP tests.
*) Some experimental code to allow one to specify a CPU to which the
remote netserver should be bound. This is intended to allow one to
get greater certainty (as in confidence intervals) on SMP
systems. At present the functionality is HP-UX specific.
Submittals of changes for a more general approach are welcomed.
These are the Release Notes for revision 2.3 of netperf:
Things changed in this release
*) The user can now specify local and/or remote port numbers for the
data connection using the -P test-specific option. This is to
support those folks who want to run netperf through those evil,
end-to-end-breaking things known as firewalls... :) This changes
the format of some of the control messages, hence the bump in the
update number in the VUF. While it may be possible to mix 2.3 and
pre-2.3 netperf and netserver, it is not supported.
*) The user can now specify local and/or remote IP addresses for the
data connection using the -I test-specific option. This is to
support those folks who want to run netperf through those evil,
end-to-end-breaking things known as firewalls... :) This changes
the format of some of the control messages, hence the bump in the
update number in the VUF. While it may be possible to mix 2.3 and
pre-2.3 netperf and netserver, it is not supported.
*) Set DL_mumble message priorities in the DLPI tests
*) Fix error return check for getaddrinfo()
*) Those systems with gethrtime() can define -DHAVE_GETHRTIME to use
gethrtime() instead of gettimeofday() and reduce the measurement
overhead when enabling the -DHISTOGRAM functionality.
*) The default for -DHISTOGRAM compilation now adds a UNIT_USEC and
TEN_USEC row and renames TENTH_MSEC to HUNDRED_USEC. If you want
the old behaviour add -DOLD_HISTOGRAM to CFLAGS.
*) Add missing '!' in the recv_udp*_stream so we recognize the end of
a timed test correctly.
*) Replace "||" with "&&" to fix an infinite loop in
recv_tcp_conn_rr() most likely introduced in 2.2pl5.
*) Code has been added to kludge around the bug in Linux getsockopt()
where it almost always returns twice the value for which one
asks unlike virtually every other stack on the face of the
planet. This was doing some unpleasant things to tests in which
confidence intervals were requested.
Things not changed in this release
*) Lots :)
These are the Release Notes for revision 2.2pl5 of netperf:
Things changed in this release
*) Improved (perhaps even usable :) support for Windows, including
compilation and run on Win64.
*) Fixes for MacOS X and FreeBSD
Things not changed in this release
*) Specifying the port number(s) for the data connection
These are the Release Notes for Revision 2.2pl4 of netperf:
Things changed in this release
*) USE_SYSCTL available on suitable FreeBSD releases to measure CPU
utilization without having to resort to -DUSE_LOOPER.
*) Include Solaris 9 with the Linux sendfile path under -DHAVE_SENDFILE
This still outstanding in this release
*) Knowing why signals are not interrupting socket calls under
OpenVMS. A quick try to use threads for timing a la Win32 worked,
but also cut performance in half. Any and all assistance in this
area would be most welcome.
These are the Release Notes for revisoin 2.2pl3 of netperf:
Things changed in this release
*) I started practicing what I preach and will set SO_REUSEADDR before
netserver tries to bind to its well-known port.
*) Initial port to OpenVMS. This includes support for the OVMS
Auxilliary server (inetd replacement). See README.ovms for more
details on what is involved in compiling and running netperf under
OpenVMS.
*) Testname comparisons are now case insensitive. This is a side
effect of OpenVMS downshifting commandlines to lowercase. I made
the change and decided it was OK to keep it that way, even though
for OpenVMS one _has_ to set the right defines to disable that
downshifting or the command-line options will not work. For example
"-H" will become "-h" which isn't quite the same thing...
*) Misc fixes for nettest_ipv6.c.
*) Support for sendfile() under Linux
Thins I would like to have changed but did not know how or didn't have
time:
*) Allow netserver to run as a standalone daemon under OpenVMS
*) Allow netserver to run as a standalone daemon under Windows
*) Rediscover an inetd-like facility for Windows
*) Figure-out how to get low-overhead, accurate, per-CPU utilization
figures under OpenVMS
*) Get the UDP_RR and UDP_STREAM tests to work under OpenVMS, and get
the TCP_RR test to work based on time rather than transaction
count. There is some bug (possibly in OpenVMS?) where the SIGALRM
fires, but a socket call will not return an EINTR.
Things that changed prior to this release:
*) Addition of the TCP_MAERTS test - this is a TCP_STREAM test where
the data flows from the netserver to the netperf rather than from
the netperf to the netserver. This can be useful in those
situations where netperf (netserver) is installed on a remote
system, but the tester has no shell access and wishes to get
performance data for the path from netserver to netperf.
These are the Release Notes for the 2.2 revision of netperf:
Things changed in this release
*) Various and sundry bugs fixed (in theory) for platforms such as
FreeBSD and Linux. If I left-out your bug fix, it was purely
accidental - my mind has a very small cache, and sometimes I will
"lose" email in the shuffle.
*) Initial support for sendfile() on HP-UX. This test will use the
sendfile() call instead of send() to send data to the
remote. Netperf "lies" to netserver and calls it a TCP_STREAM test
since what netserver needs to do is exactly the same. A future
patch may change that and simply have netserver call the same
routine for both test types. Kudos to Charles Harris for the
initial prototype.
*) The Fore ATM API and HiPPI tests have been dropped from the
distribution.
Things I would have liked to have changed, but did not have time for:
*) Conversion of the source and makefile to use the GNU configure/autoconf
utility to make it easier for folks to build by not having to edit
makefiles... You will notice that I have started to switch from
"DO_MUMBLE" to "HAVE_MUMBLE"
as always - happy benchmarking,
rick jones <[email protected]>
---------------------------------------------------------------------
These are the Release Notes for the 2.1pl3 revision of netperf:
*) An OBOB (Off By One Bug) in netlib.c that was causing a core dump
on Irix should be fixed.
*) Irix systems should now be able to determine the number of CPU's
present automagically (code from outside, not tested yet because I
have no MP Irix systems at my disposal)
*) An alpha version of a TCP_CC test has been added - this is a
TCP_CRR test with out the "RR."
*) The -Ae has been removed from the default makefile. If someone has
a nice way to automagically generate the correct makefile for
different platforms I would like to learn how.
happy benchmarking,
rick jones <[email protected]>
----------------------------------------------------------------------
These are the Release Notes for the 2.1 revision of netperf:
Things Changed in this release:
*) The XTI (Version 2 of the spec) tests are now documented in the
manual.
*) The TCP_CRR (Connect Request/Response) test is now documented in
the manual, including a description of how it mimics the behaviour
of http (the protocol underlying the WWW).
*) Support for for Windows NT 3.51 OS in the BSD Sockets tests (ok, so
they are really Winsock in that case :). Other test suites may be
ported as required/desired/appropriate.
*) Tests for TCP and UDP, using the IPv6 extensions to BSD sockets are
included in this release. They are included by adding -DUSE_IPv6 to
the makefile and recompiling.
*) Support for a "long long" datatype should only be required for
-DUSE_PSTAT compilation which is an HP-UX only thing. The
*unbundled* HP compilers from at least "HP92453-01 A.09.61 HP C
Compiler" and later should have the required support. The bundled
compiler may not. GCC should work - check the archives listed in
the comp.sys.hp.hpux FAQ for copies. The FAQ is archived on
rtfm.mit.edu under the path pub/usenet/comp.sys.hp.hpux.
*) A "proper" fix for double data type alignment has been included.
*) A new script is included with this release which can be used to
measure aggregate TCP_RR performance (multiple, concurrent
instances of the TCP_RR test). A related use of this script would
be measuring MP scaling. A single-byte TCP_RR test is good for this
purpose for two reasons:
1) it excercises the control/protocol paths heavily without
using much in the way of data copies which may be easier to
scale.
2) most systems can easily saturate cards with bandwidth, but
not so easily with request/response
Of course, feedback on this is most welcome.
*) When measuring CPU utilization, the units for service demand have
been changed from milliseconds (designated ms) of CPU per unit (KB
or Transaction) to microseconds (desginated us).
*) For accurate reporting of service demand, netperf needs to know the
number of CPU's present on a system. On some systems (HP-UX), this
is automatic. For others (All), it is necessary to add a global "-n
<numcpu>" option to both netperf and netserver.
!! IF THIS IS LEFT-OUT CPU UTILIZATION AND SERVICE DEMAND FOR !!
!! MULTI-PROCESSOR SYSTEMS WILL BE WRONG. !!
If you know of ways to programatically determine the number of
active CPUs on a system, please let the author Rick Jones
<[email protected]> know.
*) other things I've probably forgotten :)
Things Not Changed in this release:
*) The ancillary test suites are essentially unchanged - DLPI,
HiPPI/LLA, Unix Domain, and Fore ATM API. Unless there is much
interest expressed in these tests, 2.1 may be the last release in
which they are included. The order of retirement would likely be
Unix Domain, HiPPI/LLA, Fore ATM API, and then DLPI.
Miscelaneous Comments:
*) The -DUSE_LOOPER CPU utilization _seems_ to be nice and low-impact
on HP-UX, Digital Unix, and IRIX. It does not yet seem to be
low-impact on Solaris (I need an example of priocntl usage), AIX
(setpri only works if you are root), and NT (not sure of the
reason). Help with those problems would be most appreciated.
-384
View File
@@ -1,384 +0,0 @@
#
# a script that can be used to measure aggregate netperf performance,
# original author is Mike Traynor. Modifications to create the
# "netperf TCP_ARR test" by rick jones
#
init_parms() {
TEST_TIME=60
NTEST=3
TOLERANCE=15
MAX_RETRIES=3
NETPERF="/usr/local/netperf/netperf"
NETPERF="./netperf"
NPROC_LIST=""
RR_SIZES=""
REM_HOST_LIST=""
DEVFILELIST=""
LLA=0
TCP=1
UDP=0
GPROF=0
}
set_default_parms() {
if [ "X$NPROC_LIST" = "X" ]
then
NPROC_LIST="1"
fi
if [ "X$REM_HOST_LIST" = "X" ]
then
REM_HOST_LIST="127.0.0.1"
fi
if [ "X$RR_SIZES" = "X" ]
then
RR_SIZES="1,1"
fi
NHOSTS=`echo $REM_HOST_LIST | awk '{printf "%d",NF}'`
GPROF_RUN_TIME=`expr $TEST_TIME - 20`
}
usage() {
more << @EOF
$*
USAGE: scale_script {test_options} {hostlist}
Measure maximum system network throughput.
The following are optional parameters:
-t nsec : Causes each test to be run for nsec seconds.
-gprof system : Take a gprof sample during the test. system
is the name of the kernel the system was booted
with.
-n "nproclist" : One series of tests is run for each space-separated
value in nproclist.
-r "sizelist" : One series of tests is run for each space-separated
request,reply pair in sizelist.
hostlist : A space separated list of hosts to test against.
+|-tcp : Run/Don't run TCP tests.
+|-udp : Run/Don't run UDP tests.
+|-lla : Run/Don't run LLA tests; this option also requires
the user to specify a list of network device files
using the -d option described below.
The following option must be provided when using the -lla option
described above:
-d "devfilelst" : Where devfilelst is a space-separated list
of network device file pairs. Each pair in
the list contains two device file names,
separated by a comma (eg. /dev/lan0,/dev/lan1),
where the device file on the left side of the
comma is for the local system and the device
file on the right side is for the remote system.
A device file pair must be specified for each
remote host which is specified.
Examples:
scale_script -n "8 16" -udp LGs37U1 LGs37U2 -r "1,1 100,100"
scale_script -t 1000 -n "16" -tcp -gprof /stand/vmunix LGs37U1 LGs37U2
scale_script -n 4 -lla -d /dev/lan0,/dev/lan0 /dev/lan1,/dev/lan0 \\
LGs37U1 LGs37U2
@EOF
}
check_usage() {
if [ `expr $TCP + $UDP + $LLA` -eq 0 ]
then
usage $0: ERROR: Must specify a test
exit
fi
if [ $LLA -eq 1 ]
then
NDEV=`echo $DEVFILELIST | awk '{printf "%d",NF}'`
if [ $NDEV -ne $NHOSTS ]
then
usage $0: ERROR: Number of device files does not match number of hosts
exit
fi
fi
for HOST in $REM_HOST_LIST
do
if [ `/etc/ping $HOST 100 1 | awk '/transmitted/{print $4}'`0 -ne 10 ]
then
usage $0: ERROR: Cannot ping host: $HOST
exit
fi
done
if [ $GPROF -eq 1 ]
then
if [ ! -r $GPROF_KERNEL ]
then
usage $0: ERROR: Cannot find system file: $GPROF_KERNEL
exit
fi
if [ $GPROF_RUN_TIME -le 800 ]
then
echo "\nWARNING: GPROF RUN TIME LESS THAN 800 SECONDS\n"
fi
fi
}
display_headstone() {
cat << @EOF
$TESTNAME Aggregate REQUEST/RESPONSE TEST to $REM_HOST_LIST
Local /Remote
Socket Size Request Resp. Elapsed Trans. Num.
Send Recv Size Size Time Rate Concurrent
bytes Bytes bytes bytes secs. per sec Netperfs
@EOF
}
display_test_banner() {
cat << @EOF
@EOF
}
build_sap_list() {
LSAP=4
SAPLIST=""
PROC=0
while [ $PROC -lt $NPROCS ]
do
PROC=`expr $PROC + 1`
LSAP=`expr $LSAP + 4`
RSAP=`expr $LSAP + 2`
SAPLIST="$SAPLIST $LSAP,$RSAP"
done
}
start_gprof() {
if [ $GPROF -eq 1 ]
then
( kgmon -h; kgmon -r; sleep 10; kgmon -b; sleep $GPROF_RUN_TIME; kgmon -h; kgmon -p $GPROF_KERNEL; mv gmon.out gmon.out.$TEST.$NPROCS )&
fi
}
start_1_proc_per_host() {
HOSTNUM=0
for HOST in $REM_HOST_LIST
do
if [ "$TEST" = "HIPPI_RR" ]
then
PROCNUM=`expr $PROCNUM + 1`
SAP=`echo $SAPLIST | awk "{print \\$$PROCNUM}"`
SAP="-s $SAP"
HOSTNUM=`expr $HOSTNUM + 1`
DEVFILE=`echo $DEVFILELIST | awk "{print \\$$HOSTNUM}"`
DEVFILE="-D $DEVFILE"
fi
$NETPERF -t $TEST -l $TEST_TIME -H $HOST -P0 -v0 -- \
$COW $DEVFILE $SAP $RR_SIZE $SEND_SIZE $SOCKET_SIZE &
done
}
start_n_procs_per_host() {
PROC=0
while [ $PROC -lt $1 ]
do
PROCNUM=`expr $PROC \* ${NHOSTS}`
start_1_proc_per_host &
PROC=`expr $PROC + 1`
done
wait
}
run_1_test() {
start_n_procs_per_host $PROCS_PER_HOST |\
awk 'BEGIN {max=0;min=99999;sum=0;n=0} \
{sum += $1;n++;ave=sum/n} \
$1<min {min=$1} \
$1>max {max=$1} \
{errl=(ave-min)/ave;errm=(max-ave)/ave;err=errl} \
errm>errl {err=errm} \
END {printf "Aggregate throughput: %2.2f TPS +/- %2.2f %%\n",sum,err*100}'
}
run_test_n_times() {
RETRY=0
TEST_COUNT=0
while [ $TEST_COUNT -lt $1 ]
do
TEST_COUNT=`expr $TEST_COUNT + 1`
start_gprof
run_1_test > .run_test_n_file
cat .run_test_n_file
ERROR_LVL=`awk '{print int($6+0.99)}' .run_test_n_file`
if [ $ERROR_LVL -gt $TOLERANCE ]
then
RETRY=`expr $RETRY + 1`
if [ $RETRY -le $MAX_RETRIES ]
then
TEST_COUNT=`expr $TEST_COUNT - 1`
TEST_TIME=`expr $TEST_TIME \* 2`
else
echo "!!!This is an INVALID RUN of the arr_script!!!" >&2
echo "!!!UNABLE to hit TOLERANCE of " $TOLERANCE "!!!" >&2
echo "Please select a longer initial time and try again." >&2
exit
fi
fi
done
}
do_req_rr_sizes() {
for S2 in $RR_SIZES
do
RR_SIZE="-r $S2"
display_test_banner $NPROCS $TEST $S2
run_test_n_times $NTEST > .do_series_file
TPS=`awk "int(\$6+0.99)<=$TOLERANCE {print}" .do_series_file |\
awk 'BEGIN {sum=0;n=1} \
sum>0 {n++} \
{sum+=$3} \
END {printf "%2.2f\n",(sum)/(n)}'`
SOCK_SEND=`echo $SOCKET_SIZE | awk '{print $2}'`
SOCK_RECV=`echo $SOCKET_SIZE | awk '{print $4}'`
REQ_SIZE=`echo $S2 | awk -F"," '{print $1}'`
RSP_SIZE=`echo $S2 | awk -F"," '{print $2}'`
echo $SOCK_SEND $SOCK_RECV $REQ_SIZE $RSP_SIZE $TEST_TIME $TPS $PROCS |\
awk '{printf "%5d %5d %5d %5d %5d %8.2f %5d",$1,$2,$3,$4,$5,$6,$7}'
done
}
tcp_test() {
#Run the TCP RR tests
TEST="TCP_RR"
SEND_SIZE=""
SOCKET_SIZE="-s 8192 -S 8192"
COW="-V"
do_req_rr_sizes
echo
}
udp_test() {
#Run the UDP RR tests
TEST="UDP_RR"
SEND_SIZE=""
SOCKET_SIZE="-s 9216 -S 9216"
COW="-V"
do_req_rr_sizes
echo
}
lla_test() {
#Run the UDP RR tests
TEST="HIPPI_RR"
SEND_SIZE=""
SOCKET_SIZE=""
COW=""
build_sap_list
do_req_rr_sizes
echo
}
do_req_procs() {
if [ $TCP -eq 1 ]
then
TESTNAME="TCP"
display_headstone
for PROCS in $NPROC_LIST
do
#Determine number of procs per host
PROCS_PER_HOST=`echo $PROCS $REM_HOST_LIST | awk '{printf "%d",($1+NF-2)/(NF-1)}'`
NPROCS=`expr $PROCS_PER_HOST \* $NHOSTS`
tcp_test
done
fi
if [ $UDP -eq 1 ]
then
TESTNAME="UDP"
display_headstone
for PROCS in $NPROC_LIST
do
#Determine number of procs per host
PROCS_PER_HOST=`echo $PROCS $REM_HOST_LIST | awk '{printf "%d",($1+NF-2)/(NF-1)}'`
NPROCS=`expr $PROCS_PER_HOST \* $NHOSTS`
udp_test
done
fi
if [ $LLA -eq 1 ]
then
TESTNAME="LLA"
display_headstone
for PROCS in $NPROC_LIST
do
#Determine number of procs per host
PROCS_PER_HOST=`echo $PROCS $REM_HOST_LIST | awk '{printf "%d",($1+NF-2)/(NF-1)}'`
NPROCS=`expr $PROCS_PER_HOST \* $NHOSTS`
lla_test
done
fi
}
######################################################################
init_parms
PARMS="${0##*/} ${@}"
# Parse the command line
while [ $# != 0 ]
do
case $1 in
\-gprof) GPROF=1
GPROF_KERNEL=$2
shift
;;
\-t) TEST_TIME=$2
shift
;;
\-n) NPROC_LIST="$NPROC_LIST $2"
shift
;;
\+lla) LLA=1
;;
\+tcp) TCP=1
;;
\+udp) UDP=1
;;
\-lla) LLA=0
;;
\-tcp) TCP=0
;;
\-udp) UDP=0
;;
\-d) DEVFILELIST="$DEVFILELIST $2"
shift
;;
\-r) RR_SIZES="$RR_SIZES $2"
shift
;;
\-*) usage $0: ERROR: Unexpected paramter: $1
exit
;;
*) REM_HOST_LIST="$REM_HOST_LIST $1"
;;
esac
shift
done
set_default_parms
check_usage
do_req_procs
-349
View File
@@ -1,349 +0,0 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to one to enable dirty buffer support. May affect results. */
/* #undef DIRTY */
/* Define to 1 if you have the `alarm' function. */
#define HAVE_ALARM 1
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
/* Define to 1 if you have the `bindprocessor' function. */
/* #undef HAVE_BINDPROCESSOR */
/* Define to 1 if you have the `bind_to_cpu_id' function. */
/* #undef HAVE_BIND_TO_CPU_ID */
/* Define to 1 if you have the `bzero' function. */
#define HAVE_BZERO 1
/* Define to 1 if you have the <endian.h> header file. */
#define HAVE_ENDIAN_H 1
/* Define to 1 if you have the <errno.h> header file. */
#define HAVE_ERRNO_H 1
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `fork' function. */
#define HAVE_FORK 1
/* Define to 1 if you have the `getaddrinfo' function. */
#define HAVE_GETADDRINFO 1
/* Define to 1 if you have the `gethostbyname' function. */
#define HAVE_GETHOSTBYNAME 1
/* Define to 1 if you have the `gethrtime' function. */
/* #undef HAVE_GETHRTIME */
/* Define to 1 if you have the `getnameinfo' function. */
#define HAVE_GETNAMEINFO 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1
/* Define to one to include ICSC-EXS tests. */
/* #undef HAVE_ICSC_EXS */
/* Define to 1 if you have the `inet_ntoa' function. */
#define HAVE_INET_NTOA 1
/* Define to 1 if you have the `inet_ntop' function. */
#define HAVE_INET_NTOP 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `exs' library (-lexs). */
/* #undef HAVE_LIBEXS */
/* Define to 1 if you have the `kstat' library (-lkstat). */
/* #undef HAVE_LIBKSTAT */
/* Define to 1 if you have the `m' library (-lm). */
/* #undef HAVE_LIBM 1 */
/* Define to 1 if you have the `mach' library (-lmach). */
/* #undef HAVE_LIBMACH */
/* Define to 1 if you have the `nsl' library (-lnsl). */
/* #undef HAVE_LIBNSL */
/* Define to 1 if you have the `perfstat' library (-lperfstat). */
/* #undef HAVE_LIBPERFSTAT */
/* Define to 1 if you have the `sctp' library (-lsctp). */
/* #undef HAVE_LIBSCTP */
/* Define to 1 if you have the `sdp' library (-lsdp). */
/* #undef HAVE_LIBSDP */
/* Define to 1 if you have the `sendfile' library (-lsendfile). */
/* #undef HAVE_LIBSENDFILE */
/* Define to 1 if you have the `socket' library (-lsocket). */
/* #undef HAVE_LIBSOCKET */
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
/* Define to 1 if you have the `memcpy' function. */
#define HAVE_MEMCPY 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1
/* Define to 1 if you have the `mpctl' function. */
/* #undef HAVE_MPCTL */
/* Define to 1 if you have the `munmap' function. */
#define HAVE_MUNMAP 1
/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <netinet/sctp.h> header file. */
/* #undef HAVE_NETINET_SCTP_H */
/* Define to 1 if you have the `processor_bind' function. */
/* #undef HAVE_PROCESSOR_BIND */
/* Define to 1 if you have the `sched_setaffinity' function. */
/* #undef HAVE_SCHED_SETAFFINITY */
/* Define to 1 if `struct sctp_event_subscribe' has a
`sctp_adaptation_layer_event' member */
/* #undef HAVE_SCTP_ADAPTATION_LAYER_EVENT */
/* Define to 1 if you have the `select' function. */
#define HAVE_SELECT 1
/* Define to 1 if you have the `sendfile' function. */
/* #undef HAVE_SENDFILE */
/* Define to 1 if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
/* Define to 1 if you have the `socket' function. */
#define HAVE_SOCKET 1
/* Define to 1 if you have the `sqrt' function. */
#define HAVE_SQRT 1
/* Define to 1 if stdbool.h conforms to C99. */
#define HAVE_STDBOOL_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1
/* Define to 1 if you have the `strchr' function. */
#define HAVE_STRCHR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strstr' function. */
#define HAVE_STRSTR 1
/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1
/* Define to 1 if <netinet/in.h> defines `struct sockaddr_storage' */
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <sys/mman.h> header file. */
#define HAVE_SYS_MMAN_H 1
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#define HAVE_SYS_WAIT_H 1
/* Define to 1 if you have the `uname' function. */
#define HAVE_UNAME 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `vfork' function. */
#define HAVE_VFORK 1
/* Define to 1 if you have the <vfork.h> header file. */
/* #undef HAVE_VFORK_H */
/* Define to 1 if `fork' works. */
#define HAVE_WORKING_FORK 1
/* Define to 1 if `vfork' works. */
#define HAVE_WORKING_VFORK 1
/* Define to 1 if the system has the type `_Bool'. */
#define HAVE__BOOL 1
/* Define to 1 if `h_errno' is declared by <netdb.h> */
#define H_ERRNO_DECLARED 1
/* Name of package */
#define PACKAGE "netperf"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME "netperf"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "netperf 2.4.4"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "netperf"
/* Define to the version of this package. */
#define PACKAGE_VERSION "2.4.4"
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void
/* Define to the type of arg 1 for `select'. */
#define SELECT_TYPE_ARG1 int
/* Define to the type of args 2, 3 and 4 for `select'. */
#define SELECT_TYPE_ARG234 (fd_set *)
/* Define to the type of arg 5 for `select'. */
#define SELECT_TYPE_ARG5 (struct timeval *)
/* Define to 1 if the `setpgrp' function takes no argument. */
#define SETPGRP_VOID 1
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Use Solaris's kstat interface to measure CPU util. */
/* #undef USE_KSTAT */
/* Use looper/soaker processes to measure CPU util. */
/* #undef USE_LOOPER */
/* Use MacOS X's host_info interface to measure CPU util. */
/* #undef USE_OSX */
/* Use AIX's perfstat interface to measure CPU util. */
/* #undef USE_PERFSTAT */
/* Use Linux's procstat interface to measure CPU util. */
/* #undef USE_PROC_STAT */
/* Use HP-UX's pstat interface to measure CPU util. */
/* #undef USE_PSTAT */
/* Use FreeBSD's sysctl interface to measure CPU util. */
/* #undef USE_SYSCTL */
/* Version number of package */
#define VERSION "2.4.4"
/* Define to one to enable demo support. May affect results. */
/* #undef WANT_DEMO */
/* Define to one to include DLPI tests. */
/* #undef WANT_DLPI */
/* Define to one to enable initial _RR burst support. May affect results. */
/* #undef WANT_FIRST_BURST */
/* Define to one to enable histogram support. May affect results. */
/* #undef WANT_HISTOGRAM */
/* Define to one to enable paced operation support. May affect results. */
/* #undef WANT_INTERVALS */
/* Define to one to include SCTP tests. */
/* #undef WANT_SCTP */
/* Define to one to include SDP tests. */
/* #undef WANT_SDP */
/* Define to one to spin waiting on paced operation. WILL AFFEFCT CPU
UTILIZATION */
/* #undef WANT_SPIN */
/* Define to one to include Unix Domain socket tests. */
#define WANT_UNIX
/* Define to one to include XTI tests. */
/* #undef WANT_XTI */
/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* type to use in place of socklen_t if not defined */
#define netperf_socklen_t size_t
/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define to `int' if <sys/types.h> does not define. */
/* #undef pid_t */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define as `fork' if `vfork' does not work. */
/* #undef vfork */
-116
View File
@@ -1,116 +0,0 @@
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
/* hist.h
Given a time difference in microseconds, increment one of 61
different buckets:
0 - 9 in increments of 1 usec
0 - 9 in increments of 10 usecs
0 - 9 in increments of 100 usecs
0 - 9 in increments of 1 msec
0 - 9 in increments of 10 msecs
0 - 9 in increments of 100 msecs
0 - 9 in increments of 1 sec
0 - 9 in increments of 10 sec
> 100 secs
This will allow any time to be recorded to within an accuracy of
10%, and provides a compact representation for capturing the
distribution of a large number of time differences (e.g.
request-response latencies).
Colin Low 10/6/93
Rick Jones 2004-06-15 - extend to 1 and 10 usec
*/
#ifndef _HIST_INCLUDED
#define _HIST_INCLUDED
#ifdef IRIX
#include <sys/time.h>
#endif /* IRIX */
#if defined(HAVE_GET_HRT)
#include "hrt.h"
#endif
struct histogram_struct {
int unit_usec[10];
int ten_usec[10];
int hundred_usec[10];
int unit_msec[10];
int ten_msec[10];
int hundred_msec[10];
int unit_sec[10];
int ten_sec[10];
int ridiculous;
int total;
};
typedef struct histogram_struct *HIST;
/*
HIST_new - return a new, cleared histogram data type
*/
HIST HIST_new(void);
/*
HIST_clear - reset a histogram by clearing all totals to zero
*/
void HIST_clear(HIST h);
/*
HIST_add - add a time difference to a histogram. Time should be in
microseconds.
*/
void HIST_add(register HIST h, int time_delta);
/*
HIST_report - create an ASCII report on the contents of a histogram.
Currently printsto standard out
*/
void HIST_report(HIST h);
/*
HIST_timestamp - take a timestamp suitable for use in a histogram.
*/
#ifdef HAVE_GETHRTIME
void HIST_timestamp(hrtime_t *timestamp);
#elif defined(HAVE_GET_HRT)
void HIST_timestamp(hrt_t *timestamp);
#elif defined(WIN32)
void HIST_timestamp(LARGE_INTEGER *timestamp);
#else
void HIST_timestamp(struct timeval *timestamp);
#endif
/*
delta_micro - calculate the difference in microseconds between two
timestamps
*/
#ifdef HAVE_GETHRTIME
int delta_micro(hrtime_t *begin, hrtime_t *end);
#elif defined(HAVE_GET_HRT)
int delta_micro(hrt_t *begin, hrt_t *end);
#elif defined(WIN32)
int delta_micro(LARGE_INTEGER *begin, LARGE_INTEGER *end);
#else
int delta_micro(struct timeval *begin, struct timeval *end);
#endif
#endif
-19
View File
@@ -1,19 +0,0 @@
/* This should define all the common routines etc exported by the
various netcpu_mumble.c files raj 2005-01-26 */
extern void cpu_util_init(void);
extern void cpu_util_terminate(void);
extern int get_cpu_method();
#ifdef WIN32
/* +*+ temp until I figure out what header this is in; I know it's
there someplace... */
typedef unsigned __int64 uint64_t;
#endif
extern void get_cpu_idle(uint64_t *res);
extern float calibrate_idle_rate(int iterations, int interval);
extern float calc_cpu_util_internal(float elapsed);
extern void cpu_start_internal(void);
extern void cpu_stop_internal(void);
-67
View File
@@ -1,67 +0,0 @@
char netcpu_none_id[]="\
@(#)netcpu_none.c (c) Copyright 2005, Hewlett-Packard Company, Version 2.4.0";
#if HAVE_CONFIG_H
# include "config.h"
#endif
#include <stdio.h>
#if HAVE_INTTYPES_H
# include <inttypes.h>
#else
# if HAVE_STDINT_H
# include <stdint.h>
# endif
#endif
#include "netsh.h"
#include "netlib.h"
void
cpu_util_init(void)
{
return;
}
void
cpu_util_terminate(void)
{
return;
}
int
get_cpu_method(void)
{
return CPU_UNKNOWN;
}
void
get_cpu_idle(uint64_t *res)
{
return;
}
float
calibrate_idle_rate(int iterations, int interval)
{
return 0.0;
}
float
calc_cpu_util_internal(float elapsed_time)
{
return -1.0;
}
void
cpu_start_internal(void)
{
return;
}
void
cpu_stop_internal(void)
{
return;
}
File diff suppressed because it is too large Load Diff
-621
View File
@@ -1,621 +0,0 @@
/*
Copyright (C) 1993-2005 Hewlett-Packard Company
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#if defined(HAVE_SYS_SOCKET_H)
# include <sys/socket.h>
#endif
#if defined(HAVE_NETDB_H)
# include <netdb.h>
#endif
#if !defined(HAVE_GETADDRINFO) || !defined(HAVE_GETNAMEINFO)
# include "missing/getaddrinfo.h"
#endif
#define PAD_TIME 4
/* library routine specifc defines */
#define MAXSPECDATA 62 /* how many ints worth of data */
/* can tests send... */
#define MAXTIMES 4 /* how many times may we loop */
/* to calibrate */
#define MAXCPUS 256 /* how many CPU's can we track */
#define MAXMESSAGESIZE 65536
#define MAXALIGNMENT 16384
#define MAXOFFSET 4096
#define DATABUFFERLEN MAXMESSAGESIZE+MAXALIGNMENT+MAXOFFSET
#define DEBUG_ON 1
#define DEBUG_OFF 2
#define DEBUG_OK 3
#define NODE_IDENTIFY 4
#define CPU_CALIBRATE 5
#define DO_TCP_STREAM 10
#define TCP_STREAM_RESPONSE 11
#define TCP_STREAM_RESULTS 12
#define DO_TCP_RR 13
#define TCP_RR_RESPONSE 14
#define TCP_RR_RESULTS 15
#define DO_UDP_STREAM 16
#define UDP_STREAM_RESPONSE 17
#define UDP_STREAM_RESULTS 18
#define DO_UDP_RR 19
#define UDP_RR_RESPONSE 20
#define UDP_RR_RESULTS 21
#define DO_DLPI_CO_STREAM 22
#define DLPI_CO_STREAM_RESPONSE 23
#define DLPI_CO_STREAM_RESULTS 24
#define DO_DLPI_CO_RR 25
#define DLPI_CO_RR_RESPONSE 26
#define DLPI_CO_RR_RESULTS 27
#define DO_DLPI_CL_STREAM 28
#define DLPI_CL_STREAM_RESPONSE 29
#define DLPI_CL_STREAM_RESULTS 30
#define DO_DLPI_CL_RR 31
#define DLPI_CL_RR_RESPONSE 32
#define DLPI_CL_RR_RESULTS 33
#define DO_TCP_CRR 34
#define TCP_CRR_RESPONSE 35
#define TCP_CRR_RESULTS 36
#define DO_STREAM_STREAM 37
#define STREAM_STREAM_RESPONSE 38
#define STREAM_STREAM_RESULTS 39
#define DO_STREAM_RR 40
#define STREAM_RR_RESPONSE 41
#define STREAM_RR_RESULTS 42
#define DO_DG_STREAM 43
#define DG_STREAM_RESPONSE 44
#define DG_STREAM_RESULTS 45
#define DO_DG_RR 46
#define DG_RR_RESPONSE 47
#define DG_RR_RESULTS 48
#define DO_FORE_STREAM 49
#define FORE_STREAM_RESPONSE 50
#define FORE_STREAM_RESULTS 51
#define DO_FORE_RR 52
#define FORE_RR_RESPONSE 53
#define FORE_RR_RESULTS 54
#define DO_HIPPI_STREAM 55
#define HIPPI_STREAM_RESPONSE 56
#define HIPPI_STREAM_RESULTS 57
#define DO_HIPPI_RR 52
#define HIPPI_RR_RESPONSE 53
#define HIPPI_RR_RESULTS 54
#define DO_XTI_TCP_STREAM 55
#define XTI_TCP_STREAM_RESPONSE 56
#define XTI_TCP_STREAM_RESULTS 57
#define DO_XTI_TCP_RR 58
#define XTI_TCP_RR_RESPONSE 59
#define XTI_TCP_RR_RESULTS 60
#define DO_XTI_UDP_STREAM 61
#define XTI_UDP_STREAM_RESPONSE 62
#define XTI_UDP_STREAM_RESULTS 63
#define DO_XTI_UDP_RR 64
#define XTI_UDP_RR_RESPONSE 65
#define XTI_UDP_RR_RESULTS 66
#define DO_XTI_TCP_CRR 67
#define XTI_TCP_CRR_RESPONSE 68
#define XTI_TCP_CRR_RESULTS 69
#define DO_TCP_TRR 70
#define TCP_TRR_RESPONSE 71
#define TCP_TRR_RESULTS 72
#define DO_TCP_NBRR 73
#define TCP_NBRR_RESPONSE 74
#define TCP_NBRR_RESULTS 75
#define DO_TCPIPV6_STREAM 76
#define TCPIPV6_STREAM_RESPONSE 77
#define TCPIPV6_STREAM_RESULTS 78
#define DO_TCPIPV6_RR 79
#define TCPIPV6_RR_RESPONSE 80
#define TCPIPV6_RR_RESULTS 81
#define DO_UDPIPV6_STREAM 82
#define UDPIPV6_STREAM_RESPONSE 83
#define UDPIPV6_STREAM_RESULTS 84
#define DO_UDPIPV6_RR 85
#define UDPIPV6_RR_RESPONSE 86
#define UDPIPV6_RR_RESULTS 87
#define DO_TCPIPV6_CRR 88
#define TCPIPV6_CRR_RESPONSE 89
#define TCPIPV6_CRR_RESULTS 90
#define DO_TCPIPV6_TRR 91
#define TCPIPV6_TRR_RESPONSE 92
#define TCPIPV6_TRR_RESULTS 93
#define DO_TCP_MAERTS 94
#define TCP_MAERTS_RESPONSE 95
#define TCP_MAERTS_RESULTS 96
#define DO_LWPSTR_STREAM 100
#define LWPSTR_STREAM_RESPONSE 110
#define LWPSTR_STREAM_RESULTS 120
#define DO_LWPSTR_RR 130
#define LWPSTR_RR_RESPONSE 140
#define LWPSTR_RR_RESULTS 150
#define DO_LWPDG_STREAM 160
#define LWPDG_STREAM_RESPONSE 170
#define LWPDG_STREAM_RESULTS 180
#define DO_LWPDG_RR 190
#define LWPDG_RR_RESPONSE 200
#define LWPDG_RR_RESULTS 210
#define DO_TCP_CC 300
#define TCP_CC_RESPONSE 301
#define TCP_CC_RESULTS 302
/* The DNS_RR test has been removed from netperf but we leave these
here for historical purposes. Those wanting to do DNS_RR tests
should use netperf4 instead. */
#define DO_DNS_RR 400
#define DNS_RR_RESPONSE 401
#define DNS_RR_RESULTS 402
#define DO_SCTP_STREAM 500
#define SCTP_STREAM_RESPONSE 501
#define SCTP_STREAM_RESULT 502
#define DO_SCTP_STREAM_MANY 510
#define SCTP_STREAM_MANY_RESPONSE 511
#define SCTP_STREAM_MANY_RESULT 512
#define DO_SCTP_RR 520
#define SCTP_RR_RESPONSE 521
#define SCTP_RR_RESULT 502
#define DO_SCTP_RR_MANY 530
#define SCTP_RR_MANY_RESPONSE 531
#define SCTP_RR_MANY_RESULT 532
#define DO_SDP_STREAM 540
#define SDP_STREAM_RESPONSE 541
#define SDP_STREAM_RESULTS 542
#define DO_SDP_RR 543
#define SDP_RR_RESPONSE 544
#define SDP_RR_RESULTS 545
#define DO_SDP_MAERTS 546
#define SDP_MAERTS_RESPONSE 547
#define SDP_MAERTS_RESULTS 548
#define DO_SDP_CRR 549
#define SDP_CRR_RESPONSE 550
#define SDP_CRR_RESULTS 551
#define DO_SDP_CC 552
#define SDP_CC_RESPONSE 553
#define SDP_CC_RESULTS 554
#if HAVE_INTTYPES_H
# include <inttypes.h>
#else
# if HAVE_STDINT_H
# include <stdint.h>
# endif
#endif
enum sock_buffer{
SEND_BUFFER,
RECV_BUFFER
};
/* some of the fields in these structures are going to be doubles and */
/* such. so, we probably want to ensure that they will start on */
/* "double" boundaries. this will break compatability to pre-2.1 */
/* releases, but then, backwards compatability has never been a */
/* stated goal of netperf. raj 11/95 */
union netperf_request_struct {
struct {
int request_type;
int dummy;
int test_specific_data[MAXSPECDATA];
} content;
double dummy;
};
union netperf_response_struct {
struct {
int response_type;
int serv_errno;
int test_specific_data[MAXSPECDATA];
} content;
double dummy;
};
struct ring_elt {
struct ring_elt *next; /* next element in the ring */
char *buffer_base; /* in case we have to free it at somepoint */
char *buffer_ptr; /* the aligned and offset pointer */
};
/* +*+ SAF Sorry about the hacks with errno; NT made me do it :(
WinNT does define an errno.
It is mostly a legacy from the XENIX days.
Depending upon the version of the C run time that is linked in, it is
either a simple variable (like UNIX code expects), but more likely it
is the address of a procedure to return the error number. So any
code that sets errno is likely to be overwriting the address of this
procedure. Worse, only a tiny fraction of NT's errors get set
through errno.
So I have changed the netperf code to use a define Set_errno when
that is it's intent. On non-windows platforms this is just an
assignment to errno. But on NT this calls SetLastError.
I also define errno (now only used on right side of assignments)
on NT to be GetLastError.
Similarly, perror is defined on NT, but it only accesses the same
XENIX errors that errno covers. So on NT this is redefined to be
Perror and it expands all GetLastError texts. */
#ifdef WIN32
/* INVALID_SOCKET == INVALID_HANDLE_VALUE == (unsigned int)(~0) */
/* SOCKET_ERROR == -1 */
#define ENOTSOCK WSAENOTSOCK
#define EINTR WSAEINTR
#define ENOBUFS WSAENOBUFS
#define EWOULDBLOCK WSAEWOULDBLOCK
#define EAFNOSUPPORT WSAEAFNOSUPPORT
/* I don't use a C++ style of comment because it upsets some C
compilers, possibly even when it is inside an ifdef WIN32... */
/* from public\sdk\inc\crt\errno.h */
#define ENOSPC 28
#ifdef errno
/* delete the one from stdlib.h */
/*#define errno (*_errno()) */
#undef errno
#endif
#define errno GetLastError()
#define Set_errno(num) SetLastError((num))
#define perror(text) PrintWin32Error(stderr, (text))
#define Print_errno(stream, text) PrintWin32Error((stream), (text))
extern void PrintWin32Error(FILE *stream, LPSTR text);
#if !defined(NT_PERF) && !defined(USE_LOOPER)
#define NT_PERF
#endif
#else
/* Really shouldn't use manifest constants! */
/*+*+SAF There are other examples of "== -1" and "<0" that probably */
/*+*+SAF should be cleaned up as well. */
#define INVALID_SOCKET -1
#define SOCKET_ERROR -1
#define SOCKET int
#define Set_errno(num) errno = (num)
#define Print_errno(stream, text) fprintf((stream), "%s errno %d\n", (text), errno)
#endif
/* Robin & Rick's kludge to try to have a timer signal EINTR by closing */
/* the socket from another thread can also return several other errors. */
/* Let's define a macro to hide all of this. */
#ifndef WIN32
#define SOCKET_EINTR(return_value) (errno == EINTR)
#define SOCKET_EADDRINUSE(return_value) (errno == EADDRINUSE)
#define SOCKET_EADDRNOTAVAIL(return_value) (errno == EADDRNOTAVAIL)
#else
/* not quite sure I like the extra cases for WIN32 but that is what my
WIN32 expert sugested. I'm not sure what WSA's to put for
EADDRINUSE */
#define SOCKET_EINTR(return_value) \
(((return_value) == SOCKET_ERROR) && \
((errno == EINTR) || \
(errno == WSAECONNABORTED) || \
(errno == WSAECONNRESET) ))
#define SOCKET_EADDRINUSE(return_value) \
(((return_value) == SOCKET_ERROR) && \
((errno == WSAEADDRINUSE) ))
#define SOCKET_EADDRNOTAVAIL(return_value) \
(((return_value) == SOCKET_ERROR) && \
((errno == WSAEADDRNOTAVAIL) ))
#endif
#ifdef HAVE_SENDFILE
struct sendfile_ring_elt {
struct sendfile_ring_elt *next; /* next element in the ring */
int fildes; /* the file descriptor of the source
file */
off_t offset; /* the offset from the beginning of
the file for this send */
size_t length; /* the number of bytes to send -
this is redundant with the
send_size variable but I decided
to include it anyway */
struct iovec *hdtrl; /* a pointer to a header/trailer
that we do not initially use and
so should be set to NULL when the
ring is setup. */
int flags; /* the flags to pass to sendfile() -
presently unused and should be
set to zero when the ring is
setup. */
};
#endif /* HAVE_SENDFILE */
/* the diferent codes to denote the type of CPU utilization */
/* methods used */
#define CPU_UNKNOWN 0
#define HP_IDLE_COUNTER 1
#define PSTAT 2
#define TIMES 3
#define LOOPER 4
#define GETRUSAGE 5
#define NT_METHOD 6
#define KSTAT 7
#define PROC_STAT 8
#define SYSCTL 9
#define PERFSTAT 10
#define KSTAT_10 11
#define OSX 12
#define BADCH ('?')
#ifndef NETLIB
#ifdef WIN32
#ifndef _GETOPT_
#define _GETOPT_
int getopt(int argc, char **argv, char *optstring);
extern char *optarg; /* returned arg to go with this option */
extern int optind; /* index to next argv element to process */
extern int opterr; /* should error messages be printed? */
extern int optopt; /* */
#endif /* _GETOPT_ */
extern SOCKET win_kludge_socket, win_kludge_socket2;
#endif /* WIN32 */
extern int local_proc_affinity, remote_proc_affinity;
/* these are to allow netperf to be run easily through those evil,
end-to-end breaking things known as firewalls */
extern char local_data_port[10];
extern char remote_data_port[10];
extern char *local_data_address;
extern char *remote_data_address;
extern int local_data_family;
extern int remote_data_family;
extern union netperf_request_struct netperf_request;
extern union netperf_response_struct netperf_response;
extern float lib_local_cpu_util;
extern float lib_elapsed;
extern float lib_local_maxrate;
extern char libfmt;
extern int cpu_method;
extern int lib_num_loc_cpus;
extern int lib_num_rem_cpus;
extern SOCKET server_sock;
extern int times_up;
extern FILE *where;
extern int loops_per_msec;
extern float lib_local_per_cpu_util[];
extern void netlib_init();
extern int netlib_get_page_size();
extern void install_signal_catchers();
extern void establish_control(char hostname[],
char port[],
int af,
char local_hostname[],
char local_port[],
int local_af);
extern void shutdown_control();
extern void init_stat();
extern void send_request();
extern void recv_response();
extern void send_response();
extern void recv_request();
extern void dump_request();
extern void dump_addrinfo(FILE *dumploc, struct addrinfo *info,
char *host, char *port, int family);
extern void start_timer(int time);
extern void stop_timer();
extern void cpu_start(int measure_cpu);
extern void cpu_stop(int measure_cpu, float *elapsed);
extern void calculate_confidence(int confidence_iterations,
float time,
double result,
float loc_cpu,
float rem_cpu,
float loc_sd,
float rem_sd);
extern void retrieve_confident_values(float *elapsed_time,
double *thruput,
float *local_cpu_utilization,
float *remote_cpu_utilization,
float *local_service_demand,
float *remote_service_demand);
extern void display_confidence();
extern void set_sock_buffer(SOCKET sd,
enum sock_buffer which,
int requested_size,
int *effective_sizep);
extern char *format_units();
extern char *inet_ftos(int family);
extern char *inet_ttos(int type);
extern char *inet_ptos(int protocol);
extern double ntohd(double net_double);
extern double htond(double host_double);
extern int inet_nton(int af, const void *src, char *dst, int cnt);
extern void libmain();
extern double calc_thruput(double units_received);
extern double calc_thruput_interval(double units_received,double elapsed);
extern double calc_thruput_omni(double units_received);
extern double calc_thruput_interval_omni(double units_received,double elapsed);
extern float calibrate_local_cpu(float local_cpu_rate);
extern float calibrate_remote_cpu();
extern void bind_to_specific_processor(int processor_affinity,int use_cpu_map);
extern int set_nonblock (SOCKET sock);
#ifndef WIN32
/* WIN32 requires that at least one of the file sets to select be
non-null. Since msec_sleep routine is only called by nettest_dlpi &
nettest_unix, let's duck this issue. */
extern int msec_sleep( int msecs );
#endif /* WIN32 */
extern float calc_cpu_util(float elapsed_time);
extern float calc_service_demand(double units_sent,
float elapsed_time,
float cpu_utilization,
int num_cpus);
extern float calc_service_demand_trans(double units_sent,
float elapsed_time,
float cpu_utilization,
int num_cpus);
#if defined(__hpux)
extern void catcher(int, siginfo_t *,void *);
#else
extern void catcher(int);
#endif /* __hpux */
extern struct ring_elt *allocate_buffer_ring();
extern void access_buffer(char *buffer_ptr,
int length,
int dirty_count,
int clean_count);
#ifdef HAVE_ICSC_EXS
extern struct ring_elt *allocate_exs_buffer_ring();
#endif /* HAVE_ICSC_EXS */
#ifdef HAVE_SENDFILE
extern struct sendfile_ring_elt *alloc_sendfile_buf_ring();
#endif /* HAVE_SENDFILE */
#ifdef WANT_DLPI
/* it seems that AIX in its finite wisdom has some bogus define in an
include file which defines "rem_addr" which then screws-up this extern
unless we change the names to protect the guilty. reported by Eric
Jones */
extern int dl_connect(int fd, unsigned char *remote_addr, int remote_addr_len);
extern int dl_bind(int fd, int sap, int mode, char *dlsap_ptr, int *dlsap_len);
extern int dl_open(char devfile[], int ppa);
#endif /* WANT_DLPI */
extern char format_cpu_method(int method);
extern unsigned int convert(char *string);
extern unsigned int convert_timespec(char *string);
#ifdef WANT_INTERVALS
extern void start_itimer(unsigned int interval_len_msec);
#endif
/* these are all for the confidence interval stuff */
extern double confidence;
#endif
#ifdef WIN32
#define close(x) closesocket(x)
#define strcasecmp(a,b) _stricmp(a,b)
#define getpid() ((int)GetCurrentProcessId())
#endif
#ifdef WIN32
#if 0
/* Should really use safe string functions; but not for now... */
#include <strsafe.h>
/* Microsoft has deprecated _snprintf; it isn't guarenteed to null terminate the result buffer. */
/* They want us to call StringCbPrintf instead; it always null terminates the string. */
#endif
#define snprintf _snprintf
#endif
/* Define a macro to align a buffer with an offset from a power of 2
boundary. */
#ifndef WIN32
#define ULONG_PTR unsigned long
#endif
#define ALIGN_BUFFER(BufPtr, Align, Offset) \
(char *)(( (ULONG_PTR)(BufPtr) + \
(ULONG_PTR) (Align) -1) & \
~((ULONG_PTR) (Align) - 1)) + (ULONG_PTR)(Offset)
/* if your system has bcopy and bzero, include it here, otherwise, we */
/* will try to use memcpy aand memset. fix from Bruce Barnett @ GE. */
#if defined(hpux) || defined (__VMS)
#define HAVE_BCOPY
#define HAVE_BZERO
#endif
#ifdef WIN32
#define HAVE_MIN
#else
#define _stdcall
#define _cdecl
#endif
#ifndef HAVE_BCOPY
#define bcopy(s,d,h) memcpy((d),(s),(h))
#endif /* HAVE_BCOPY */
#ifndef HAVE_BZERO
#define bzero(p,h) memset((p),0,(h))
#endif /* HAVE_BZERO */
#ifndef HAVE_MIN
#define min(a,b) ((a < b) ? a : b)
#endif /* HAVE_MIN */
#ifdef USE_PERFSTAT
# include <libperfstat.h>
#endif
-284
View File
@@ -1,284 +0,0 @@
/*
Copyright (C) 1993-2007 Hewlett-Packard Company
ALL RIGHTS RESERVED.
The enclosed software and documentation includes copyrighted works
of Hewlett-Packard Co. For as long as you comply with the following
limitations, you are hereby authorized to (i) use, reproduce, and
modify the software and documentation, and to (ii) distribute the
software and documentation, including modifications, for
non-commercial purposes only.
1. The enclosed software and documentation is made available at no
charge in order to advance the general development of
high-performance networking products.
2. You may not delete any copyright notices contained in the
software or documentation. All hard copies, and copies in
source code or object code form, of the software or
documentation (including modifications) must contain at least
one of the copyright notices.
3. The enclosed software and documentation has not been subjected
to testing and quality control and is not a Hewlett-Packard Co.
product. At a future time, Hewlett-Packard Co. may or may not
offer a version of the software and documentation as a product.
4. THE SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS".
HEWLETT-PACKARD COMPANY DOES NOT WARRANT THAT THE USE,
REPRODUCTION, MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR
DOCUMENTATION WILL NOT INFRINGE A THIRD PARTY'S INTELLECTUAL
PROPERTY RIGHTS. HP DOES NOT WARRANT THAT THE SOFTWARE OR
DOCUMENTATION IS ERROR FREE. HP DISCLAIMS ALL WARRANTIES,
EXPRESS AND IMPLIED, WITH REGARD TO THE SOFTWARE AND THE
DOCUMENTATION. HP SPECIFICALLY DISCLAIMS ALL WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
5. HEWLETT-PACKARD COMPANY WILL NOT IN ANY EVENT BE LIABLE FOR ANY
DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
(INCLUDING LOST PROFITS) RELATED TO ANY USE, REPRODUCTION,
MODIFICATION, OR DISTRIBUTION OF THE SOFTWARE OR DOCUMENTATION.
*/
char netperf_id[]="\
@(#)netperf.c (c) Copyright 1993-2007 Hewlett-Packard Company. Version 2.4.3";
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
/* FreeBSD doesn't like socket.h before types are set. */
#if __FreeBSD__
# include <sys/types.h>
#endif
#ifndef WIN32
/* this should only be temporary */
#include <sys/socket.h>
#endif
#ifdef WIN32
#include <winsock2.h>
#include <windows.h>
#endif /* WIN32 */
#include "netsh.h"
#include "netlib.h"
#include "nettest_bsd.h"
#ifdef WANT_UNIX
#include "nettest_unix.h"
#endif /* WANT_UNIX */
#ifdef WANT_XTI
#include "nettest_xti.h"
#endif /* WANT_XTI */
#ifdef WANT_DLPI
#include "nettest_dlpi.h"
#endif /* WANT_DLPI */
#ifdef WANT_SDP
#include "nettest_sdp.h"
#endif
/* The DNS tests have been removed from netperf2. Those wanting to do
DNS_RR tests should use netperf4 instead. */
#ifdef DO_DNS
#error DNS tests have been removed from netperf. Use netperf4 instead
#endif /* DO_DNS */
#ifdef WANT_SCTP
#include "nettest_sctp.h"
#endif
/* this file contains the main for the netperf program. all the other */
/* routines can be found in the file netsh.c */
int _cdecl
main(int argc, char *argv[])
{
#ifdef WIN32
WSADATA wsa_data ;
/* Initialize the winsock lib ( version 2.2 ) */
if ( WSAStartup(MAKEWORD(2,2), &wsa_data) == SOCKET_ERROR ){
printf("WSAStartup() failed : %d\n", GetLastError()) ;
return 1 ;
}
#endif /* WIN32 */
netlib_init();
set_defaults();
scan_cmd_line(argc,argv);
if (debug) {
dump_globals();
install_signal_catchers();
}
if (debug) {
printf("remotehost is %s and port %s\n",host_name,test_port);
fflush(stdout);
}
if (!no_control) {
establish_control(host_name,test_port,address_family,
local_host_name,local_test_port,local_address_family);
}
if (strcasecmp(test_name,"TCP_STREAM") == 0) {
send_tcp_stream(host_name);
}
else if (strcasecmp(test_name,"TCP_MAERTS") == 0) {
send_tcp_maerts(host_name);
}
#ifdef HAVE_ICSC_EXS
else if (strcasecmp(test_name,"EXS_TCP_STREAM") == 0) {
send_exs_tcp_stream(host_name);
}
#endif /* HAVE_ICSC_EXS */
#ifdef HAVE_SENDFILE
else if (strcasecmp(test_name,"TCP_SENDFILE") == 0) {
sendfile_tcp_stream(host_name);
}
#endif /* HAVE_SENDFILE */
else if (strcasecmp(test_name,"TCP_RR") == 0) {
send_tcp_rr(host_name);
}
else if (strcasecmp(test_name,"TCP_CRR") == 0) {
send_tcp_conn_rr(host_name);
}
else if (strcasecmp(test_name,"TCP_CC") == 0) {
send_tcp_cc(host_name);
}
#ifdef DO_1644
else if (strcasecmp(test_name,"TCP_TRR") == 0) {
send_tcp_tran_rr(host_name);
}
#endif /* DO_1644 */
#ifdef DO_NBRR
else if (strcasecmp(test_name,"TCP_NBRR") == 0) {
send_tcp_nbrr(host_name);
}
#endif /* DO_NBRR */
else if (strcasecmp(test_name,"UDP_STREAM") == 0) {
send_udp_stream(host_name);
}
else if (strcasecmp(test_name,"UDP_RR") == 0) {
send_udp_rr(host_name);
}
else if (strcasecmp(test_name,"LOC_CPU") == 0) {
loc_cpu_rate();
}
else if (strcasecmp(test_name,"REM_CPU") == 0) {
rem_cpu_rate();
}
#ifdef WANT_DLPI
else if (strcasecmp(test_name,"DLCO_RR") == 0) {
send_dlpi_co_rr(host_name);
}
else if (strcasecmp(test_name,"DLCL_RR") == 0) {
send_dlpi_cl_rr(host_name);
}
else if (strcasecmp(test_name,"DLCO_STREAM") == 0) {
send_dlpi_co_stream(host_name);
}
else if (strcasecmp(test_name,"DLCL_STREAM") == 0) {
send_dlpi_cl_stream(host_name);
}
#endif /* WANT_DLPI */
#ifdef WANT_UNIX
else if (strcasecmp(test_name,"STREAM_RR") == 0) {
send_stream_rr(host_name);
}
else if (strcasecmp(test_name,"DG_RR") == 0) {
send_dg_rr(host_name);
}
else if (strcasecmp(test_name,"STREAM_STREAM") == 0) {
send_stream_stream(host_name);
}
else if (strcasecmp(test_name,"DG_STREAM") == 0) {
send_dg_stream(host_name);
}
#endif /* WANT_UNIX */
#ifdef WANT_XTI
else if (strcasecmp(test_name,"XTI_TCP_STREAM") == 0) {
send_xti_tcp_stream(host_name);
}
else if (strcasecmp(test_name,"XTI_TCP_RR") == 0) {
send_xti_tcp_rr(host_name);
}
else if (strcasecmp(test_name,"XTI_UDP_STREAM") == 0) {
send_xti_udp_stream(host_name);
}
else if (strcasecmp(test_name,"XTI_UDP_RR") == 0) {
send_xti_udp_rr(host_name);
}
#endif /* WANT_XTI */
#ifdef WANT_SCTP
else if (strcasecmp(test_name, "SCTP_STREAM") == 0) {
send_sctp_stream(host_name);
}
else if (strcasecmp(test_name, "SCTP_RR") == 0) {
send_sctp_rr(host_name);
}
else if (strcasecmp(test_name, "SCTP_STREAM_MANY") == 0) {
send_sctp_stream_1toMany(host_name);
}
else if (strcasecmp(test_name, "SCTP_RR_MANY") == 0) {
send_sctp_stream_1toMany(host_name);
}
#endif
#ifdef DO_DNS
else if (strcasecmp(test_name,"DNS_RR") == 0) {
fprintf(stderr,
"DNS tests can now be found in netperf4.\n");
fflush(stderr);
exit(-1);
}
#endif /* DO_DNS */
#ifdef WANT_SDP
else if (strcasecmp(test_name,"SDP_STREAM") == 0) {
send_sdp_stream(host_name);
}
else if (strcasecmp(test_name,"SDP_MAERTS") == 0) {
send_sdp_maerts(host_name);
}
else if (strcasecmp(test_name,"SDP_RR") == 0) {
send_sdp_rr(host_name);
}
#endif /* WANT_SDP */
else {
printf("The test you requested is unknown to this netperf.\n");
printf("Please verify that you have the correct test name, \n");
printf("and that test family has been compiled into this netperf.\n");
exit(1);
}
if (!no_control) {
shutdown_control();
}
#ifdef WIN32
/* Cleanup the winsock lib */
WSACleanup();
#endif
return(0);
}
@@ -1 +0,0 @@
#define NETPERF_VERSION "2.4.4"
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-149
View File
@@ -1,149 +0,0 @@
/*
Copyright (C) 1993,1995 Hewlett-Packard Company
*/
/* libraried performance include file */
/* the define NOPERFEXTERN tels us not to re-define all the */
/* defines and defaults */
#define HOSTNAMESIZE 255
#define PORTBUFSIZE 10
#define DEFAULT_SIZE 32768
#define HOST_NAME "127.0.0.1"
#define TEST_PORT "12865"
/* output controlling variables */
#define DEBUG 0 /* debugging level */
#define VERBOSITY 0 /* verbosity level */
/* the end-test conditions for the tests - either transactions, bytes, */
/* or time. different vars used for clarity - space is cheap ;-) */
#define TEST_TIME 10 /* test ends by time */
#define TEST_BYTES 0 /* test ends on byte count */
#define TEST_TRANS 0 /* test ends on tran count */
/* the alignment conditions for the tests */
#define LOC_RECV_ALIGN 4 /* alignment for local receives */
#define LOC_SEND_ALIGN 4 /* alignment for local sends */
#define REM_RECV_ALIGN 4 /* alignment for remote receive */
#define REM_SEND_ALIGN 4 /* alignment for remote sends */
/* misc defines for the hell of it */
#ifndef MAXLONG
#define MAXLONG 4294967295UL
#endif /* MAXLONG */
#ifndef NETSH
extern char *program; /* program invocation name */
/* stuff to say where this test is going */
extern char host_name[HOSTNAMESIZE];/* remote host name or ip addr */
extern char local_host_name[HOSTNAMESIZE];
extern char test_port[PORTBUFSIZE]; /* where is the test waiting */
extern char local_test_port[PORTBUFSIZE];
extern int address_family;
extern int local_address_family;
extern int parse_address_family(char family_string[]);
extern void set_defaults();
extern void scan_cmd_line(int argc, char *argv[]);
extern void dump_globals();
extern void break_args(char *s, char *arg1, char *arg2);
extern void break_args_explicit(char *s, char *arg1, char *arg2);
extern void print_netserver_usage();
/* output controlling variables */
extern int
debug, /* debugging level */
print_headers, /* do/don't print test headers */
verbosity; /* verbosity level */
/* the end-test conditions for the tests - either transactions, bytes, */
/* or time. different vars used for clarity - space is cheap ;-) */
extern int
test_time, /* test ends by time */
test_len_ticks,
test_bytes, /* test ends on byte count */
test_trans; /* test ends on tran count */
/* the alignment conditions for the tests */
extern int
local_recv_align, /* alignment for local receives */
local_send_align, /* alignment for local sends */
remote_recv_align, /* alignment for remote receives */
remote_send_align, /* alignment for remote sends */
local_send_offset,
local_recv_offset,
remote_send_offset,
remote_recv_offset;
#if defined(WANT_INTERVALS) || defined(WANT_DEMO)
extern int interval_usecs;
extern int interval_wate;
extern int interval_burst;
extern int demo_mode;
extern double demo_interval;
extern double demo_units;
extern double units_this_tick;
#endif
#ifdef DIRTY
extern int rem_dirty_count;
extern int rem_clean_count;
extern int loc_dirty_count;
extern int loc_clean_count;
#endif /* DIRTY */
/* stuff for confidence intervals */
extern int confidence_level;
extern int iteration_min;
extern int iteration_max;
extern int result_confidence_only;
extern double interval;
extern int cpu_binding_requested;
/* stuff to controll the bufferspace "width" */
extern int send_width;
extern int recv_width;
/* address family */
extern int af;
/* different options for other things */
extern int
local_cpu_usage,
remote_cpu_usage;
extern float
local_cpu_rate,
remote_cpu_rate;
extern int
shell_num_cpus;
extern char
test_name[BUFSIZ];
extern char
fill_file[BUFSIZ];
extern char *
result_brand;
extern int
no_control;
#ifdef WANT_DLPI
extern int
loc_ppa,
rem_ppa;
extern int
dlpi_sap;
#endif /* WANT_DLPI */
#endif
File diff suppressed because it is too large Load Diff
-471
View File
@@ -1,471 +0,0 @@
/*
Copyright (C) 1993-2004 Hewlett-Packard Company
*/
/* This file contains the test-specific definitions for netperf's BSD */
/* sockets tests */
/* well boys and girls, seems that while AF_INET is "2" and AF_UNSPEC
is "0" the world over, AF_INET6 is different values depending on
the platform... grrr. On HP-UX 11i it is "22" and on Linux 2.6 it
is "10" sooooo... we have to define our own space for netperf to
enable us to pass values around from machine to machine. raj
2005-02-08 */
#define NF_UNSPEC 0
#define NF_INET 4
#define NF_INET6 6
struct tcp_stream_request_struct {
int send_buf_size;
int recv_buf_size; /* how big does the client want it - the */
/* receive socket buffer that is */
int receive_size; /* how many bytes do we want to receive at one */
/* time? */
int recv_alignment; /* what is the alignment of the receive */
/* buffer? */
int recv_offset; /* and at what offset from that alignment? */
int no_delay; /* do we disable the nagle algorithm for send */
/* coalescing? */
int measure_cpu; /* does the client want server cpu utilization */
/* measured? */
float cpu_rate; /* do we know how fast the cpu is already? */
int test_length; /* how long is the test? */
int so_rcvavoid; /* do we want the remote to avoid copies on */
/* receives? */
int so_sndavoid; /* do we want the remote to avoid send copies? */
int dirty_count; /* how many integers in the receive buffer */
/* should be made dirty before calling recv? */
int clean_count; /* how many integers should be read from the */
/* recv buffer before calling recv? */
int port; /* the port to which the recv side should bind
to allow netperf to run through those evil
firewall things */
int ipfamily; /* the address family of ipaddress */
};
struct tcp_stream_response_struct {
int recv_buf_size; /* how big does the client want it */
int receive_size;
int no_delay;
int measure_cpu; /* does the client want server cpu */
int test_length; /* how long is the test? */
int send_buf_size;
int data_port_number; /* connect to me here */
float cpu_rate; /* could we measure */
int so_rcvavoid; /* could the remote avoid receive copies? */
int so_sndavoid; /* could the remote avoid send copies? */
};
struct tcp_stream_results_struct {
double bytes_received;
unsigned int recv_calls;
float elapsed_time; /* how long the test ran */
float cpu_util; /* -1 if not measured */
float serv_dem; /* -1 if not measured */
int cpu_method; /* how was cpu util measured? */
int num_cpus; /* how many CPUs had the remote? */
};
struct tcp_maerts_request_struct {
int send_buf_size;
int recv_buf_size; /* how big does the client want it - the */
/* receive socket buffer that is */
int send_size; /* how many bytes do we want netserver to send
at one time? */
int send_alignment; /* what is the alignment of the send */
/* buffer? */
int send_offset; /* and at what offset from that alignment? */
int no_delay; /* do we disable the nagle algorithm for send */
/* coalescing? */
int measure_cpu; /* does the client want server cpu utilization */
/* measured? */
float cpu_rate; /* do we know how fast the cpu is already? */
int test_length; /* how long is the test? */
int so_rcvavoid; /* do we want the remote to avoid copies on */
/* receives? */
int so_sndavoid; /* do we want the remote to avoid send copies? */
int dirty_count; /* how many integers in the send buffer */
/* should be made dirty before calling recv? */
int clean_count; /* how many integers should be read from the */
/* recv buffer before calling recv? */
int port; /* the port to which the recv side should bind
to allow netperf to run through those evil
firewall things */
int ipfamily;
};
struct tcp_maerts_response_struct {
int recv_buf_size; /* how big does the client want it */
int send_size;
int no_delay;
int measure_cpu; /* does the client want server cpu */
int test_length; /* how long is the test? */
int send_buf_size;
int data_port_number; /* connect to me here */
float cpu_rate; /* could we measure */
int so_rcvavoid; /* could the remote avoid receive copies? */
int so_sndavoid; /* could the remote avoid send copies? */
};
struct tcp_maerts_results_struct {
double bytes_sent;
unsigned int send_calls;
float elapsed_time; /* how long the test ran */
float cpu_util; /* -1 if not measured */
float serv_dem; /* -1 if not measured */
int cpu_method; /* how was cpu util measured? */
int num_cpus; /* how many CPUs had the remote? */
};
struct tcp_rr_request_struct {
int recv_buf_size; /* how big does the client want it */
int send_buf_size;
int recv_alignment;
int recv_offset;
int send_alignment;
int send_offset;
int request_size;
int response_size;
int no_delay;
int measure_cpu; /* does the client want server cpu */
float cpu_rate; /* do we know how fast the cpu is? */
int test_length; /* how long is the test? */
int so_rcvavoid; /* do we want the remote to avoid receive */
/* copies? */
int so_sndavoid; /* do we want the remote to avoid send copies? */
int port; /* the port to which the recv side should bind
to allow netperf to run through those evil
firewall things */
int ipfamily;
};
struct tcp_rr_response_struct {
int recv_buf_size; /* how big does the client want it */
int no_delay;
int measure_cpu; /* does the client want server cpu */
int test_length; /* how long is the test? */
int send_buf_size;
int data_port_number; /* connect to me here */
float cpu_rate; /* could we measure */
int so_rcvavoid; /* could the remote avoid receive copies? */
int so_sndavoid; /* could the remote avoid send copies? */
};
struct tcp_rr_results_struct {
unsigned int bytes_received; /* ignored initially */
unsigned int recv_calls; /* ignored initially */
unsigned int trans_received; /* not ignored */
float elapsed_time; /* how long the test ran */
float cpu_util; /* -1 if not measured */
float serv_dem; /* -1 if not measured */
int cpu_method; /* how was cpu util measured? */
int num_cpus; /* how many CPUs had the remote? */
};
struct tcp_conn_rr_request_struct {
int recv_buf_size; /* how big does the client want it */
int send_buf_size;
int recv_alignment;
int recv_offset;
int send_alignment;
int send_offset;
int request_size;
int response_size;
int no_delay;
int measure_cpu; /* does the client want server cpu */
float cpu_rate; /* do we know how fast the cpu is? */
int test_length; /* how long is the test? */
int so_rcvavoid; /* do we want the remote to avoid receive */
/* copies? */
int so_sndavoid; /* do we want the remote to avoid send copies? */
int port; /* the port to which the recv side should bind
to allow netperf to run through those evil
firewall things */
int ipfamily;
};
struct tcp_conn_rr_response_struct {
int recv_buf_size; /* how big does the client want it */
int no_delay;
int measure_cpu; /* does the client want server cpu */
int test_length; /* how long is the test? */
int send_buf_size;
int data_port_number; /* connect to me here */
float cpu_rate; /* could we measure */
int so_rcvavoid; /* could the remote avoid receive copies? */
int so_sndavoid; /* could the remote avoid send copies? */
};
struct tcp_conn_rr_results_struct {
unsigned int bytes_received; /* ignored initially */
unsigned int recv_calls; /* ignored initially */
unsigned int trans_received; /* not ignored */
float elapsed_time; /* how long the test ran */
float cpu_util; /* -1 if not measured */
float serv_dem; /* -1 if not measured */
int cpu_method; /* how was cpu util measured? */
int num_cpus; /* how many CPUs had the remote? */
};
struct tcp_tran_rr_request_struct {
int recv_buf_size; /* how big does the client want it */
int send_buf_size;
int recv_alignment;
int recv_offset;
int send_alignment;
int send_offset;
int request_size;
int response_size;
int no_delay;
int measure_cpu; /* does the client want server cpu */
float cpu_rate; /* do we know how fast the cpu is? */
int test_length; /* how long is the test? */
int so_rcvavoid; /* do we want the remote to avoid receive */
/* copies? */
int so_sndavoid; /* do we want the remote to avoid send copies? */
int port; /* the port to which the recv side should bind
to allow netperf to run through those evil
firewall things */
int ipfamily;
};
struct tcp_tran_rr_response_struct {
int recv_buf_size; /* how big does the client want it */
int no_delay;
int measure_cpu; /* does the client want server cpu */
int test_length; /* how long is the test? */
int send_buf_size;
int data_port_number; /* connect to me here */
float cpu_rate; /* could we measure */
int so_rcvavoid; /* could the remote avoid receive copies? */
int so_sndavoid; /* could the remote avoid send copies? */
};
struct tcp_tran_rr_results_struct {
unsigned int bytes_received; /* ignored initially */
unsigned int recv_calls; /* ignored initially */
unsigned int trans_received; /* not ignored */
float elapsed_time; /* how long the test ran */
float cpu_util; /* -1 if not measured */
float serv_dem; /* -1 if not measured */
int cpu_method; /* how was cpu util measured? */
int num_cpus; /* how many CPUs had the remote? */
};
struct udp_stream_request_struct {
int recv_buf_size;
int message_size;
int recv_connected;
int recv_alignment;
int recv_offset;
int checksum_off;
int measure_cpu;
float cpu_rate;
int test_length;
int so_rcvavoid; /* do we want the remote to avoid receive */
/* copies? */
int so_sndavoid; /* do we want the remote to avoid send copies? */
int port; /* the port to which the recv side should bind
to allow netperf to run through those evil
firewall things */
int ipfamily;
};
struct udp_stream_response_struct {
int recv_buf_size;
int send_buf_size;
int measure_cpu;
int test_length;
int data_port_number;
float cpu_rate;
int so_rcvavoid; /* could the remote avoid receive copies? */
int so_sndavoid; /* could the remote avoid send copies? */
};
struct udp_stream_results_struct {
unsigned int messages_recvd;
unsigned int bytes_received;
float elapsed_time;
float cpu_util;
int cpu_method; /* how was cpu util measured? */
int num_cpus; /* how many CPUs had the remote? */
};
struct udp_rr_request_struct {
int recv_buf_size; /* how big does the client want it */
int send_buf_size;
int recv_alignment;
int recv_offset;
int send_alignment;
int send_offset;
int request_size;
int response_size;
int no_delay;
int measure_cpu; /* does the client want server cpu */
float cpu_rate; /* do we know how fast the cpu is? */
int test_length; /* how long is the test? */
int so_rcvavoid; /* do we want the remote to avoid receive */
/* copies? */
int so_sndavoid; /* do we want the remote to avoid send copies? */
int port; /* the port to which the recv side should bind
to allow netperf to run through those evil
firewall things */
int ipfamily;
};
struct udp_rr_response_struct {
int recv_buf_size; /* how big does the client want it */
int no_delay;
int measure_cpu; /* does the client want server cpu */
int test_length; /* how long is the test? */
int send_buf_size;
int data_port_number; /* connect to me here */
float cpu_rate; /* could we measure */
int so_rcvavoid; /* could the remote avoid receive copies? */
int so_sndavoid; /* could the remote avoid send copies? */
};
struct udp_rr_results_struct {
unsigned int bytes_received; /* ignored initially */
unsigned int recv_calls; /* ignored initially */
unsigned int trans_received; /* not ignored */
float elapsed_time; /* how long the test ran */
float cpu_util; /* -1 if not measured */
float serv_dem; /* -1 if not measured */
int cpu_method; /* how was cpu util measured? */
int num_cpus; /* how many CPUs had the remote? */
};
struct tcp_cc_request_struct {
int recv_buf_size; /* how big does the client want it */
int send_buf_size;
int recv_alignment;
int recv_offset;
int send_alignment;
int send_offset;
int request_size;
int response_size;
int no_delay;
int measure_cpu; /* does the client want server cpu */
float cpu_rate; /* do we know how fast the cpu is? */
int test_length; /* how long is the test? */
int so_rcvavoid; /* do we want the remote to avoid receive */
/* copies? */
int so_sndavoid; /* do we want the remote to avoid send copies? */
int port; /* the port to which the recv side should bind
to allow netperf to run through those evil
firewall things */
int ipfamily;
};
struct tcp_cc_response_struct {
int recv_buf_size; /* how big does the client want it */
int no_delay;
int measure_cpu; /* does the client want server cpu */
int test_length; /* how long is the test? */
int send_buf_size;
int data_port_number; /* connect to me here */
float cpu_rate; /* could we measure */
int so_rcvavoid; /* could the remote avoid receive copies? */
int so_sndavoid; /* could the remote avoid send copies? */
};
struct tcp_cc_results_struct {
unsigned int bytes_received; /* ignored initially */
unsigned int recv_calls; /* ignored initially */
unsigned int trans_received; /* not ignored */
float elapsed_time; /* how long the test ran */
float cpu_util; /* -1 if not measured */
float serv_dem; /* -1 if not measured */
int cpu_method; /* how was cpu util measured? */
int num_cpus; /* how many CPUs had the remote? */
};
extern int rss_size_req, /* requested remote socket send buffer size */
rsr_size_req, /* requested remote socket recv buffer size */
rss_size, /* remote socket send buffer size */
rsr_size, /* remote socket recv buffer size */
lss_size_req, /* requested local socket send buffer size */
lsr_size_req, /* requested local socket recv buffer size */
lss_size, /* local socket send buffer size */
lsr_size, /* local socket recv buffer size */
req_size, /* request size */
rsp_size, /* response size */
send_size, /* how big are individual sends */
recv_size, /* how big are individual receives */
loc_nodelay, /* don't/do use NODELAY locally */
rem_nodelay, /* don't/do use NODELAY remotely */
loc_sndavoid, /* avoid send copies locally */
loc_rcvavoid, /* avoid recv copies locally */
rem_sndavoid, /* avoid send copies remotely */
rem_rcvavoid; /* avoid recv_copies remotely */
extern void scan_sockets_args(int argc, char *argv[]);
extern struct addrinfo *complete_addrinfo(char *controlhost,
char *data_address,
char *port,
int family,
int type,
int protocol,
int flags);
extern void complete_addrinfos(struct addrinfo **remote,
struct addrinfo **local,
char remote_host[],
int type,
int protocol,
int flags);
extern int af_to_nf(int af);
extern int nf_to_af(int nf);
extern void print_top_test_header(char test_name[],
struct addrinfo *source,
struct addrinfo *destination);
extern void set_port_number(struct addrinfo *res,
unsigned short port);
extern void set_hostname_and_port(char *hostname,
char *portstr,
int family,
int port);
extern void send_tcp_stream(char remote_host[]);
extern void send_tcp_maerts(char remote_host[]);
extern void send_tcp_rr(char remote_host[]);
extern void send_tcp_conn_rr(char remote_host[]);
extern void send_tcp_cc(char remote_host[]);
extern void send_udp_stream(char remote_host[]);
extern void send_udp_rr(char remote_host[]);
extern void recv_tcp_stream();
extern void recv_tcp_maerts();
extern void recv_tcp_rr();
extern void recv_tcp_conn_rr();
extern void recv_tcp_cc();
extern void recv_udp_stream();
extern void recv_udp_rr();
extern void loc_cpu_rate();
extern void rem_cpu_rate();
#ifdef HAVE_ICSC_EXS
extern void send_exs_tcp_stream(char remotehost[]);
#endif /* HAVE_ICSC_EXS */
#ifdef HAVE_SENDFILE
extern void sendfile_tcp_stream(char remotehost[]);
#endif /* HAVE_SENDFILE */
#if !defined(HAVE_STRUCT_SOCKADDR_STORAGE) && !defined(sockaddr_storage)
#define sockaddr_storage sockaddr_in
#endif
#ifdef DO_NBRR
extern void send_tcp_nbrr(char remote_host[]);
extern void recv_tcp_nbrr();
#endif
File diff suppressed because it is too large Load Diff
-198
View File
@@ -1,198 +0,0 @@
/*
Copyright (C) 1993-2004 Hewlett-Packard Company
*/
/* This file contains the test-specific definitions for netperf's */
/* DLPI tests */
struct stream_stream_request_struct {
int recv_buf_size;
int send_buf_size;
int receive_size; /* how many bytes do we want to */
/* receive at one time? */
int recv_alignment; /* what is the alignment of the */
/* receive buffer? */
int recv_offset; /* and at what offset from that */
/* alignment? */
int so_rcvavoid; /* do we want the remote to avoid receive copies? */
int so_sndavoid; /* do we want the remote to avoid send copies? */
int measure_cpu; /* does the client want server cpu */
/* utilization measured? */
float cpu_rate; /* do we know how fast the cpu is */
/* already? */
int test_length; /* how long is the test? */
int dirty_count; /* how many integers in the receive buffer */
/* should be made dirty before calling recv? */
int clean_count; /* how many integers should be read from the */
/* recv buffer before calling recv? */
int path_name_len; /* the length of the device name string. this */
/* is used to put it into the proper order on */
/* @#$% byte-swapped boxes... */
char unix_path[32]; /* the path */
};
struct stream_stream_response_struct {
int recv_buf_size; /* how big does the client want it */
int send_buf_size;
int receive_size;
int so_rcvavoid; /* do we want the remote to avoid receive copies? */
int so_sndavoid; /* do we want the remote to avoid send copies? */
int measure_cpu; /* does the client want server cpu */
int test_length; /* how long is the test? */
int data_port_number; /* connect to me here */
float cpu_rate; /* could we measure */
int path_name_len; /* the length of the device name string. this */
/* is used to put it into the proper order on */
/* @#$% byte-swapped boxes... */
char unix_path[32]; /* the path */
};
struct stream_stream_results_struct {
int bytes_received; /* ignored initially */
int recv_calls; /* ignored initially */
float elapsed_time; /* how long the test ran */
float cpu_util; /* -1 if not measured */
float serv_dem; /* -1 if not measured */
int num_cpus;
};
struct stream_rr_request_struct {
int recv_buf_size; /* how big does the client want it */
int send_buf_size;
int recv_alignment;
int recv_offset;
int send_alignment;
int send_offset;
int request_size;
int response_size;
int so_rcvavoid; /* do we want the remote to avoid receive copies? */
int so_sndavoid; /* do we want the remote to avoid send copies? */
int measure_cpu; /* does the client want server cpu */
float cpu_rate; /* do we know how fast the cpu is? */
int test_length; /* how long is the test? */
int path_name_len; /* the length of the device name string. this */
/* is used to put it into the proper order on */
/* @#$% byte-swapped boxes... */
char unix_path[32]; /* the path */
};
struct stream_rr_response_struct {
int recv_buf_size; /* how big does the client want it */
int send_buf_size;
int so_rcvavoid; /* do we want the remote to avoid receive copies? */
int so_sndavoid; /* do we want the remote to avoid send copies? */
int measure_cpu; /* does the client want server cpu */
int test_length; /* how long is the test? */
float cpu_rate; /* could we measure */
int path_name_len; /* the length of the device name string. this */
/* is used to put it into the proper order on */
/* @#$% byte-swapped boxes... */
char unix_path[32]; /* the path to the dlpi device */
};
struct stream_rr_results_struct {
int bytes_received; /* ignored initially */
int recv_calls; /* ignored initially */
int trans_received; /* not ignored */
float elapsed_time; /* how long the test ran */
float cpu_util; /* -1 if not measured */
float serv_dem; /* -1 if not measured */
int num_cpus;
};
struct dg_stream_request_struct {
int recv_buf_size;
int message_size;
int recv_alignment;
int recv_offset;
int measure_cpu;
float cpu_rate;
int test_length;
int so_rcvavoid; /* do we want the remote to avoid receive copies? */
int so_sndavoid; /* do we want the remote to avoid send copies? */
int path_name_len; /* the length of the device name string. this */
/* is used to put it into the proper order on */
/* @#$% byte-swapped boxes... */
char unix_path[32]; /* the path */
};
struct dg_stream_response_struct {
int recv_buf_size;
int send_buf_size;
int measure_cpu;
int test_length;
float cpu_rate;
int so_rcvavoid; /* could the remote avoid receive copies? */
int so_sndavoid; /* could the remote avoid send copies? */
int path_name_len; /* the length of the device name string. this */
/* is used to put it into the proper order on */
/* @#$% byte-swapped boxes... */
char unix_path[32]; /* the path */
};
struct dg_stream_results_struct {
int messages_recvd;
int bytes_received;
float elapsed_time;
float cpu_util;
int num_cpus;
};
struct dg_rr_request_struct {
int recv_buf_size; /* how big does the client want it */
int send_buf_size;
int recv_alignment;
int recv_offset;
int send_alignment;
int send_offset;
int request_size;
int response_size;
int measure_cpu; /* does the client want server cpu */
float cpu_rate; /* do we know how fast the cpu is? */
int test_length; /* how long is the test? */
int so_rcvavoid; /* do we want the remote to avoid receive */
/* copies? */
int so_sndavoid; /* do we want the remote to avoid send copies? */
int path_name_len; /* the length of the device name string. this */
/* is used to put it into the proper order on */
/* @#$% byte-swapped boxes... */
char unix_path[32]; /* the path */
};
struct dg_rr_response_struct {
int recv_buf_size; /* how big does the client want it */
int send_buf_size;
int no_delay;
int measure_cpu; /* does the client want server cpu */
int test_length; /* how long is the test? */
float cpu_rate; /* could we measure */
int so_rcvavoid; /* could the remote avoid receive copies? */
int so_sndavoid; /* could the remote avoid send copies? */
int path_name_len; /* the length of the device name string. this */
/* is used to put it into the proper order on */
/* @#$% byte-swapped boxes... */
char unix_path[32]; /* the path */
};
struct dg_rr_results_struct {
int bytes_received; /* ignored initially */
int recv_calls; /* ignored initially */
int trans_received; /* not ignored */
float elapsed_time; /* how long the test ran */
float cpu_util; /* -1 if not measured */
float serv_dem; /* -1 if not measured */
int num_cpus;
};
extern void scan_unix_args(int argc, char *argv[]);
extern void send_stream_stream(char remote_host[]);
extern void send_stream_rr(char remote_host[]);
extern void send_dg_stream(char remote_host[]);
extern void send_dg_rr(char remote_host[]);
extern void recv_stream_stream();
extern void recv_stream_rr();
extern void recv_dg_stream();
extern void recv_dg_rr();
@@ -1,163 +0,0 @@
#!/bin/sh
#
# This script runs a series of netperf tests intended to gather the
# raw material necessary to arrive at estimates for the cost of
# sending and receiving a TCP segment, the cost of each additional byte
# and the cost of each incremental segment.
#
# there are a number of data points gathered by this script - it might
# run for a considerable length of time.
#
# rick jones 4/99
#
if [ $# -gt 2 ]; then
echo "try again, correctly -> packet_byte_script hostname [CPU]"
exit 1
fi
if [ $# -eq 0 ]; then
echo "try again, correctly -> packet_byte_script hostname [CPU]"
exit 1
fi
# where is netperf
NETPERF_CMD=${NETPERF_CMD:=/opt/netperf/netperf}
# at what port will netserver be waiting? If you decide to run
# netserver at a differnet port than the default of 12865, then set
# the value of NETPERF_PORT apropriately
# NETPERF_PORT="-p some_other_portnum"
NETPERF_PORT=${NETPERF_PORT:=""}
# The test length in seconds
NETPERF_TIME=${NETPERF_TIME:=20}
# How accurate we want the estimate of performance:
# maximum and minimum test iterations (-i)
# confidence level (99 or 95) and interval (percent)
NETPERF_STATS=${NETPERF_STATS:="-i 10,3 -I 99,5"}
# The socket sizes that we will be testing - using zero will let it
# be the system default.
NETPERF_SKTS=${NETPERF_SKTS:="0"}
# The request,response sizes that we will be using. The netperf
# command parser will treat "1" the same as "1,1" - I use 1,1 to
# remember that it is "request,response"
NETPERF_REQS=${NETPERF_REQS:="1 16 32 64 128 256 512 1024 \
1460 1461 2920 2921 4380 4381"}
NETPERF_RESP=${NETPERF_RESP:="1 16 32 64 128 256 512 1024 \
1460 1461 2920 2921 4380 4381"}
# if there are two parms, parm one it the hostname and parm two will
# be a CPU indicator. actually, anything as a second parm will cause
# the CPU to be measured, but we will "advertise" it should be "CPU"
if [ $# -eq 2 ]; then
REM_HOST=$1
LOC_CPU="-c"
REM_CPU="-C"
fi
if [ $# -eq 1 ]; then
REM_HOST=$1
fi
# If we are measuring CPU utilization, then we can save beaucoup
# time by saving the results of the CPU calibration and passing
# them in during the real tests. So, we execute the new CPU "tests"
# of netperf and put the values into shell vars.
case $LOC_CPU in
\-c) LOC_RATE=`$NETPERF_CMD $PORT -t LOC_CPU`;;
*) LOC_RATE=""
esac
case $REM_CPU in
\-C) REM_RATE=`$NETPERF_CMD $PORT -t REM_CPU -H $REM_HOST`;;
*) REM_RATE=""
esac
# This disables header display
NO_HDR="-P 0"
NO_HDR=""
for SOCKET_SIZE in $NETPERF_SKTS
do
echo
echo ------------------------------------------------------
echo Testing with the following command line:
# we echo the command line for cut and paste to th database
echo $NETPERF_CMD $NETPERF_PORT -l $NETPERF_TIME -H $REM_HOST -t TCP_RR \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $NETPERF_STATS --\
-s $SOCKET_SIZE -S $SOCKET_SIZE
echo
echo and these settings for send sizes $NETPERF_REQS
echo
for REQ in $NETPERF_REQS
do
# since we have the confidence interval stuff, we do not
# need to repeat a test multiple times from the shell
$NETPERF_CMD $NETPERF_PORT -l $NETPERF_TIME -H $REM_HOST $NO_HDR \
-t TCP_RR $LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $NETPERF_STATS --\
-r ${REQ},1 -s $SOCKET_SIZE -S $SOCKET_SIZE
NO_HDR="-P 0"
done
echo
echo ------------------------------------------------------
NO_HDR=""
echo Testing with the following command line:
# we echo the command line for cut and paste to th database
echo $NETPERF_CMD $NETPERF_PORT -l $NETPERF_TIME -H $REM_HOST -t TCP_RR \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $NETPERF_STATS --\
-s $SOCKET_SIZE -S $SOCKET_SIZE
echo and these settings for response sizes $NETPERF_RESP
echo
for RESP in $NETPERF_RESP
do
# since we have the confidence interval stuff, we do not
# need to repeat a test multiple times from the shell
$NETPERF_CMD $PORT -l $NETPERF_TIME -H $REM_HOST $NO_HDR \
-t TCP_RR $LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $NETPERF_STATS --\
-r 1,${RESP} -s $SOCKET_SIZE -S $SOCKET_SIZE
NO_HDR="-P 0"
done
echo
echo ------------------------------------------------------
NO_HDR=""
echo Testing with the following command line:
# we echo the command line for cut and paste to th database
echo $NETPERF_CMD $NETPERF_PORT -l $NETPERF_TIME -H $REM_HOST -t TCP_STREAM\
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $NETPERF_STATS --\
-s $SOCKET_SIZE -S $SOCKET_SIZE
echo and these settings for response sizes $NETPERF_RESP
echo
for REQ in $NETPERF_REQS
do
# since we have the confidence interval stuff, we do not
# need to repeat a test multiple times from the shell
$NETPERF_CMD $PORT -l $NETPERF_TIME -H $REM_HOST $NO_HDR \
-t TCP_STREAM $LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $NETPERF_STATS --\
-m ${REQ} -s $SOCKET_SIZE -S $SOCKET_SIZE -D
NO_HDR="-P 0"
done
done
# The test length in seconds for the CRR test, which needs to be
# longer for a connect/request/response test
NETPERF_CRR_TIME=${NETPERF_CRR_TIME:=120}
# now we do the TCP_CRR test
echo
echo ------------------------------------------------------
echo $NETPERF_CMD $NETPERF_PORT -l $NETPERF_CRR_TIME -H $REM_HOST -t TCP_CRR\
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $NETPERF_STATS --\
-s $SOCKET_SIZE -S $SOCKET_SIZE
echo
$NETPERF_CMD $NETPERF_PORT -l $NETPERF_CRR_TIME -H $REM_HOST -t TCP_CRR\
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $NETPERF_STATS --\
-s $SOCKET_SIZE -S $SOCKET_SIZE
-226
View File
@@ -1,226 +0,0 @@
#!/bin/sh
#set -x
#
# This is a script to generate a quick "snapshot" of performance for a
# pair of nodes. At first, it will perform the following tests:
#
# TCP Stream test with 56KB socket buffers and 4KB sends
# TCP Stream test with 32KB socket buffers and 4KB sends
# TCP Request/Response test with 1 byte requests and 1 byte responses
# UDP Request/Response test with 1 byte requests and 1 byte responses
# UDP Request/Response test with 516 byte requests and 4 byte responses
# UDP Stream test with 32KB socket buffers and 4KB sends
# UDP Stream test with 32KB socket buffers and 1KB sends
#
# All tests will run for sixty seconds. Confidence intervals are used
# to insure the repeatability of the test. This means that the soonest
# the script will be finished is 21 minutes.
#
# This script takes two parameters. The first parm is the name of the
# remote host. It is a required parameter. The second will either
# enable or disable CPU utilization measurements. It is an optional
# parameter which defaults to no CPU utilization measurements.
#
# usage: snapshot_script hostname [CPU]
#
# mod 6/29/95 - echo progress information to stderr so that we can
# see forward progress even when the results are
# re-directed to a file
#
# mod 5/27/96 - switch from NETHOME to NETPERF and take the user's value
# if it is already set
#
# mod 8/12/96 - fix the default netperf command variable so it finds the
# executable and not the directory...
#
# First, let us set-up some of the defaults
#
# where is netperf installed, there are a few possible places:
NETPERF_CMD=${NETPERF_CMD:=/opt/netperf/netperf}
# there should be no more than two parms passed
if [ $# -gt 2 ]; then
echo "try again, correctly -> snapshot_script hostname [CPU]"
exit 1
fi
if [ $# -eq 0 ]; then
echo "try again, correctly -> snapshot_script hostname [CPU]"
exit 1
fi
# if there are two parms, parm one it the hostname and parm two will
# be a CPU indicator. actuall, anything as a second parm will cause
# the CPU to be measured, but we will "advertise" it should be "CPU"
if [ $# -eq 2 ]; then
REM_HOST=$1
LOC_CPU="-c"
REM_CPU="-C"
fi
if [ $# -eq 1 ]; then
REM_HOST=$1
fi
# at what port will netserver be waiting? If you decide to run
# netserver at a differnet port than the default of 12865, then set
# the value of PORT apropriately
#NETPERF_PORT="-p some_other_portnum"
NETPERF_PORT=${NETPERF_PORT:=""}
# How accurate we want the estimate of performance:
# maximum and minimum test iterations (-i)
# confidence level (99 or 95) and interval (percent)
STATS_STUFF="-i 10,3 -I 99,5"
# length in time of the test - should be 60 seconds
NETPERF_TIME=${NETPERF_TIME:=60}
# where is the bitbucket?
BITBUCKET="/dev/null"
# announce start of test
echo Netperf snapshot script started at `date` >&2
# If we are measuring CPU utilization, then we can save beaucoup time
# by saving the results of the CPU calibration and passing them in
# during the real tests. So, we execute the new CPU "tests" of netperf
# and put the values into shell vars.
case $LOC_CPU in
\-c) LOC_RATE=`$NETPERF_CMD $NETPERF_PORT -t LOC_CPU`;;
*) LOC_RATE=""
esac
case $REM_CPU in
\-C) REM_RATE=`$NETPERF_CMD $NETPERF_PORT -t REM_CPU -H $REM_HOST`;;
*) REM_RATE=""
esac
# We will perform three twenty second warm-up tests at this point, but
# we will not display the results of those tests. This is unlikely to
# make any difference in the results except right after a system
# reboot, but this is supposed to be rather "general." We will do a
# TCP stream and a TCP req/resp test
WARM_TIME="10"
$NETPERF_CMD $NETPERF_PORT -l $WARM_TIME -t TCP_STREAM -H $REM_HOST -- \
-s 32768 -S 32768 -m 4096 > ${BITBUCKET}
$NETPERF_CMD $NETPERF_PORT -l $WARM_TIME -t TCP_STREAM -H $REM_HOST -- \
-s 32768 -S 32768 -m 96 > ${BITBUCKET}
$NETPERF_CMD $NETPERF_PORT -l $WARM_TIME -t TCP_RR -H $REM_HOST -- \
-r 1,1 > ${BITBUCKET}
# The warm-ups are complete, so perform the real tests first, the
# stream tests, then the request/response
echo Starting 56x4 TCP_STREAM tests at `date` >&2
# a 56x4 TCP_STREAM test
echo
echo ------------------------------------
echo Testing with the following command line:
echo $NETPERF_CMD $NETPERF_PORT -t TCP_STREAM -l $NETPERF_TIME -H $REM_HOST \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF -- \
-s 57344 -S 57344 -m 4096
echo
$NETPERF_CMD $NETPERF_PORT -t TCP_STREAM -l $NETPERF_TIME -H $REM_HOST \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF -- \
-s 57344 -S 57344 -m 4096
echo
echo
# a 32x4 TCP_STREAM test
echo Starting 32x4 TCP_STREAM tests at `date` >&2
echo
echo ------------------------------------
echo Testing with the following command line:
echo $NETPERF_CMD $NETPERF_PORT -t TCP_STREAM -l $NETPERF_TIME -H $REM_HOST \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF -- \
-s 32768 -S 32768 -m 4096
echo
$NETPERF_CMD $NETPERF_PORT -t TCP_STREAM -l $NETPERF_TIME -H $REM_HOST \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF -- \
-s 32768 -S 32768 -m 4096
echo
echo
# a single-byte TCP_RR
echo Starting 1,1 TCP_RR tests at `date` >&2
echo
echo ------------------------------------
echo Testing with the following command line:
echo $NETPERF_CMD $NETPERF_PORT -t TCP_RR -l $NETPERF_TIME -H $REM_HOST \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF -- \
-r 1,1
echo
$NETPERF_CMD $NETPERF_PORT -t TCP_RR -l $NETPERF_TIME -H $REM_HOST \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF -- \
-r 1,1
echo
echo
echo Starting 1,1 UDP_RR tests at `date` >&2
echo
echo ------------------------------------
echo Testing with the following command line:
# a single-byte UDP_RR
echo $NETPERF_CMD $NETPERF_PORT -t UDP_RR -l $NETPERF_TIME -H $REM_HOST \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF -- \
-r 1,1
echo
$NETPERF_CMD $NETPERF_PORT -t UDP_RR -l $NETPERF_TIME -H $REM_HOST \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF -- \
-r 1,1
echo
echo
# a UDP_RR test much like tftp
echo Starting 512,4 UDP_RR tests at `date` >&2
echo
echo ------------------------------------
echo Testing with the following command line:
echo $NETPERF_CMD $NETPERF_PORT -t UDP_RR -l $NETPERF_TIME -H $REM_HOST \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF -- \
-r 516,4
echo
$NETPERF_CMD $NETPERF_PORT -t UDP_RR -l $NETPERF_TIME -H $REM_HOST \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF -- -r 516,4
# a 32x4 UDP_STREAM test
echo Starting 32x4 UDP_STREAM tests at `date` >&2
echo
echo ------------------------------------
echo Testing with the following command line:
echo $NETPERF_CMD $NETPERF_PORT -t UDP_STREAM -l $NETPERF_TIME -H $REM_HOST \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF -- \
-s 32768 -S 32768 -m 4096
echo
$NETPERF_CMD $NETPERF_PORT -t UDP_STREAM -l $NETPERF_TIME -H $REM_HOST \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF -- \
-s 32768 -S 32768 -m 4096
echo
echo
# a 32x1 UDP_STREAM test
echo Starting 32x1 UDP_STREAM tests at `date` >&2
echo
echo ------------------------------------
echo Testing with the following command line:
echo $NETPERF_CMD $NETPERF_PORT -t UDP_STREAM -l $NETPERF_TIME -H $REM_HOST \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF -- \
-s 32768 -S 32768 -m 1024
echo
$NETPERF_CMD $NETPERF_PORT -t UDP_STREAM -l $NETPERF_TIME -H $REM_HOST \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF -- \
-s 32768 -S 32768 -m 1024
echo
echo
# and that's that
echo Tests completed at `date` >&2
echo
echo If you wish to submit these results to the netperf database at
echo http://www.cup.hp.com/netperf/NetperfPage.html, please submit each
echo datapoint individually. Individual datapoints are separated by
echo lines of dashes.
-113
View File
@@ -1,113 +0,0 @@
#!/bin/sh
#
# stream_range
#
# generate a whole lot of numbers from netperf to see the effects
# of send size on thruput
#
#
# usage : tcp_stream_range hostname [CPU]
#
if [ $# -gt 2 ]; then
echo "try again, correctly -> tcp_stream_range hostname [CPU]"
exit 1
fi
if [ $# -eq 0 ]; then
echo "try again, correctly -> tcp_stream_range hostname [CPU]"
exit 1
fi
# if there are two parms, parm one it the hostname and parm two will
# be a CPU indicator. actually, anything as a second parm will cause
# the CPU to be measured, but we will "advertise" it should be "CPU"
if [ $# -eq 2 ]; then
REM_HOST=$1
LOC_CPU="-c"
REM_CPU="-C"
fi
if [ $# -eq 1 ]; then
REM_HOST=$1
fi
# at what port will netserver be waiting? If you decide to run
# netserver at a differnet port than the default of 12865, then set
# the value of PORT apropriately
#PORT="-p some_other_portnum"
PORT=""
# where is netperf, and are there any "constant" options such as
# the netserver port number
#NETHOME=/usr/etc/net_perf
NETHOME="."
NETPERF=$NETHOME/netperf $PORT
# How accurate we want the estimate of performance:
# maximum and minimum test iterations (-i)
# confidence level (99 or 95) and interval (percent)
STATS_STUFF="-i 10,2 -I 99,3"
#
# some stuff for the arithmetic
#
# we start at start, and then multiply by MULT and add ADD. by changing
# these numbers, we can double each time, or increase by a fixed
# amount, or go up by 4x, whatever we like...
#
START=1
END=65536
MULT=4
ADD=0
# If we are measuring CPU utilization, then we can save beaucoup
# time by saving the results of the CPU calibration and passing
# them in during the real tests. So, we execute the new CPU "tests"
# of netperf and put the values into shell vars.
case $LOC_CPU in
\-c) LOC_RATE=`$NETPERF -t LOC_CPU`;;
*) LOC_RATE=""
esac
case $REM_CPU in
\-C) REM_RATE=`$NETPERF -t REM_CPU -H $REM_HOST`;;
*) REM_RATE=""
esac
TIME="60"
#
# the maximum socket buffer size is system dependent. for the
# "cannonical" tests we use 32KB, but this can be altered
#
SOCKET_SIZE="-s 32768 -S 32768"
MESSAGE=$START
while [ $MESSAGE -le $END ]; do
echo
echo ------------------------------------
echo Testing with the following command line:
echo $NETPERF -l $TIME -H $REM_HOST -t TCP_STREAM\
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF --\
-m $MESSAGE $SOCKET_SIZE
echo
$NETPERF -l $TIME -H $REM_HOST -t TCP_STREAM\
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF --\
-m $MESSAGE $SOCKET_SIZE
MESSAGE=`expr $MESSAGE + $ADD`
MESSAGE=`expr $MESSAGE \* $MULT`
done
echo
echo If you wish to submit these results to the netperf database at
echo http://www.cup.hp.com/netperf/NetperfPage.html, please submit each
echo datapoint individually. Individual datapoints are separated by
echo lines of dashes.
-107
View File
@@ -1,107 +0,0 @@
#!/bin/sh
#
# This is an example script for using netperf. Feel free to modify it
# as necessary, but I would suggest that you copy this one first.
#
#
# This version has been modified to take advantage of the confidence
# interval support in revision 2.0 of netperf. it has also been altered
# to make submitting its resutls to the netperf database easier
# raj 11/94
#
# usage: tcp_rr_script hostname [CPU]
#
if [ $# -gt 2 ]; then
echo "try again, correctly -> tcp_rr_script hostname [CPU]"
exit 1
fi
if [ $# -eq 0 ]; then
echo "try again, correctly -> tcp_rr_script hostname [CPU]"
exit 1
fi
# where the programs are
#NETHOME=/usr/local/netperf
#NETHOME="/opt/netperf"
NETHOME=.
# at what port will netserver be waiting? If you decide to run
# netserver at a differnet port than the default of 12865, then set
# the value of PORT apropriately
#PORT="-p some_other_portnum"
PORT=""
# The test length in seconds
TEST_TIME=60
# How accurate we want the estimate of performance:
# maximum and minimum test iterations (-i)
# confidence level (99 or 95) and interval (percent)
STATS_STUFF="-i 10,3 -I 99,5"
# The socket sizes that we will be testing - using zero will let it
# be the system default.
SOCKET_SIZES="0"
# The request,response sizes that we will be using. The netperf
# command parser will treat "1" the same as "1,1" - I use 1,1 to
# remember that it is "request,response"
RR_SIZES="1,1 64,64 100,200 128,8192"
# if there are two parms, parm one it the hostname and parm two will
# be a CPU indicator. actually, anything as a second parm will cause
# the CPU to be measured, but we will "advertise" it should be "CPU"
if [ $# -eq 2 ]; then
REM_HOST=$1
LOC_CPU="-c"
REM_CPU="-C"
fi
if [ $# -eq 1 ]; then
REM_HOST=$1
fi
# If we are measuring CPU utilization, then we can save beaucoup
# time by saving the results of the CPU calibration and passing
# them in during the real tests. So, we execute the new CPU "tests"
# of netperf and put the values into shell vars.
case $LOC_CPU in
\-c) LOC_RATE=`$NETHOME/netperf $PORT -t LOC_CPU`;;
*) LOC_RATE=""
esac
case $REM_CPU in
\-C) REM_RATE=`$NETHOME/netperf $PORT -t REM_CPU -H $REM_HOST`;;
*) REM_RATE=""
esac
# This disables header display
NO_HDR="-P 0"
for SOCKET_SIZE in $SOCKET_SIZES
do
for RR_SIZE in $RR_SIZES
do
echo
echo ------------------------------------------------------
echo Testing with the following command line:
# we echo the command line for cut and paste to th database
echo $NETHOME/netperf $PORT -l $TEST_TIME -H $REM_HOST -t TCP_RR \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF --\
-r $RR_SIZE -s $SOCKET_SIZE -S $SOCKET_SIZE
echo
# since we have the confidence interval stuff, we do not
# need to repeat a test multiple times from the shell
$NETHOME/netperf $PORT -l $TEST_TIME -H $REM_HOST -t TCP_RR \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF --\
-r $RR_SIZE -s $SOCKET_SIZE -S $SOCKET_SIZE
done
done
echo
echo If you wish to submit these results to the netperf database at
echo http://www.cup.hp.com/netperf/NetperfPage.html, please submit each
echo datapoint individually. Individual datapoints are separated by
echo lines of dashes.
@@ -1,104 +0,0 @@
#!/bin/sh
#
# This is an example script for using netperf. Feel free to modify it
# as necessary, but I would suggest that you copy this one first.
#
# This version has been modified to take advantage of the confidence
# interval support in revision 2.0 of netperf. it has also been altered
# to make submitting its resutls to the netperf database easier
# raj 11/94
#
# usage: tcp_stream_script hostname [CPU]
#
if [ $# -gt 2 ]; then
echo "try again, correctly -> tcp_stream_script hostname [CPU]"
exit 1
fi
if [ $# -eq 0 ]; then
echo "try again, correctly -> tcp_stream_script hostname [CPU]"
exit 1
fi
# where the programs are
#NETHOME=/usr/local/netperf
#NETHOME="/opt/netperf"
NETHOME=.
# at what port will netserver be waiting? If you decide to run
# netserver at a differnet port than the default of 12865, then set
# the value of PORT apropriately
#PORT="-p some_other_portnum"
PORT=""
# The test length in seconds
TEST_TIME=60
# How accurate we want the estimate of performance:
# maximum and minimum test iterations (-i)
# confidence level (99 or 95) and interval (percent)
STATS_STUFF="-i 10,2 -I 99,5"
# The socket sizes that we will be testing
SOCKET_SIZES="57344 32768 8192"
# The send sizes that we will be using
SEND_SIZES="4096 8192 32768"
# if there are two parms, parm one it the hostname and parm two will
# be a CPU indicator. actually, anything as a second parm will cause
# the CPU to be measured, but we will "advertise" it should be "CPU"
if [ $# -eq 2 ]; then
REM_HOST=$1
LOC_CPU="-c"
REM_CPU="-C"
fi
if [ $# -eq 1 ]; then
REM_HOST=$1
fi
# If we are measuring CPU utilization, then we can save beaucoup
# time by saving the results of the CPU calibration and passing
# them in during the real tests. So, we execute the new CPU "tests"
# of netperf and put the values into shell vars.
case $LOC_CPU in
\-c) LOC_RATE=`$NETHOME/netperf $PORT -t LOC_CPU`;;
*) LOC_RATE=""
esac
case $REM_CPU in
\-C) REM_RATE=`$NETHOME/netperf $PORT -t REM_CPU -H $REM_HOST`;;
*) REM_RATE=""
esac
# this will disable headers
NO_HDR="-P 0"
for SOCKET_SIZE in $SOCKET_SIZES
do
for SEND_SIZE in $SEND_SIZES
do
echo
echo ------------------------------------
echo
# we echo the command line for cut and paste
echo $NETHOME/netperf $PORT -l $TEST_TIME -H $REM_HOST -t TCP_STREAM\
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF --\
-m $SEND_SIZE -s $SOCKET_SIZE -S $SOCKET_SIZE
echo
# since we have the confidence interval stuff, we do not
# need to repeat a test multiple times from the shell
$NETHOME/netperf $PORT -l $TEST_TIME -H $REM_HOST -t TCP_STREAM\
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE $STATS_STUFF --\
-m $SEND_SIZE -s $SOCKET_SIZE -S $SOCKET_SIZE
done
done
echo If you wish to submit these results to the netperf database at
echo http://www.cup.hp.com/netperf/NetperfPage.html, please submit each
echo datapoint individually. Individual datapoints are separated by
echo lines of dashes.
-107
View File
@@ -1,107 +0,0 @@
#!/bin/sh
#
# This is an example script for using netperf. Feel free to modify it
# as necessary, but I would suggest that you copy this one first.
#
#
# uncomment the next line if you think the script is broken
#set -x
if [ $# -gt 2 ]; then
echo "try again, correctly -> udp_rr_script hostname [CPU]"
exit 1
fi
if [ $# -eq 0 ]; then
echo "try again, correctly -> udp_rr_script hostname [CPU]"
exit 1
fi
# where the programs are
#NETHOME=/usr/local/netperf
#NETHOME="/opt/netperf"
NETHOME="."
# at what port will netserver be waiting? If you decide to run
# netserver at a differnet port than the default of 12865, then set
# the value of PORT apropriately
#PORT="-p some_other_portnum"
PORT=""
# The test length in seconds
TEST_TIME=60
# How accurate we want the estimate of performance:
# maximum and minimum test iterations (-i)
# confidence level (99 or 95) and interval (percent)
STATS_STUFF="-i 10,2 -I 99,10"
# The socket sizes that we will be testing - 0 means use default
# not much point in changing the socket buffer for a UDP request/
# response test - unless you want to have requests/responses which
# are larger than the default
SOCKET_SIZES="0"
# The send sizes that we will be using
RR_SIZES="1,1 64,64 100,200 1024,1024"
# if there are two parms, parm one it the hostname and parm two will
# be a CPU indicator. actually, anything as a second parm will cause
# the CPU to be measured, but we will "advertise" it should be "CPU"
if [ $# -eq 2 ]; then
REM_HOST=$1
LOC_CPU="-c"
REM_CPU="-C"
fi
if [ $# -eq 1 ]; then
LOC_CPU=""
REM_CPU=""
REM_HOST=$1
fi
# If we are measuring CPU utilization, then we can save beaucoup
# time by saving the results of the CPU calibration and passing
# them in during the real tests. So, we execute the new CPU "tests"
# of netperf and put the values into shell vars.
case $LOC_CPU in
\-c) LOC_RATE=`$NETHOME/netperf $PORT -t LOC_CPU`;;
*) LOC_RATE=""
esac
case $REM_CPU in
\-C) REM_RATE=`$NETHOME/netperf $PORT -t REM_CPU -H $REM_HOST`;;
*) REM_RATE=""
esac
# This turns-off the display headers
NO_HDR="-P 0"
for SOCKET_SIZE in $SOCKET_SIZES
do
for RR_SIZE in $RR_SIZES
do
echo
echo ------------------------------------------------------
echo Testing with the following command line:
echo $NETHOME/netperf $PORT -l $TEST_TIME -H $REM_HOST $STATS_STUFF \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE -t UDP_RR --\
-r $RR_SIZE -s $SOCKET_SIZE -S $SOCKET_SIZE
$NETHOME/netperf $PORT -l $TEST_TIME -H $REM_HOST $STATS_STUFF \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE -t UDP_RR $NO_HDR --\
-r $RR_SIZE -s $SOCKET_SIZE -S $SOCKET_SIZE
done
done
echo
echo If you wish to submit these results to the netperf database at
echo http://www.cup.hp.com/netperf/NetperfPage.html, please submit each
echo datapoint individually. Individual datapoints are separated by
echo lines of dashes.
@@ -1,104 +0,0 @@
#!/bin/sh
#
# This is an example script for using netperf. Feel free to modify it
# as necessary, but I would suggest that you copy this one first.
# This script performs various UDP unidirectional stream tests.
#
if [ $# -gt 2 ]; then
echo "try again, correctly -> udp_stream_script hostname [CPU]"
exit 1
fi
if [ $# -eq 0 ]; then
echo "try again, correctly -> udp_stream_script hostname [CPU]"
exit 1
fi
# where the programs are
#NETHOME=/usr/local/netperf
#NETHOME="/opt/netperf"
NETHOME="."
# at what port will netserver be waiting? If you decide to run
# netserver at a differnet port than the default of 12865, then set
# the value of PORT apropriately
#PORT="-p some_other_portnum"
PORT=""
# The test length in seconds
TEST_TIME=60
# How accurate we want the estimate of performance:
# maximum and minimum test iterations (-i)
# confidence level (99 or 95) and interval (percent)
STATS_STUFF="-i 10,2 -I 99,10"
# The socket sizes that we will be testing. This should be a list of
# integers separated by spaces
SOCKET_SIZES="32768"
# The send sizes that we will be using. Using send sizes that result
# in UDP packets which are larger than link size can be a bad thing to do.
# for FDDI, you can tack-on a 4096 data point
SEND_SIZES="64 1024 1472"
# if there are two parms, parm one it the hostname and parm two will
# be a CPU indicator. actually, anything as a second parm will cause
# the CPU to be measured, but we will "advertise" it should be "CPU"
if [ $# -eq 2 ]; then
REM_HOST=$1
LOC_CPU="-c"
REM_CPU="-C"
fi
if [ $# -eq 1 ]; then
LOC_CPU=""
REM_CPU=""
REM_HOST=$1
fi
# If we are measuring CPU utilization, then we can save beaucoup
# time by saving the results of the CPU calibration and passing
# them in during the real tests. So, we execute the new CPU "tests"
# of netperf and put the values into shell vars.
case $LOC_CPU in
\-c) LOC_RATE=`$NETHOME/netperf $PORT -t LOC_CPU`;;
*) LOC_RATE=""
esac
case $REM_CPU in
\-C) REM_RATE=`$NETHOME/netperf $PORT -t REM_CPU -H $REM_HOST`;;
*) REM_RATE=""
esac
# This will tell netperf that headers are not to be displayed
NO_HDR="-P 0"
for SOCKET_SIZE in $SOCKET_SIZES
do
for SEND_SIZE in $SEND_SIZES
do
echo
echo ------------------------------------------------------
echo Testing with the following command line:
echo $NETHOME/netperf $PORT -l $TEST_TIME -H $REM_HOST $STATS_STUFF \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE -t UDP_STREAM -- \
-m $SEND_SIZE -s $SOCKET_SIZE -S $SOCKET_SIZE
$NETHOME/netperf $PORT -l $TEST_TIME -H $REM_HOST $STATS_STUFF \
$LOC_CPU $LOC_RATE $REM_CPU $REM_RATE -t UDP_STREAM -- \
-m $SEND_SIZE -s $SOCKET_SIZE -S $SOCKET_SIZE
done
done
echo
echo If you wish to submit these results to the netperf database at
echo http://www.cup.hp.com/netperf/NetperfPage.html, please submit each
echo datapoint individually. Individual datapoints are separated by
echo lines of dashes.