home *** CD-ROM | disk | FTP | other *** search
- From: golding@terra.ucsc.edu (Richard Golding)
- Newsgroups: comp.parallel,alt.sources,sci.research
- Subject: Experiment to measure wide-area communication performance
- Message-ID: <1991May2.140829.9858@hubcap.clemson.edu>
- Date: 29 Apr 91 22:38:34 GMT
- Approved: parallel@hubcap.clemson.edu
-
-
- At UC Santa Cruz we are conducting a series of measurements of the
- Internet, as part of a project to understand how to build efficient
- wide-area applications (and not incidentally as part of my MS thesis
- work). As a part of these measurements, we need to obtain traces of
- communication failure rates and latency.
-
- If you are at a site on the Internet which can send and receive UDP
- packets to and from UCSC, we need your assistance.(1)
-
- We are asking that people at several sites throughout the Internet run
- a simple daemon for two weeks, from Thursday, 2 May 1991 through
- Thursday, 16 May 1991. We will be sending this daemon a UDP packet a
- few times each day. The daemon simply echoes this packet back to the
- sender, so we can time how long it takes.
-
- The source for this daemon is enclosed in this message, and should
- take less than five minutes to install. We're providing the source
- code so you can look it over and convince yourself it doesn't pose a
- significant load or security risk for your machine. (More on this in
- the installation instructions.)
-
- The daemon runs on Sun3 and Sun4 systems under SunOS 4.x, and on
- HP9000 systems under HPUX 7.0.
-
- The attached shar file contains a C program, makefile, wand
- installation instructions. The installation involves compiling the
- program, adding the program to crontab (or some other mechanism to
- ensure it runs regularly), and sending mail to us informing us of your
- host, port, and organization.
-
- If you have concerns or questions, please feel free to contact us.
-
- Thank you.
-
- Richard Golding
- Graduate Student, Computer & Info Sciences
- Baskin Center for CE&IS
- University of California
- Santa Cruz, CA 95064
- (408) 458-3613
- Internet: golding@cis.ucsc.edu, or
- golding@cello.hpl.hp.com, or
- golding@slice.ooc.uva.nl
-
- (1) This rules out sites inside several companies, such as HP, Sun,
- and Apple, which do not pass certain classes of traffic from the
- outside.
-
- ---- Cut Here and unpack ----
- #!/bin/sh
- # shar: Shell Archiver (v1.22)
- # Packed Mon Apr 29 15:27:15 PDT 1991 by midgard!golding
- # from directory /terra/a/grads/golding/evrep/validate/distrib
- #
- # Run the following text with /bin/sh to create:
- # INSTRUCTIONS
- # Makefile
- # udptestd.c
- # validate.h
- #
- if test -f INSTRUCTIONS; then echo "File INSTRUCTIONS exists"; else
- echo "x - extracting INSTRUCTIONS (Text)"
- sed 's/^X//' << 'SHAR_EOF' > INSTRUCTIONS &&
- XInstallation instructions
- X-------------------------
- X
- XThese instructions have been verified for Sun3 and Sun4 systems
- Xrunning SunOS 4.x, and for HP9000/800 systems running HPUX 7.0. They
- Xmay work on other systems; however, I don't guarantee anything. If
- Xyou have problems please mail golding@cis.ucsc.edu and we'll try to
- Xwork it out. They are known _not_ to work for Ultrix and BSD 4.3
- Xsystems, because these systems do not allow individual crontab files.
- X
- X1. Unpack the shar file into an otherwise empty directory.
- X
- X2. Configure the test daemon to use the proper UDP port. By default
- Xthe daemon uses port 4296, an unprivileged, unreserved port. If this
- Xconflicts with some other daemon on your system, change the port by
- Xediting the third line in the Makefile:
- X
- X CFLAGS = -DUDPPORT=<new UDP port number>
- X
- X3. Compile the daemon by typing
- X
- X make
- X
- X4. Add an entry to your crontab to ensure that the daemon continues
- Xto run by editing your current crontab. If you are on a SunOS system,
- Xyou can edit your crontab entry using the command:
- X
- X crontab -e
- X
- XOn HPUX and similar systems you will need to save your current crontab
- Xinto a file, edit that file, and reset your crontab from that file:
- X
- X crontab -l >file
- X (edit) file
- X crontab file
- X
- XYou should add an entry of the form:
- X
- X 5,20,35,50 * * 4,5 * $DIR/udptestd > /dev/null 2>&1
- X
- Xreplacing `$DIR' with the path for the directory in which you
- Xinstalled the daemon.
- X
- X5. Send mail to golding@cis.ucsc.edu with the following information:
- X
- X - The (full) name of the host on which the daemon is being run
- X (e.g. sequoia.ucsc.edu)
- X - The UDP port number the daemon will use (default is 4296)
- X - The host type (e.g. Sun 4/20 using SunOS 4.1.1, or VAX 11/780
- X using BSD4.3 Unix)
- X - A name and organization to be credited in the thesis (or an
- X indication you prefer to remain anonymous)
- X
- X I'd also appreciate comments on how long it took you to install
- X this software, and if it posed any particular problems.
- X
- XThat's all there is.
- X
- X
- XCleaning up after the experiment
- X--------------------------------
- X
- XThe measurement experiment is scheduled to last two weeks, from 2 May
- X1991 through 16 May 1991. To allow for problems, I'd ask that you
- Xkeep the measurement daemon running through 1 June 1991.
- X
- XAfter the experiment is over, you will need to do two things to clean
- Xup:
- X
- X1. Remove the entry from your crontab. On a SunOS 4.x system, use
- Xthe command
- X crontab -e
- Xto edit your crontab file, and delete the line
- X 5,20,35,50 * * 4,5 * <directory>/udptest > /dev/null 2>&1
- Xwhich was added by step 5 in the installation.
- X
- XOn an HPUX or similar system, you will need save your crontab to a
- Xfile, edit the file, and reset your crontab from the file. The
- Xcommands are the same as were used in the last section to add the line
- Xto your crontab.
- X
- X2. Delete the directory containing the daemon and all its contents.
- X
- XSecurity considerations
- X-----------------------
- X
- XWe believe that this program is neither a security nor performance
- Xproblem. However, we're sending out the source code so you can look
- Xat it for yourself. If you feel there is a problem, don't use it.
- X
- XThe daemon uses an unprivileged UDP port for communication. You
- Xshould choose the port number so that it doesn't conflict with
- Xanything else on your system. The default is probably fine, but you
- Xshould check.
- X
- XCare has been taken that it does not require root privileges either to
- Xrun or for installation. I would recommend _not_ installing it as
- Xroot. It uses a crontab entry to ensure that it will be run following
- Xa system restart, rather than requiring that it be added to the
- Xsystem's startup configuration.
- X
- XThe daemon neither writes nor reads files, so there is no
- Xpossibility of the daemon using file system space beyond what is
- Xrequired for the source and binary.
- X
- XThe only resources this daemon uses are the memory required to run it,
- Xand a trivial amount per message. We will be sending a few messages
- Xeach day -- on the order of 800 per day (11 messages, three times an
- Xhour) -- so the daemon should not interfere with normal operations.
- X(We found that it added no measurable load to a local Sun4 system, as
- Xmeasured by the kernel's 1-, 5-, and 15-minute load averages.)
- X
- X-----
- X
- XA technical report on some preliminary work on this problem is
- Xavailable as TR # UCSC-CRL-91-01, and can be obtained by ftp from
- Xmidgard.ucsc.edu in the file pub/tr/ucsc-crl-91-01.ps.Z .
- X
- XThank you for your assistance is this experiment.
- X
- XRichard Golding
- Xgolding@cis.ucsc.edu
- XConcurrent Systems Lab
- XBaskin Center for Computer Engr. & Info. Sci.
- XApplied Sciences Building
- XUniversity of California
- XSanta Cruz CA 95064
- SHAR_EOF
- chmod 0444 INSTRUCTIONS || echo "restore of INSTRUCTIONS fails"
- fi
- if test -f Makefile; then echo "File Makefile exists"; else
- echo "x - extracting Makefile (Text)"
- sed 's/^X//' << 'SHAR_EOF' > Makefile &&
- XLIBS =
- XCFLAGS = -DUDPPORT=4296 # -DDEBUG
- XPROGS = udptestd
- X
- Xall: $(PROGS)
- X
- Xudptestd: udptestd.o
- X cc -o udptestd udptestd.o $(LIBS)
- X
- Xudptestd.o: udptestd.c validate.h
- X
- Xclean:
- X -rm -f *.o core *~
- X
- Xspotless: clean
- X -rm -f $(PROGS)
- SHAR_EOF
- chmod 0444 Makefile || echo "restore of Makefile fails"
- fi
- if test -f udptestd.c; then echo "File udptestd.c exists"; else
- echo "x - extracting udptestd.c (Text)"
- sed 's/^X//' << 'SHAR_EOF' > udptestd.c &&
- X#include <sys/types.h>
- X#include <sys/time.h>
- X#include <sys/socket.h>
- X#include <netinet/in.h>
- X#include <netdb.h>
- X#include <stdio.h>
- X#include "validate.h"
- X
- X#ifdef DEBUG
- Xchar *
- Xhostnameof(sa)
- Xstruct sockaddr_in *sa;
- X{
- X struct hostent *h;
- X
- X h = gethostbyaddr(sa->sin_addr,sizeof(struct in_addr),AF_INET);
- X return h->h_name;
- X}
- X
- Xint
- Xportof(sa)
- Xstruct sockaddr_in *sa;
- X{
- X return ntohl(sa->sin_port);
- X}
- X#endif
- X
- Xvoid
- Xgettimestamp(ps,pus)
- Xint *ps, *pus;
- X{
- X struct timeval t;
- X
- X gettimeofday(&t, NULL);
- X *ps = htonl(t.tv_sec);
- X *pus = htonl(t.tv_usec);
- X}
- X
- Xvoid
- Xdoecho(sock)
- Xint sock;
- X{
- X req inreq;
- X int len;
- X int flags;
- X struct sockaddr_in from;
- X int fromlen;
- X int rc;
- X rep outrep;
- X
- X /* get a request message */
- X#ifdef DEBUG
- X printf("waiting for message\n");
- X#endif
- X len = sizeof(inreq);
- X fromlen = sizeof(from);
- X flags = 0;
- X rc = recvfrom(sock, &inreq, len, flags, (struct sockaddr *)&from, &fromlen);
- X if (rc < 0) {
- X perror("In recvfrom");
- X return;
- X }
- X
- X /* process it: grab a timestamp, fill out reply, and sleep */
- X#ifdef DEBUG
- X printf("got message: from host [%s] port %d, sequence %d, delay %d\n",
- X hostnameof(&from),portof(&from),ntohl(inreq.seq),ntohl(inreq.delaytime));
- X#endif
- X outrep.seq = inreq.seq;
- X outrep.delaytime = inreq.delaytime;
- X gettimestamp(&outrep.tinsec, &outrep.tinusec);
- X sleep(ntohl(inreq.delaytime));
- X
- X /* done processing, grab another timestamp and reply */
- X gettimestamp(&outrep.toutsec, &outrep.toutusec);
- X sendto(sock,&outrep,sizeof(outrep),0,&from,sizeof(from));
- X}
- X
- Xmain()
- X{
- X int sock;
- X int length;
- X struct sockaddr_in name;
- X
- X /* create socket from which to read */
- X sock = socket(AF_INET, SOCK_DGRAM, 0);
- X if (sock < 0) {
- X perror("opening datagram socket");
- X exit(-1);
- X }
- X
- X /* create name and bind */
- X name.sin_family = AF_INET;
- X name.sin_addr.s_addr = INADDR_ANY;
- X name.sin_port = UDPPORT;
- X if (bind(sock, &name, sizeof(name))) {
- X perror("binding datagram socket");
- X exit(-2);
- X }
- X
- X /* check port value */
- X length = sizeof(name);
- X if (getsockname(sock, &name, &length)) {
- X perror("getting socket name");
- X exit(-3);
- X }
- X#ifdef DEBUG
- X printf("Socket has port #%d\n",ntohs(name.sin_port));
- X#endif
- X
- X for (;;) {
- X doecho(sock);
- X }
- X
- X /* NOTREACHED */
- X}
- SHAR_EOF
- chmod 0444 udptestd.c || echo "restore of udptestd.c fails"
- fi
- if test -f validate.h; then echo "File validate.h exists"; else
- echo "x - extracting validate.h (Text)"
- sed 's/^X//' << 'SHAR_EOF' > validate.h &&
- Xtypedef struct _req {
- X int seq;
- X int delaytime;
- X} req;
- X
- Xtypedef struct _rep {
- X int seq;
- X int delaytime;
- X int tinsec, tinusec, toutsec, toutusec;
- X} rep;
- SHAR_EOF
- chmod 0444 validate.h || echo "restore of validate.h fails"
- fi
- exit 0
- Richard A. Golding golding@cello.hpl.hp.com or
- UC Santa Cruz CIS Board (grad student) golding@cis.ucsc.edu (best) or
- golding@slice.ooc.uva.nl
- Post: Baskin Centre for CE & IS, Appl. Sci. Bldg., UC, Santa Cruz CA 95064
-
- --
- =========================== MODERATOR ==============================
- Steve Stevenson {steve,fpst}@hubcap.clemson.edu
- Department of Computer Science, comp.parallel
- Clemson University, Clemson, SC 29634-1906 (803)656-5880.mabell
-