Skip to main content

Monitor system stats and prevent system sleep when significant activity is detected.

Project description

Sleep Guard

Other tools such as Caffeine for Linux and Caffeinate for the Mac will keep your system awake, but require explicit action by the user. If you are like me, I often start a long running process, but forget to actually take the explicit action and come back to a sleeping system with no work done.

sleepguard is a program that monitors several system resources and prevents the computer from sleeping automatically if it detects significant activity (as defined by the user).

Installation

pip install sleepguard

To enable GPU monitoring you must install one (or both) of the optional variants: pyadl for AMD or gputil for NVIDIA cards.

pip install sleepguard[pyadl,gputil]

Basic Usage

The main application is implemented in the sleepguard.guard module and can be run like any other python application. This will start an infinite loop that periodically polls the desired system resources and will prevent the system from sleeping [1] if any of the values are above their configured thresholds.

python -m sleepguard.gaurd

Full Documentation

See read the docs for the full documentation and configuration options.

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

sleepguard-0.1.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

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

sleepguard-0.1.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file sleepguard-0.1.0.tar.gz.

File metadata

  • Download URL: sleepguard-0.1.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for sleepguard-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c24f33c029615a8a23f813c14c04651b50acac50933fee958166b81804d03f1d
MD5 0daff3f38be55c906cc6c7be15abc7e8
BLAKE2b-256 77ba310e11b42e52cda4329231f0a621734efa769f7ce684b385fca10019feef

See more details on using hashes here.

File details

Details for the file sleepguard-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sleepguard-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for sleepguard-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b4a0d7ce374e5773747682c946bf03541d6b41ebf27a4f2489ee7996986dfe5
MD5 680b2214dd6e69b5d0ed3121792cd2e4
BLAKE2b-256 0b925a2afc7c2c9a9fbdf7593ebfc608ea35d5efab171ea6e7c2d0f587d924f5

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