A Flask-based web application that provides a real-time dashboard for monitoring Slurm cluster status, jobs, and user statistics.
- Real-time job monitoring
- Cluster utilization statistics
- Top users statistics
- Clean and modern Bootstrap-based UI
- Auto-refresh functionality
- Python 3.x
- Slurm workload manager
- Access to Slurm commands (
squeue
,sreport
)
-
Clone the repository:
git clone <repository-url> cd slurmdashboard
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
The application can be configured to run on different ports and URLs in two ways:
-
Development Mode
- Open
slurmdashboard.py
- Modify the following line at the bottom of the file:
app.run(host='your.hostname.here', port=5000)
- Open
-
Production Mode (Gunicorn)
- When running with gunicorn, modify the
--bind
parameter in the service file - Open
slurmdashboard.service
- Modify the ExecStart line:
ExecStart=/path/to/venv/bin/gunicorn --workers 3 --bind hostname:port slurmdashboard:app
- When running with gunicorn, modify the
-
Configure the Service
- Copy the service file to systemd directory:
sudo cp slurmdashboard.service /etc/systemd/system/
- Edit the service file to match your environment:
- Update
User
andGroup
- Modify
WorkingDirectory
to match your installation path - Adjust
Environment
variables if needed - Update the
ExecStart
path and bind address
- Update
- Copy the service file to systemd directory:
-
Enable and Start the Service
# Reload systemd to recognize the new service sudo systemctl daemon-reload # Enable the service to start on boot sudo systemctl enable slurmdashboard # Start the service sudo systemctl start slurmdashboard # Check status sudo systemctl status slurmdashboard
-
Service Management Commands
# Stop the service sudo systemctl stop slurmdashboard # Restart the service sudo systemctl restart slurmdashboard # View logs sudo journalctl -u slurmdashboard
To run the application in development mode:
python slurmdashboard.py
The development server will start on http://localhost:5000 by default.
I wrote this largely with the help of AI to improve my python and Flask skills.