Skip to main content

Python SDK and CLI to interact with the sysmon daemon

Project description

sysmon_sdk

Build Coverage

A lightweight Python system monitoring SDK and CLI...

A lightweight Python system monitoring SDK and CLI that communicates with a background daemon process via Unix Domain Sockets (UDS). It lets users query system metrics like CPU and memory, and control the daemon using simple CLI commands.


🚀 Features

  • 🔧 Multithreaded daemon to monitor CPU and memory usage
  • 📡 Client-server communication over Unix domain sockets
  • 🧪 Test coverage with pytest, pytest-cov
  • 🖥 Simple CLI interface: status, metrics, shutdown
  • 🔐 PID file support and graceful shutdown

📦 Installation (from TestPyPI)

You can install the package from TestPyPI using:

pip install --index-url https://test.pypi.org/simple/ sysmon-sdk

⚠️ Make sure psutil is installed if not already. You can run:
pip install psutil


🧑‍💻 Usage

First, run the daemon (this runs in the background):

python -m sysmon_sdk.daemon

Then use the CLI commands:

sysmon status     # Check daemon status
sysmon metrics    # View current CPU and memory usage
sysmon shutdown   # Gracefully shut down the daemon

🛠 Developer Setup

Clone the repository and install locally:

git clone https://github.com/YOUR_USERNAME/sysmon-sdk.git
cd sysmon-sdk
pip install .

To run the CLI directly from source:

python -m sysmon_sdk.cli status

🧪 Running Tests

Run all unit and integration tests:

pytest

To get test coverage:

pytest --cov=sysmon_sdk --cov-report=html
open htmlcov/index.html

To run all tests and generate coverage reports with daemon:

./test_runner.sh

📁 Project Structure

sysmon_sdk/
├── cli.py         # CLI entry point
├── core.py        # Client-side socket interaction
├── daemon.py      # Multithreaded background process
├── config.py      # Loads socket path/config
├── config.json    # Optional config file

📜 License

This project is licensed under the MIT License.
Feel free to use, modify, and distribute.


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

sysmon_sdk-0.1.3.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

sysmon_sdk-0.1.3-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file sysmon_sdk-0.1.3.tar.gz.

File metadata

  • Download URL: sysmon_sdk-0.1.3.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for sysmon_sdk-0.1.3.tar.gz
Algorithm Hash digest
SHA256 dbba329fe1b2d7c1d5b3b05792fcd9360bfc8261f701f6cd6a06887ed18e80c6
MD5 007f97008677ff910172cf7167e4cb62
BLAKE2b-256 ca45974249b6ab5e0fe92017780cb9238e05d77a7ebbdda6ca3ab69809e2ab3b

See more details on using hashes here.

File details

Details for the file sysmon_sdk-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: sysmon_sdk-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for sysmon_sdk-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8a871076c17e081f3d6e19b311b2026b164346f28d77c2028fedfbd5111e140c
MD5 7cdb49cc34e65ea618412989260dbc72
BLAKE2b-256 a5c3cef9bcdf9f3a9c951a98dd23ddab7a20e22cb8e804157be85881bece9c8b

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