Skip to content

NeelFrostrain/UnrealLogMonitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 Unreal Engine Monitor

A lightweight real-time monitoring dashboard for Unreal Engine processes built with Go. Monitor multiple UE4/UE5 instances simultaneously, track performance metrics (CPU, RAM, GPU, VRAM), and view live project logs from a centralized web interface.

License Go Version Platform

Unreal Engine Monitor Dashboard

✨ Key Features

  • 📊 Real-time Process Monitoring

    • Auto-detect all running Unreal/UE4 processes
    • Track CPU, RAM, GPU, VRAM usage per process
    • Monitor threads, handles, and start times
    • Normalized CPU usage by core count
  • 📋 Live Project Logs

    • View latest logs from each project's Saved/Logs directory
    • Automatic log file detection and tailing (last 50 lines)
    • Manual refresh per project
    • Real-time updates
  • 🎯 App Performance Dashboard

    • Monitor app uptime, RAM usage, and CPU
    • System memory usage overview
    • Total process count tracking
    • Individual app VRAM usage
  • 🎨 Modern Dark UI

    • Unreal Engine-inspired color scheme
    • Responsive card-based layout
    • Auto-refresh every 2-5 seconds
    • Optimized for extended monitoring sessions

🖥️ System Requirements

  • OS: Windows 10+ (uses PowerShell for system queries)
  • Go: 1.21 or higher
  • Unreal Engine: UE4 or UE5
  • Memory: Minimal overhead (<5MB)

📦 Installation

1. Clone the Repository

git clone https://github.com/NeelFrostrain/UnrealLogMonitor.git
cd UnrealLogMonitor

2. Build from Source

# Using Makefile
make build

# Or directly with Go
go build -o bin/monitor.exe .

3. Run the Application

# Run the compiled binary
./bin/monitor.exe

# Or use make
make run

# Or run directly with Go
make dev

The dashboard will be available at http://localhost:8080

🚀 Usage

The main dashboard displays:

  • Process Cards: Each Unreal process in a card showing:

    • Project name
    • Engine version
    • CPU usage (%)
    • RAM usage (GB)
    • GPU usage (%)
    • VRAM usage (MB)
    • Process ID
    • Start time
  • Live Updates: Dashboard refreshes automatically every 2-5 seconds

  • Real-time Data: CPU, GPU, and memory metrics update in real-time

Available Routes

Route Purpose
/ Main dashboard with process cards
/api/stats Get all process statistics (JSON)
/api/logs/{projectPath} Retrieve logs for a specific project
/api/app-stats Get monitor app's own stats

The application provides REST API endpoints for data consumption:

Get Process Statistics

GET /api/stats

Returns JSON array of all running Unreal processes with metrics:

{
  "Type": "DATA",
  "Data": [
    {
      "PID": 12345,
      "Engine": "UE5",
      "Project": "MyProject",
      "Path": "C:\\Projects\\MyProject\\MyProject.uproject",
      "RAM": "2.50 GB",
      "CPU": 15,
      "GPU": 45,
      "VRAM": 2048,
      "Threads": 128,
      "Handles": 1024,
      "StartTime": "2026-03-02 10:30:45"
    }
  ]
}

Get Project Logs

GET /api/logs/{projectPath}

Returns the latest log file from a project's Saved/Logs directory:

{
  "fileName": "MyProject.log",
  "content": "... last 50 lines of log ..."
}

Get App Statistics

GET /api/app-stats

Returns monitoring application's own statistics:

{
  "uptime": "2m 30s",
  "appMemory": "0.52 MB",
  "systemMemory": "12.1 GB / 16 GB",
  "processCount": 2,
  "totalCpu": 5,
  "totalVram": 128
}

📁 Project Structure

UnrealLogMonitor/
├── main.go                 # HTTP server, routes, API endpoints
├── monitor.go              # Core monitoring logic, system queries
├── go.mod                  # Go module (v1.21)
├── Makefile                # Build commands (dev, build, run, clean)
├── README.md               # Project documentation
│
├── bin/
│   └── monitor.exe         # Compiled executable (created on build)
│
├── templates/
│   └── index.html          # Main dashboard HTML/CSS/JS (467 lines)
│
├── static/
│   ├── css/
│   │   └── style.css       # Dashboard styles
│   └── js/
│       └── app.js          # Frontend JavaScript (if used)
│
└── unreal_ultra_log.txt    # Internal log file (auto-created, max 5MB)

🔧 Configuration

Log File Management

  • Logs are stored in unreal_ultra_log.txt in the same directory as the executable
  • Automatically resets when exceeding 5MB to prevent storage issues

Auto-Refresh Intervals

  • Projects Page: 5-second refresh interval
  • App Stats: 2-second refresh interval

Port Configuration

  • Default port: 8080
  • Uses http.ListenAndServe(":8080", nil)

🏗️ Building

Development

make dev
# Runs: go run .

Production Build

make build
# Builds optimized binary with stripped debug symbols
# Output: bin/monitor.exe

Clean Build

make clean
# Removes bin/ directory and log files

🔍 How It Works

Process Detection

  • Uses PowerShell queries to enumerate processes matching "Unreal" or "UE4"
  • Extracts command-line arguments to identify project paths
  • Detects .uproject files using regex pattern matching

Performance Metrics

  • CPU: Normalized by logical processor count for accurate percentage
  • GPU/VRAM: Uses Windows Performance Monitor counters
  • Memory: Reads from WorkingSet64 process property
  • Threads/Handles: Counted from process statistics

Log Retrieval

  • Searches {ProjectPath}/Saved/Logs/ directory
  • Sorts by modification time (newest first)
  • Returns last 50 lines of the most recent .log file

System Stats

  • Uptime: Calculated from app start time
  • Memory Usage: Go's runtime.MemStats
  • System RAM: PowerShell Win32_PhysicalMemory CIM instance
  • CPU Usage: Per-process PowerShell query with core normalization

📊 Key Functions

Function Purpose
GetStats() Collects all Unreal process data with metrics
getGPUStats() Queries Windows GPU performance counters
GetProjectLogs() Retrieves latest log file from project
GetAppStats() Returns monitor app's own statistics
getAppCPUUsage() Gets monitor app CPU usage percentage
formatDuration() Formats uptime in human-readable form
getSystemMemory() Queries total and used system memory

⚙️ Customization

Change Default Port

Edit main.go line with http.ListenAndServe(":8080", nil):

log.Fatal(http.ListenAndServe(":9090", nil))  // Use port 9090

Modify Refresh Interval

Edit templates/index.html JavaScript:

// Change from 100ms to desired interval
const LOG_REFRESH_RATE = 100;

Adjust Log Retention

Edit monitor.go in GetProjectLogs():

startIdx := len(logLines) - 100  // Show 100 lines instead of 50

🐛 Troubleshooting

No Processes Showing

  • Ensure UE4/UE5 processes are actually running
  • Check Windows firewall isn't blocking local connections
  • Verify PowerShell can query process information

Logs Not Loading

  • Confirm project path is correct
  • Check if {ProjectPath}/Saved/Logs/ directory exists
  • Ensure .log files are present in the logs directory

High Memory Usage

  • Log files are capped at 5MB automatically
  • Monitor app itself uses minimal memory (<5MB)
  • Clear browser cache if excessive memory reported

PowerShell Errors

  • Ensure running on Windows 10+
  • PowerShell should be available in system PATH
  • Run as administrator if permission issues occur

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🤝 Contributing

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest features
  • Submit pull requests

📞 Support

For issues, questions, or suggestions, please open an issue on the GitHub repository.


Made with ❤️ for Unreal Engine developers

About

A lightweight real-time monitoring dashboard for Unreal Engine processes built with Go. Monitor multiple UE4/UE5 instances simultaneously, track performance metrics (CPU, RAM, GPU, VRAM), and view live project logs from a centralized web interface.

Topics

Resources

License

Stars

Watchers

Forks

Contributors