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.5.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.5-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: procwatch_cli-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 672a7ac4f0ec1609a238e8cacc8b857fb21c642ba441dfbd8345d2543915856b
MD5 3ba00e2442bcbe4d42ac2d346316f947
BLAKE2b-256 dbbeac80822d0ff2dac2bf7c1e4ad1d0489e23bae8ca9253243f88897bf8e2d4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: procwatch_cli-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cd6f7c4d0c73fa211ace6eee4e59e1fb37e401e5ec3c2f968a4f44d56091ae80
MD5 1a71e508b7ce16ff9c2c238d0dd5ef8d
BLAKE2b-256 7072e2e76661aeeb98ae772f557ca4d64fda233b5af945847322d601ef6a9389

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