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.

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 was developed with a minimum linux distribution version of Ubuntu 14.04 LTS.
It has been extensively tested with Ubuntu 16.04 LTS.
It has NOT been tested with the non-LTS versions between 14.04 and 16.04; however it should theoretically work.
It has been tested with 16.10 and 17.04 and works.
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 &