This simple Flask application dynamically displays essential system information about its runtime environment (whether it's a Docker container or a direct server) on an HTML page. This includes IP address, hostname, operating system details, CPU, and memory usage.
- Client Information: Displays the IP address and resolvable hostname of the requesting client.
- Backend System Information:
- Hostname and IP address of the server (or container) where the application is running.
- Operating system name, version, kernel version, and architecture.
- Python version.
- System uptime.
- Number of CPU cores.
- Live CPU Usage Percentage.
- Total, Used, and Percentage Memory Usage.
- Container-Friendly: Works seamlessly in containerized environments like Docker, accurately reporting resources allocated/used by the container.
- Simple & Lightweight: Quick setup and execution with minimal dependencies.
- Python 3.x
- Flask
- psutil
-
Clone the repository:
git clone https://github.com/mustafaUrl/sys-info.git
cd sys-info -
Create and activate a Python virtual environment (recommended):
python -m venv venv # Windows .\venv\Scripts\activate # macOS/Linux source venv/bin/activate
-
Install the dependencies:
pip install -r requirements.txt
-
Start the application:
python app.py
-
Open your browser and navigate to
http://127.0.0.1:5000.
This application can also be run as a Docker image, making deployment incredibly easy.
- Ensure you have Docker installed and running on your system.
- Pull the Docker image:
docker pull uraler/sys-info:latest
- Run the Docker container:
docker run -p 5000:5000 uraler/sys-info:latest
- Open your browser and navigate to
http://localhost:5000.
This project is licensed under the MIT License. See the LICENSE file for more details.
Contributions are always welcome! If you find bugs, want to add new features, or suggest improvements, feel free to open an issue or submit a pull request.