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

Uploaded Python 3

File details

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

File metadata

  • Download URL: procwatch_cli-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 46172f1fede22849be30dcd78205b7d596665cfa95c5ade9c365a1e17a370f4a
MD5 fb5f0272e7af44a0d5f0521575c7a827
BLAKE2b-256 4518b1c8307ee76c2814c21f65d534ba59634be071ea3ceec07985b3e2fe486e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: procwatch_cli-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fe597b30023fba0684a69e7038fd08d6c32b58eadf7ef2c32e699089121c2a1a
MD5 746e0257369b423713606b076080d1de
BLAKE2b-256 e46e10deb3835f4d8325296af133b491df1c57ffa2be02c73b7187d5f36b85cb

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