powertool
Python utility to wake up(wol) and suspend Linux machines remotely
Free software: MIT license
Features
Wake up remote machines using hostname/ip.
Suspend remote machines using hostname
Wake on lan (WOL)
Wake up feature uses WOL magic packet. Since mac addresses are hard to remember/use, this tool lets you wake up or suspend machines by their name or IP.
First register your machines
powertool register -b 192.168.1.255 aa:bb:cc:dd:ee:ff you@host
-b Broadcast_IP - this is the subnet on which your machine’s ip is. If your machine’s ip is 192.168.1.xxx, then this is 192.168.1.255(default)
aa:bb:cc:dd:ee:ff - your machines’ mac address. You can find this on your machine or on the router’s device list.
you@host - your username on the remote host - this is used by the sleep function to do a passwordless ssh and run pm-suspend.
register saves machine details so that you can later do this:
powertool wol host powertool sleep host
register just saves machine details to a ~/.powertool as a json file.
Sleep/suspend
Sleep/suspend feature has quite a few dependencies
you should have password-less ssh to the remote host. There are a lot of guides on the internet on how to set this up - like this one http://www.linuxproblem.org/art_9.html. Verify that it works by running ssh user@host - you should not be prompted for a password.
You should have pm-utils package on your remote machine http://manpages.ubuntu.com/manpages/precise/man8/pm-action.8.html
Your user should be able to run sudo pm-suspend without being prompted for password. To set this up, login to the remote machine and do the following:
sudo visudo # add the following - where user is your username on the remote machine user ALL=(ALL) NOPASSWD: /usr/sbin/pm-suspend
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.3.0 (2018-05-04)
Dependency updates
0.1.0 (2017-06-07)
First release on PyPI.
Metadata
Release files for powertool 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| powertool-0.3.0.tar.gz | 19.5 kB | Without provenance | Details for powertool-0.3.0.tar.gz |
Release files / powertool-0.3.0.tar.gz
| Download URL | powertool-0.3.0.tar.gz |
|---|---|
| Size | 19.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed5586f741fb5e61e9052740c057ca0fe727ce1a9ae62ff734ea6b755d25a5c9
|
|
BLAKE2b-256 checksum How to use checksums |
a6636042b2ae908cb4f8eaab1b1afde64eefde4e17dee4b99490df0806882261
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for powertool 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.