PID Tester

Software Engineering - CS536

University of Wisconsin - Milwaukee

Authors:




Overview :

PID Tester runs processes and checks their PID. If the PID is odd, it records a 1. If even, a zero gets recorded. After 8 tests, the program has one random byte of information. It gets written to a temporary file, where a java program reads this temp file, and sends this byte to the server via the BitSender class. The BitSender looks in ServerPrefs for a hostname and port to send the byte to.


File List :

miller.cs: ls -l
total 36
-rwx------   1 netrand  11022         34 Oct  6 13:18 addgrepfile
-rw-------   1 netrand  11022        412 Nov 24 14:15 grepfile
-rw-------   1 netrand  11022        149 Nov 24 14:13 makefile
-rw-------   1 netrand  11022          1 Nov 24 14:15 random.byte
-rwx------   1 netrand  11022      24576 Nov 16 22:16 rng
-rw-------   1 netrand  11022       1849 Nov 16 22:15 rng.cc
-rw-------   1 netrand  11022       1955 Nov 24 14:15 rng.man
-rwx------   1 netrand  11022        143 Nov 11 13:44 runme
-rw-------   1 netrand  11022        980 Nov 11 13:48 sendrn.class
-rw-------   1 netrand  11022       1381 Nov 11 13:51 sendrn.java
miller.cs:

runme is a script that does:
#!/bin/csh
while ( 1 == 1 )                    
    rm -f grepfile        
    rm -f grepfile2
    foreach x ( 1 2 3 4 )           
        addgrepfile
    end
    rng
    java sendrn
end
To run the PID Tester client, type runme at the prompt. This is a c-script that loops infinitely, creating an indefinite amount of random bits. It does 4 things:
1. Clean up some temp files from the previous run.
2. Run addgrepfile 4 times. This generates 2 PID's each, writes them into a file grepfile.
3. Run rng. This processes the grepfile and writes the byte into a file random.byte
4. Run sendrn, class that uses java sockets to send the byte to the server.
Other files included with the client are the makefile which is handmade, based on other makefiles. rng.cc and sendrn.java are the 2 sources which must be compiled for the scripts to operate correctly.