Commit d4bdd787 authored by Russ Fish's avatar Russ Fish

Linktest for Windows tweaks.

parent b2593672
......@@ -110,18 +110,18 @@ client: all
$(MAKE) -C iperf client
client-install: client
@if test ! -x '/usr/local/bin/rude' -o \
! -x '/usr/local/bin/crude' -o \
! -x '/usr/local/bin/emulab-iperf'; then \
@if test ! -x '/usr/local/bin/rude$(EXE)' -o \
! -x '/usr/local/bin/crude$(EXE)' -o \
! -x '/usr/local/bin/emulab-iperf$(EXE)'; then \
echo "**********************************************************"; \
echo "* *"; \
echo "* WARNING: Some tools needed by linktest were not found. *"; \
echo "* *"; \
echo "* Make sure the following executables are installed: *"; \
echo "* *"; \
echo "* /usr/local/bin/rude *"; \
echo "* /usr/local/bin/crude *"; \
echo "* /usr/local/bin/emulab-iperf *"; \
echo "* /usr/local/bin/rude$(EXE) *"; \
echo "* /usr/local/bin/crude$(EXE) *"; \
echo "* /usr/local/bin/emulab-iperf$(EXE) *"; \
echo "* *"; \
echo "**********************************************************"; \
fi
......
......@@ -296,7 +296,7 @@ sub doboot()
# Start the linktest daemon. This script will exit without running
# linktest is the node is hosting SIM or JAILS.
#
if (-x "$RCDIR/rc.linktest" && ! WINDOWS()) {
if (-x "$RCDIR/rc.linktest") {
system("$RCDIR/rc.linktest start");
if ($?) {
fatal("Error running $RCDIR/rc.linktest");
......
......@@ -129,6 +129,26 @@ MSDN documentation:
Device Installation: Windows DDK: Device Identification Strings
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/install/hh/install/idstrings_a974863f-a410-4259-8474-b57a3e20d326.xml.asp
--------------------------------
Rude and Crude: Real-time UDP Data Emitter and Collector for Rude
Used by linktest level 3 to verify link delays
The -P argument for setting real-time priority is not supported on Windows.
Web home page: http://rude.sourceforge.net/
Sources: rude-0.70.tar.gz - http://prdownloads.sourceforge.net/rude/rude-0.70.tar.gz
c_rude.patch - Ifdef out the Linux mmap and sched calls.
Executables and man pages: /usr/{local/{bin/{,c}rude.exe,man/man8/{,c}rude.8},share/doc/rude}
Tar file: rude_cygwin_0.70.tgz
Install with: tar xvfz rude_cygwin_0.70.tgz -C /usr
--------------------------------
iperf: TCP/UDP Bandwidth Measurement Tool
Used by linktest level 4 to verify link bandwidth.
Patched by Emulab, installed as emulab-iperf.
Web home page and sources: http://dast.nlanr.net/Projects/Iperf
================================================================
Windows drivers for the Emulab machines:
......
*** crude/main.c~ Thu Jun 13 06:15:21 2002
--- crude/main.c Wed Nov 9 10:56:56 2005
***************
*** 35,42 ****
--- 35,44 ----
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/time.h>
+ #ifndef __CYGWIN__
#include <sched.h>
#include <sys/mman.h>
+ #endif /* ifndef__CYGWIN__ */
#include <arpa/inet.h>
#include <netinet/in.h>
#include <limits.h>
***************
*** 106,112 ****
--- 108,116 ----
long temp1 = 0;
int ps_flag = 0;
struct sigaction action;
+ #ifndef __CYGWIN__
struct sched_param p;
+ #endif /* ifndef__CYGWIN__ */
char *sptr, *eptr;
struct flow_stat *newflows;
***************
*** 288,293 ****
--- 292,298 ----
/* (if retval < 0 -> ERROR or/and EXIT IMMEDIATELY) */
if(retval < 0){ goto crude_exit; }
+ #ifndef __CYGWIN__
/*
* If this process is owned by root we can do some tricks to
* improve the performance... (the -P option)
***************
*** 306,312 ****
goto crude_exit;
}
RUDEBUG7("crude: program priority set to %d\n", p.sched_priority);
! }
/* Activate the signal handler(s) */
memset(&action, 0, sizeof(struct sigaction));
--- 311,318 ----
goto crude_exit;
}
RUDEBUG7("crude: program priority set to %d\n", p.sched_priority);
! }
! #endif /* ifndef__CYGWIN__ */
/* Activate the signal handler(s) */
memset(&action, 0, sizeof(struct sigaction));
***************
*** 332,337 ****
--- 338,344 ----
crude_exit:
if (retval >= 0 && nflows > 0) { ps_flag = 1; }
+ #ifndef __CYGWIN__
/*
* Restore the tweaked settings...
*/
***************
*** 348,354 ****
/* Release the locked memory */
munlockall();
! }
if(ps_flag){ print_stats(); }
if(main_file > 0){ close(main_file); }
--- 355,362 ----
/* Release the locked memory */
munlockall();
! }
! #endif /* ifndef__CYGWIN__ */
if(ps_flag){ print_stats(); }
if(main_file > 0){ close(main_file); }
***************
*** 384,392 ****
--- 392,403 ----
*/
void crude_handler(int value)
{
+ #ifndef __CYGWIN__
struct sched_param pri;
+ #endif /* ifndef__CYGWIN__ */
RUDEBUG7("\ncrude: SIGNAL caught - exiting...\n");
+ #ifndef __CYGWIN__
/* Check & restore process priority */
if((getuid() == 0) && (sched_getscheduler(0) != SCHED_OTHER)){
pri.sched_priority = 0;
***************
*** 395,401 ****
} else {
RUDEBUG7("crude_handler: crude priority restored\n");
}
! }
if(nflows > 0){ print_stats(); }
if(main_file > 0){ close(main_file); }
--- 406,413 ----
} else {
RUDEBUG7("crude_handler: crude priority restored\n");
}
! }
! #endif /* ifndef__CYGWIN__ */
if(nflows > 0){ print_stats(); }
if(main_file > 0){ close(main_file); }
*** rude/flow_txmit.c~ Thu Jun 13 06:15:21 2002
--- rude/flow_txmit.c Wed Nov 9 10:50:46 2005
***************
*** 29,36 ****
--- 29,38 ----
#include <string.h>
#include <unistd.h>
#include <errno.h>
+ #ifndef __CYGWIN__
#include <sched.h>
#include <sys/mman.h>
+ #endif /* ifndef__CYGWIN__ */
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
*** rude/main.c~ Thu Jun 13 06:15:21 2002
--- rude/main.c Wed Nov 9 10:56:01 2005
***************
*** 31,42 ****
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
- #include <sys/mman.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sched.h>
#include <arpa/inet.h>
#include <netinet/in.h>
--- 31,44 ----
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/socket.h>
+ #ifndef __CYGWIN__
#include <sched.h>
+ #include <sys/mman.h>
+ #endif /* ifndef__CYGWIN__ */
#include <arpa/inet.h>
#include <netinet/in.h>
***************
*** 82,88 ****
--- 84,92 ----
int retval = 0;
uid_t user_id = getuid();
struct sigaction action;
+ #ifndef __CYGWIN__
struct sched_param p;
+ #endif /* ifndef__CYGWIN__ */
printf("rude version %s, Copyright (C) 1999 Juha Laine and Sampo Saaristo\n"
"rude comes with ABSOLUTELY NO WARRANTY!\n"
***************
*** 198,203 ****
--- 202,208 ----
goto rude_exit1;
}
+ #ifndef __CYGWIN__
/*
* If this process is owned by root we can do some tricks to
* improve the performance... (the -P option)
***************
*** 217,222 ****
--- 222,228 ----
}
RUDEBUG7("rude: program priority set to %d\n", p.sched_priority);
}
+ #endif /* ifndef__CYGWIN__ */
/*
* All is fine - start looping & transmitting
***************
*** 229,234 ****
--- 235,241 ----
rude_exit:
+ #ifndef __CYGWIN__
/*
* Restore the tweaked settings...
*/
***************
*** 245,250 ****
--- 252,258 ----
/* Release the locked memory */
munlockall();
}
+ #endif /* ifndef__CYGWIN__ */
rude_exit1:
***************
*** 262,270 ****
--- 270,281 ----
void rude_handler(int value)
{
int ret_val = (value * (-1));
+ #ifndef __CYGWIN__
struct sched_param pri;
+ #endif /* ifndef__CYGWIN__ */
RUDEBUG7("\nrude_handler(): receiver SIGNAL %d - clean-up & exit\n",value);
+ #ifndef __CYGWIN__
/* Check & restore process priority */
if((getuid() == 0) && (sched_getscheduler(0) != SCHED_OTHER)){
pri.sched_priority = 0;
***************
*** 276,281 ****
--- 287,293 ----
}
munlockall();
+ #endif /* ifndef__CYGWIN__ */
clean_up();
exit(ret_val);
} /* main() */
*** rude/rude.8~ Thu Jun 13 06:15:21 2002
--- rude/rude.8 Wed Nov 9 15:09:55 2005
***************
*** 35,41 ****
The script
.IB file
describing the flows to be sent by the rude program.
! See ../rude/DOC/example.cfg, for an example.
.IP \fB\-h
Print a short help.
.IP \fB\-v
--- 35,41 ----
The script
.IB file
describing the flows to be sent by the rude program.
! See /usr/share/doc/rude/example.cfg, for an example.
.IP \fB\-h
Print a short help.
.IP \fB\-v
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment