Running webstone on Linux - dkegel@activision.com, 28 April 1998 [Updated rexec discussion on 5 October 1999] Actually, the first five steps apply on any system. 1. Pick a test account that's present on all machines involved in test. (Your personal account will do if it has the same name and password on each host.) 2. Set up the test account's .rhosts file on all machines to include all the machines in the test, plus localhost. If you have three hosts, dkegel1, dkegel3, and dkegel6, in domain acme.com, it should look like this: localhost dkegel1 dkegel1.acme.com dkegel3 dkegel3.acme.com dkegel6 dkegel6.acme.com (This is overkill, but it is sufficient.) 3. Mark .rhosts as not writable by anyone but you, else PAM will disallow it. e.g. chmod g-w .rhosts 4. Test rsh to make sure you can execute commands remotely from the host that will be controlling the test. e.g. rsh dkegel5 ls 5. Download and unpack the Webstone 2.0 sources from ftp://ftp.mindcraft.com/pub/webstone/WebStone-2.0.tar.gz 6. cd to WebStone/src and apply the patch included at end of this readme. (Patch is smart enough to ignore the text before the actual patch.) e.g. patch < webstone-readme.txt The patch fixes some compilation errors, and switches to rsh from rexec, since Linux's rexecd is broken (in all releases of Red Hat Linux up to 6.0, I think). I don't have patches for Webstone 2.5. If you don't want to use rsh instead of rexec, you can fix Linux's rexecd. Patches for Linux's rexecd are available. According to one fellow, > > > The fix is to move the code for opening the return port up in the > > > code path, and to add a child handler. There may be other bugs, > > > but those fixes were enough to get WebStone working with RedHat 5.1. See also http://www.deja.com/getdoc.xp?AN=538195908 http://developer.redhat.com/bugzilla/show_bug.cgi?id=4415&BUGLIST=4415 http://x25.deja.com/getdoc.xp?AN=527920855 Debian has fixed it, but not Red Hat 6.0. 7. cd to WebStone and try to install it e.g. ./webstone -setup 8. When it fails to link, cd to src, edit Makefile, and delete the -lsocket; e.g. replace LIBS = -lsocket -lm #-lm with LIBS = -lm #-lsocket 9. make install It should compile fine now. 10. You're now ready to use Webstone as normal. Edit conf/testbed carefully, then run ./webstone. Note that the only way to change the port number of the web server is to include a full URL in conf/filelist instead of just filenames; the port number entry in conf/testbed doesn't work. 11. Sanity checks- Run top on the web server to make sure the web server processes really do get more active when you run the benchmark. Run top on the test machines to make sure the webclient processes really do get started when you run the benchmark. -- end of readme -- -- beginning of patch -- ### Apply this patch before configure. ### diff -c orig/WebStone/src/get.c new/WebStone/src/get.c *** orig/WebStone/src/get.c Tue Jun 4 19:24:27 1996 --- new/WebStone/src/get.c Thu Apr 30 09:01:41 1998 *************** *** 82,88 **** /*#define ABORTIVE_CLOSE 1*/ #ifdef ABORTIVE_CLOSE ! #error don't enable this option struct linger { int l_onoff; int l_linger; --- 82,88 ---- /*#define ABORTIVE_CLOSE 1*/ #ifdef ABORTIVE_CLOSE ! #error dont enable this option struct linger { int l_onoff; int l_linger; *************** *** 107,118 **** if (BADSOCKET(sock)) { D_PRINTF( "Call to connectsock returned %d (%s)\n", sock, neterrstr() ); ! returnerr("Couldn't connect to WWW server: %s\n", neterrstr()); goto error; } #ifdef ABORTIVE_CLOSE ! #error don't enable this option /* set up for abortive close */ linger_opt.l_onoff = 1; linger_opt.l_linger = 0; --- 107,118 ---- if (BADSOCKET(sock)) { D_PRINTF( "Call to connectsock returned %d (%s)\n", sock, neterrstr() ); ! returnerr("Couldn't connect to WWW server: %s, loc: %s, port %d\n", neterrstr(), loc, port); goto error; } #ifdef ABORTIVE_CLOSE ! #error dont enable this option /* set up for abortive close */ linger_opt.l_onoff = 1; linger_opt.l_linger = 0; diff -c orig/WebStone/src/sysdep.h new/WebStone/src/sysdep.h *** orig/WebStone/src/sysdep.h Tue Jun 4 19:24:27 1996 --- new/WebStone/src/sysdep.h Thu Apr 30 08:42:53 1998 *************** *** 45,51 **** #define S_ADDR S_un.S_addr #ifdef USE_TIMEZONE ! #error NT gettimeofday() doesn't support USE_TIMEZONE (yet) #else #define GETTIMEOFDAY(timeval, tz) gettimeofday(timeval) #endif /* USE_TIMEZONE */ --- 45,51 ---- #define S_ADDR S_un.S_addr #ifdef USE_TIMEZONE ! #error NT gettimeofday() doesnt support USE_TIMEZONE (yet) #else #define GETTIMEOFDAY(timeval, tz) gettimeofday(timeval) #endif /* USE_TIMEZONE */ diff -c orig/WebStone/src/webmaster.c new/WebStone/src/webmaster.c *** orig/WebStone/src/webmaster.c Tue Jun 4 19:24:27 1996 --- new/WebStone/src/webmaster.c Thu Apr 30 08:50:51 1998 *************** *** 619,624 **** --- 619,646 ---- puts(commandline); } + #define USE_RSH + #ifdef USE_RSH + /* a replacement for rexec using popen */ + int my_rexec(char **ahost, u_short port, char *username, char *passwd, char *command, int *fd2p) + { + char tempBuf[256]; + FILE *fp; + + /*printf("my_rexec: setting command line\n"); */ + sprintf(tempBuf, "rsh %s %s", *ahost, command); + /*printf("my_rexec: calling popen()\n"); */ + fp = popen(tempBuf, "r"); + if (!fp) { + printf("my_rexec: popen failed!\n"); + return -1; + } + /*printf("my_rexec: popen() succeed!\n"); */ + return fileno(fp); + } + #define rexec(ahost, port, username, passwd, command, fd2p) my_rexec(ahost, port, username, passwd, command, fd2p) + #endif + /* rexec to the client hosts and start the webclients */