This program will keep your system ON based on certain parameters; namely cpu load, user activity, and network traffic (boolean OR for all three). It will also log its interval analysis to a managed log file.
Keep Awake requires libxss-dev, libx11-dev, libffi-dev, python3-pip, python3-netifaces, python3-psutil, and xz-utils from apt to run; AND xprintidle from PyPI
TO INSTALL:
1) sudo apt install bzr libxss-dev libx11-dev libffi-dev python3-pip python3-netifaces python3-psutil xz-utils
2) sudo pip3 install xprintidle
3) cd /<your desired installation path>/
4) bzr branch lp:keep.awake
Follow the steps above chronologically on ubuntu's GNOME Terminal.
This program will keep your system ON based on certain parameters; namely cpu load, user activity and network traffic (boolean OR for all three). It will also log its interval analysis to a managed log file.
Keep Awake requires:
- python3.5+
- xprintidle
- python3-netifaces
- python3-psutil
- xz-utils
Keep Awake was developed with a minimum linux distribution version of Ubuntu 14.04 LTS.
It has been extensively tested with Ubuntu 16.04 LTS.
It works with Ubuntu 18.04 LTS with default X-based desktop.
It will NOT work with Linux distributions using Wayland-based desktops.
It will NOT work with any Ubuntu distribution using Wayland-based desktop.
It has NOT been tested with the non-LTS versions between 14.04 and 16.04; however it should theoretically work.
Please report back in the Bugs or Answers section and I'll try and help.
It can run on other distributions as long as it has the requisite python3 packages and runs X desktop.
The current version works best with distributions that use the Gnome desktop environment.
If you decide to try and use Keep.Awake with other distributions (not Ubuntu at least) please report back in the Bugs or Answers section and I'll try and help.
Some limited testing has been done on:
-openSuse Leap 42 Gnome
-fedora 24-26 Gnome
-Linux Mint 18 Cinnamon
-Debian Jessie Gnome
-Antergos Gnome
And it works as long as you satisfy the dependencies mentioned above along with non-admin global user access to the "logrotate" command (comes with all distributions I've seen to date).
Keep Awake was designed to run under a user. There is no need for sudo or root privileges.
It works like a proper command. Type --help to see a full listing of what can be done. The examples underneath are only a few:
./keepawake.py --help
To run interactively:
./keepawake.py
To run as a background service:
nohup ./keepawake.py -r > /dev/null 2>&1 &
To run as background service and set 15 min (900 sec) as the user activity idle time before it determines that the user is idle:
nohup ./keepawake.py -u 900 -r > /dev/null 2>&1 &
To run as background service and set minimum CPU load as 13%:
nohup ./keepawake.py -c 13 -r > /dev/null 2>&1 &
To run as background service and set minimum network traffic as 5KB (5120 bytes):
nohup ./keepawake.py -s 5120 -r > /dev/null 2>&1 &
To run all three settings above (network, CPU, User idle) in the one go:
nohup ./keepawake.py -s 5120 -c 13 -u 900 -r > /dev/null 2>&1 &
View full history Series and milestones
trunk series is the current focus of development.
All code Code
- Version control system:
- Bazaar
- Programming languages:
- python3
All questions Latest questions
-
Prevent Ubuntu from breaking wifi connection on lid close
Posted on 2017-03-20 -
Can this be modified to monitor upload traffic?
Posted on 2016-10-12 -
Test
Posted on 2016-08-04
All packages Packages in Distributions
-
xz-utils source package in Eoan
Version 5.2.4-1 uploaded on 2019-01-28 -
xz-utils source package in Disco
Version 5.2.4-1 uploaded on 2019-01-28 -
xz-utils source package in Cosmic
Version 5.2.2-1.3 uploaded on 2017-07-13