Create README.md
This commit is contained in:
1 parent
99ca593c06
commit
40f64c8ebb
1 file changed
+40
@@ -0,0 +1,40 @@
|
|||||||
|
# MP1 Usage
|
||||||
|
|
||||||
|
## Running MP1
|
||||||
|
|
||||||
|
Use `run_mp.sh <1..10|all>` to start the socket servers on specific VMs:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./run_mp.sh 3
|
||||||
|
./run_mp.sh all
|
||||||
|
```
|
||||||
|
|
||||||
|
Use `kill_mp.sh <1..10|all>` to stop the socket servers on specific VMs:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./kill_mp.sh 3
|
||||||
|
./kill_mp.sh all
|
||||||
|
```
|
||||||
|
|
||||||
|
Use `deploy_mp.sh` to kill the servers on all VMs, pull the latest version of `main`, and restart every server using `run_mp.sh`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./deploy_mp.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
After deployment, the `grepp` command should be available. Use it like regular `grep`, but it searches the log files across all ten machines:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
grepp ERROR
|
||||||
|
grepp -E 'GET|POST'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
Run `test.py` on your local machine:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 test.py
|
||||||
|
```
|
||||||
|
|
||||||
|
The script generates test log files, runs `grepp` with the `-t` flag, checks the output for correctness, and deletes the generated test files afterward.
|
||||||
Reference in new issue
Block a user