[netperf-talk] Error Codes
Rick Jones
rick.jones2 at hp.com
Fri Jan 15 10:31:23 PST 2010
Frank Schuster wrote:
> Hello,
>
> I have tried an TCP-Test over mobile network UMTS (3G) but after 3-4
> retransmissions at the end of the test I get the error: "netperf: remote
> error 4"
>
> What is the meaning of this error? Or where I can find an explanation to the
> different error codes?
Error code returns from netserver to netperf aren't exactly rigorous, but
generally speaking if it is in the 900 range that is a netserver/netperf
specific error and the only documentation at present is the source - I cannot
guarantee that the same 900 error code isn't used in multiple places :)
For low values like that, 99 times out of 10 that will be the value of errno on
the netserver side. Since errno values are not completely standard, netperf
cannot make the strerror() call to make that text. In the case of HP-UX errno
values, I tend to use:
grep <value> /usr/include/sys/errno.h
which in this case would yield a lot of output which includes:
$ grep 4 /usr/include/sys/errno.h
# if defined(_REENTRANT) && !defined(_PTHREADS_DRAFT4)
# else /* ! _REENTRANT || _PTHREADS_DRAFT4 */
# endif /* ! _REENTRANT || _PTHREADS_DRAFT4 */
# define ERANGE 34 /* Math result not representable */
#define EINTR 4 /* interrupted system call */
I suppose there is a good chance that 4 is EINTR on other platforms, but it is
best to make the search oneself. (I suppose if one were sufficiently motivated,
and there were sufficient space in the message one could, in theory, insert the
platform-specific error text into the control message...)
If I were a betting man, I would bet that the retransmissions caused the test to
run more than PAD_TIME seconds longer than the value of the -l option (IIRC
PAD_TIME is four seconds these days). It has been long enough since I've had
time to sit-down with the code and I'm busy enough I cannot recall if the "omni"
tests still use PAD_TIME. Another possiblity is to use a byte-based test length
rather than time-based one - pass a negative value to -l rather than a positive one:
netperf -l 10 ... runs a ten second test
netperf -l -1000000 ... runs a test that passes one million bytes
happy benchmarking,
rick jones
More information about the netperf-talk
mailing list