Skip to content

A lightweight LAN-based system monitoring tool built with FastAPI + WebSockets. It allows you to monitor CPU, RAM, Disk, Processes, and Network usage of your system from any device on your local network via a browser.

License

Notifications You must be signed in to change notification settings

akashdip2001/LAN-System-Monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LAN System Monitor

IMG20250817035818

A lightweight LAN-based system monitoring tool built with FastAPI + WebSockets. It allows you to monitor CPU, RAM, Disk, Processes, and Network usage of your system from any device on your local network via a browser.


🚀 Features

  • 📊 Real-time system metrics (CPU, RAM, Disk, Processes, Network)
  • 🌍 Access from any device on the same LAN (PC, phone, tablet)
  • 🔒 Token-based authentication
  • ⚡ Fast, asynchronous backend using FastAPI + Uvicorn
  • 🖥️ Web dashboard auto-refreshes metrics every second

📂 Project Structure

LAN-System-Monitor/
│── main.py        # Main application script
│── requirements.txt
│── README.md
│── dist/          # (generated after building exe with PyInstaller)
│── venv/          # (optional, local virtual environment)

🔧 Installation & Setup

1️⃣ Clone Repository

git clone https://github.com/yourusername/LAN-System-Monitor.git
cd LAN-System-Monitor

2️⃣ Create Virtual Environment (Recommended)

python -m venv venv
source venv/bin/activate   # on Linux / Mac
venv\Scripts\activate      # on Windows

3️⃣ Install Dependencies

pip install -r requirements.txt

If you don’t have requirements.txt yet, create it with:

fastapi
uvicorn
psutil

▶️ Running the Agent

Run with Python

python main.py

You’ll see output like:

Agent URL:   http://192.168.1.42:8765
Auth token:  'change-me'
image

Open that URL in your browser (PC or mobile), enter the token, and start monitoring.


🔒 Configuration

The agent uses environment variables for customization:

  • AGENT_PORT → Server port (default: 8765)
  • AGENT_TOKEN → Auth token (default: change-me)

Example (Linux/macOS):

export AGENT_PORT=9000
export AGENT_TOKEN=super-secret
python main.py

Example (Windows PowerShell):

$env:AGENT_PORT="9000"
$env:AGENT_TOKEN="super-secret"
python main.py

📦 Building Standalone EXE (Windows)

Use PyInstaller to create a single-file executable:

pip install pyinstaller
pyinstaller --onefile main.py

The EXE will be generated in the dist/ folder. Run it directly:

dist\main.exe

🛠 Tech Stack

  • FastAPI – High-performance API framework
  • Uvicorn – ASGI server
  • psutil – System resource monitoring

About

A lightweight LAN-based system monitoring tool built with FastAPI + WebSockets. It allows you to monitor CPU, RAM, Disk, Processes, and Network usage of your system from any device on your local network via a browser.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages