Skip to main content

Process watchdog CLI for monitoring and restarting services

Project description

🔹 Task 3: Service Monitor & Auto-Restart

Goal:

Monitor if a process is running. If not, restart it.

Example:

procwatch --pid 34349

procwatch --match "python server.py"
procwatch --port 8000

Requirements:

  • Check every N seconds
  • Log events
  • Handle failures
  • Timeout protection

Multiple cli

procwatch --match "python -m http.server 8000" --restart "python -m http.server 8000"
procwatch --port 8000 --restart "/usr/bin/startmyapp" --interval 4

Skills Learned:

  • Loop automation
  • Subprocess execution
  • Timeouts
  • Basic watchdog design

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

procwatch_cli-0.1.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

procwatch_cli-0.1.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file procwatch_cli-0.1.2.tar.gz.

File metadata

  • Download URL: procwatch_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for procwatch_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 464ef4a86f5b6ade8bb856193d3c970423a5b459f271279aed8c8af82063f81d
MD5 275f3526900156be5a0b463c5a5544fd
BLAKE2b-256 66d4271a06b1f19b407000cda6e41c174b713643aad22f44d141790a75853fed

See more details on using hashes here.

File details

Details for the file procwatch_cli-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: procwatch_cli-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for procwatch_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 571d6653cb028338fa7eeebdcf56ccded2adbd3151c61266b41602c20b0792c7
MD5 213de84f405c0f5070f4bf0a75a7183b
BLAKE2b-256 58c2033c349432b3fd55ca5f811455e30f6a6a974d1f8431e94bef1714e04967

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