Skip to main content

A comprehensive system monitoring tool powered by FastAPI.

Project description

Below is an example of a complete README.md file for your package:

# Soc Monitor

Soc Monitor is a comprehensive system monitoring tool built with FastAPI. It provides real-time metrics about your system's CPU usage, memory usage, disk usage, network speed, and more. Designed to be cross-platform, Soc Monitor works on Windows, Linux, and macOS.

## Features

- **Real-Time Metrics Streaming**
  - **CPU:** Overall usage and per-core usage.
  - **Memory:** System memory usage.
  - **Disk:** Disk usage across mounted partitions.
  - **Network:** Download/upload speeds and ping using speedtest-cli.
- **Top Processes Monitoring**
  - Top processes by CPU usage.
  - Top processes by memory usage.
  - Top processes by network connections.
- **WiFi Details**
  - Retrieve WiFi SSID and signal strength (with platform-specific logic for Windows, Linux, and macOS).
- **Detailed Process Information**
  - Platform-specific process details (using PowerShell on Windows, and Linux/macOS utilities).
- **CLI Tool**
  - Start the monitoring server with a single command.
- **API Endpoints**
  - Exposes endpoints for metrics streaming (`/metrics`) and process details (`/process`).
- **Interactive API Documentation**
  - Auto-generated Swagger UI and ReDoc docs when the server is running.

## Installation

Soc Monitor is available on PyPI. Install it using pip:

```bash
pip install soc_monitor

Usage

After installation, you can start the server using the command-line interface:

soc-monitor

By default, the server runs on http://0.0.0.0:8123. The following endpoints are available:

  • Streaming Metrics:
    GET /metrics – Streams real-time system metrics as Server-Sent Events (SSE).

  • Process Details:
    GET /process – Returns detailed process information in JSON format.

API Documentation

When the server is running, you can access the interactive API documentation at:

Configuration

Soc Monitor automatically detects your operating system and adjusts its behavior accordingly. No additional configuration is required for basic usage.

Development

To contribute to Soc Monitor or run it locally from the source, follow these steps:

  1. Clone the Repository:

    git clone https://github.com/Shreyashs98/soc-monitor.git
    cd soc-monitor
    
  2. Create and Activate a Virtual Environment:

    python -m venv venv
    # On Linux/macOS:
    source venv/bin/activate
    # On Windows:
    venv\Scripts\activate
    
  3. Install Development Dependencies:

    pip install -e .
    
  4. Run the Development Server:

    soc-monitor
    

Contributing

Contributions are welcome! If you have suggestions or improvements, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix:
    git checkout -b feature/YourFeature
  3. Commit your changes and push your branch.
  4. Open a pull request describing your changes.

License

This project is licensed under the MIT License.

Author

Shreyas H S
Email: s09082003@gmail.com
GitHub: Shreyashs98

Acknowledgments

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

soc_monitor-0.2.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

soc_monitor-0.2.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file soc_monitor-0.2.0.tar.gz.

File metadata

  • Download URL: soc_monitor-0.2.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for soc_monitor-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9a1976e5996717aced7deab31bbc4bdcade03496a256e1ef9b10033a82a1ca3a
MD5 3e9712bc3063386c9b18a732d8803bbf
BLAKE2b-256 c75c79e5246d90bf673e2ac4e8086f024f14261a11f2808cba92feac3d01a061

See more details on using hashes here.

File details

Details for the file soc_monitor-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: soc_monitor-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for soc_monitor-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6308c62a20f849fed7aa25151dfda709fb5bc530a42423c1f7153d93923cab57
MD5 1abedd4de3d7a34acfc9f84d311f3071
BLAKE2b-256 e910c13213d1eae80639382989eddca4a71ac20ae06f5dd92c258c0d1c43a059

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page