Quick reference for all automation scripts included in the project.
The main launcher for the VMM simulator - handles everything automatically!
./start.shShows a menu with options:
- 🌐 Start Web GUI
- 💻 Run CLI with default settings
- ⚙️ Run CLI with custom settings (interactive)
- 🏃 Run performance benchmarks
- 🧪 Run test suite
- 📚 Show quick examples
- 🛠️ Build only (no run)
- 📖 Open documentation
- ❌ Exit
# Start web GUI
./start.sh gui
# Run CLI simulation
./start.sh cli [ram_mb] [algorithm] [trace_pattern] [tlb_size]
./start.sh cli 128 LRU working_set 64
# Run benchmarks
./start.sh benchmark
# Run tests
./start.sh test
# Build only
./start.sh build
# Show help
./start.sh help✅ Auto-detects if build is needed
✅ Generates traces if missing
✅ Colored output for better readability
✅ Interactive configuration
✅ Built-in examples and documentation
Cleanly stops all running VMM processes.
./stop.sh# Stop web server only
./stop.sh --web
# Stop VMM simulations only
./stop.sh --vmm
# Stop trace generators only
./stop.sh --trace
# Stop all and clean output files
./stop.sh --all --clean-output./stop.sh --status- 🌐 Web servers running on port 8000 (GUI)
- 💻 VMM simulation processes (
bin/vmm) - 📊 Trace generator processes (
bin/trace_gen)
# Also remove output files
./stop.sh --clean-outputRemoves:
output/*.json,output/*.csv,output/*.logbenchmarks/*.csv,benchmarks/*.json- Core dumps (
core.*) - Swap files (
*.swp)
./start.sh gui
# Opens browser to http://localhost:8000
# When done:
./stop.sh# Start with defaults
./start.sh cli
# Try different algorithms
./start.sh cli 64 FIFO random 32
./start.sh cli 64 LRU random 32
./start.sh cli 64 CLOCK random 32
# Compare results
cat output/*.log# Run all algorithms
./start.sh benchmark
# Results in benchmarks/*.csv
ls -lh benchmarks/
# View results
cat benchmarks/LRU_results.csv# Build and test
./start.sh build
./start.sh test
# If tests fail, check output
cat tests/output/*.log# Terminal 1: Web GUI
./start.sh gui
# Terminal 2: Run benchmarks while GUI is open
cd /path/to/VMM
./start.sh benchmark
# Terminal 3: Monitor
./stop.sh --status
# When done, stop everything
./stop.sh --all| Task | Command |
|---|---|
| Start GUI | ./start.sh gui or ./START gui |
| Run simulation | ./start.sh cli |
| Run benchmarks | ./start.sh benchmark |
| Run tests | ./start.sh test |
| Stop everything | ./stop.sh or ./STOP |
| Check status | ./stop.sh --status |
| Build project | ./start.sh build or make |
| Clean build | make clean && make |
| Help | ./start.sh help |
- ✅ Automatic dependency checking
- ✅ Smart build detection
- ✅ Trace auto-generation
- ✅ Interactive configuration wizard
- ✅ Beautiful colored output
- ✅ Built-in examples
- ✅ Documentation integration
- ✅ Error handling
- ✅ Process detection on port 8000
- ✅ Graceful shutdown (SIGTERM first)
- ✅ Force kill if needed (SIGKILL)
- ✅ Selective stopping (web/vmm/trace)
- ✅ Temporary file cleanup
- ✅ Status checking
- ✅ Confirmation of stopped processes
# Make scripts executable
chmod +x start.sh stop.sh START STOP# Stop existing server
./stop.sh --web
# Or use different port (edit gui launcher in start.sh)# Force rebuild
./start.sh build
# or
make clean && make# Generate traces
make traces
# or
./bin/trace_gen -t working_set -n 10000 -o traces/working_set.trace# Check what's running
./stop.sh --status
# Force stop everything
./stop.sh --all
# Manual kill if needed
lsof -ti:8000 | xargs kill -9
pkill -9 -f bin/vmmfor algo in FIFO LRU CLOCK OPT; do
./start.sh cli 64 $algo working_set 64 > results_$algo.txt
done# Run GUI in background
nohup ./start.sh gui > /dev/null 2>&1 &
# Later, stop it
./stop.sh --web# In one terminal
watch -n 1 './stop.sh --status'
# In another, run experiments
./start.sh benchmark#!/bin/bash
./start.sh build
./start.sh test
if [ $? -eq 0 ]; then
echo "✅ Tests passed!"
./start.sh benchmark
else
echo "❌ Tests failed!"
exit 1
fi# Day 1: GUI exploration
./start.sh gui
# Day 2-3: CLI basics
./start.sh cli 32 FIFO sequential 16
./start.sh cli 32 LRU sequential 16
# Day 4-5: Try different traces
./start.sh cli 64 LRU random 32
./start.sh cli 64 LRU working_set 32
./start.sh cli 64 LRU locality 32# Compare algorithms
./start.sh benchmark
# Custom traces
./bin/trace_gen -t random -n 5000 -o my_trace.trace
./start.sh cli 64 LRU my_trace 32# Modify code, rebuild, test
vim src/vmm.c
./start.sh build
./start.sh test
# Run specific configurations
./bin/vmm --help- Start script help:
./start.sh help - Stop script help:
./stop.sh --help - Makefile targets:
make help - VMM options:
./bin/vmm --help - Documentation:
./start.sh→ Option 8
Created by: Aditya Pandey, Kartik, Vivek, Gaurang
Happy simulating! 🚀