pluyckx / kam Goto Github PK
View Code? Open in Web Editor NEWKeep Alive Monitor
License: GNU General Public License v2.0
Keep Alive Monitor
License: GNU General Public License v2.0
Fresh install of 1.1.0-beta1
Change conf file
Run install again
Result: Configuration is backed up to kam.conf.back. But kam.conf isn't changed back to default configuration.
Is this normal behavior?
When unplugging the mouse and/or keyboard (USB), the cpu usage of one core increases to 100%. When the mouse and/or keyboard is attached again, the cpu usage drops.
Wouldn't it be nice that kam could be kicked over the network?
When suspending kam, make sure the time the computer is in suspend is not used to calculate the idle time. Otherwise we could introduce a serious bug:
kam suspends the machine
after some time the machine comes out suspend -> kam suspends the machine again directly after startup
and this can continue for a while...
Wouldn't it be nice to have an optional question box before shutting down? This way the user can cancel the shutdown.
Copy previous configuration on update. Just copy to /etc/kam/kam.conf.[datatime]
When the upload_speed parameter is commented out, kam won't start with following message
File "/usr/sbin/kamd", line 175, in <module>
raise ex
File "/usr/sbin/kamd", line 169, in <module>
main()
File "/usr/sbin/kamd", line 161, in main
raise ex
File "/usr/sbin/kamd", line 154, in main
check.check()
File "/usr/local/lib/python3.4/dist-packages/kam/modules/plugins/checks/basecheck.py", line 38, in check
self._run()
File "/usr/local/lib/python3.4/dist-packages/kam/modules/plugins/checks/networkspeed.py", line 78, in _run
"upload_speed", up, "", up >= self._up)
TypeError: unorderable types: float() >= str()
Kick plugin is loaded, even though kick files parameter is commented out in configuration.
Related lines in kam.conf:
# When no value is assigned or this parameter is commented out, it is not used
# to keep the computer alive.
#files = /tmp/kick
Related line in kam.log:
2015-01-17 13:33:52 [Main]: importing kam.modules.plugins.checks.kick
2015-01-17 13:33:52 [KickCheck]: Config loaded, enabled=True; files specified: ['/tmp/kam_kick']
...
2015-01-17 13:33:52 [Main]: Add check to list: KickCheck
...
2015-01-17 13:33:52 [Main]: Checking KickCheck
Related line in kam.debug:
2015-01-17 13:33:52 [KickCheck:config] files = ['/tmp/kam_kick']; // True
...
2015-01-17 13:33:52 [KickCheck:check] files = []; //
For now, KAM is NOT compatible with systemd!
A feature request to use 'kam' on desktops: keep the desktop alive on keyboard usage.
Kam must kept running after executing the idle command. This is necessary for instance after a suspend. Better would be to add an option where the user can choose to keep kam running. Maybe kam must add the option "run_loop" with the values "once" and "infinite".
When my laptop was idle for the evening, it didn't go to sleep like usual. When examining the logs, I noticed that the mice and key event were logged. The strange thing is that the keyboard and mice activity is detected at the same time.
2019-01-12 20:28:48 [KeyboardCheck:config] keyboards = ['event7', 'event8', 'event6', 'event4']; // True
2019-01-12 20:28:48 [MiceCheck:config] mice = ['event5', 'mouse0', 'mouse1']; // True
2019-01-12 20:28:48 [KeyboardCheck:check] read from: = []; // True
2019-01-12 20:28:49 [MiceCheck:check] read from: = []; // True
2019-01-12 20:39:49 [KeyboardCheck:config] keyboards = ['event7', 'event8', 'event6', 'event4']; // True
2019-01-12 20:39:49 [MiceCheck:config] mice = ['event5', 'mouse0', 'mouse1']; // True
2019-01-12 20:39:49 [KeyboardCheck:check] read from: = []; // True
2019-01-12 20:39:49 [MiceCheck:check] read from: = []; // True
2019-01-12 20:47:49 [KeyboardCheck:config] keyboards = ['event7', 'event8', 'event6', 'event4']; // True
2019-01-12 20:47:49 [MiceCheck:config] mice = ['event5', 'mouse0', 'mouse1']; // True
2019-01-12 20:47:49 [KeyboardCheck:check] read from: = []; // True
2019-01-12 20:47:49 [MiceCheck:check] read from: = []; // True
2019-01-12 20:55:49 [KeyboardCheck:config] keyboards = ['event7', 'event8', 'event6', 'event4']; // True
2019-01-12 20:55:50 [MiceCheck:config] mice = ['event5', 'mouse0', 'mouse1']; // True
2019-01-12 20:55:50 [KeyboardCheck:check] read from: = []; // True
2019-01-12 20:55:50 [MiceCheck:check] read from: = []; // True
2019-01-12 20:56:50 [KeyboardCheck:config] keyboards = ['event7', 'event8', 'event6', 'event4']; // True
2019-01-12 20:56:50 [MiceCheck:config] mice = ['event5', 'mouse0', 'mouse1']; // True
2019-01-12 20:56:50 [KeyboardCheck:check] read from: = []; // True
2019-01-12 20:56:50 [MiceCheck:check] read from: = []; // True
2019-01-12 21:01:50 [KeyboardCheck:config] keyboards = ['event7', 'event8', 'event6', 'event4']; // True
Tested in v1.0.0-beta1
Kick plugin is not working. I uncomment the 'files' variable. The plugin appears to be loaded, it outputs log data. But the configured kick file is not detected.
It appears that the [kick] section header is commented out. I suggest to uncomment the header in the default configuration. The plugin can then be enabled/disabled by commenting out the 'files' variable
Kam is disabled/removed when python is updated on my system.
When disconnecting the mouse and/or keyboard, the pollmanager crashes because the device file disappears.
Solution:
When this exception is thrown, catch it and remove the device from the poll list. However, we need a method to catch the event when the keyboard/mouse is plugged in again.
When using the command 'service kam kick', the service isn't kicked.
Create a generic way for kicking kam using 'service kam kick'.
A feature request to use 'kam' on desktops: keep the desktop alive on mouse usage.
Fix the TODO's:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.