logkeys
logkeys copied to clipboard
Logging routinely stops
I am witnessing a strange bug where logkeys routinely stops logging.
This time round, I managed to spot logkeys not logging while it was supposed to be logging. In fact, from the log file, it looks like logkeys was logging just a few minutes ago but strangely stopped.
I have a systemd unit file which I use for starting and stopping logkeys. The file looks as below.
[Unit]
Description=Keylogger daemon
[Service]
Type=forking
GuessMainPID=yes
ExecStart=/usr/local/bin/logkeys --start
ExecStop=/usr/local/bin/logkeys --kill
[Install]
WantedBy=multi-user.target
and logkeys does start logging but will routinely stop logging while the process is still running.
Any ideas where debugging this should start?
A little late, but for the future:
What I managed to solve was to use cron. Just by adding my full command as:
$ crontab -e
...
#* * * * * cmd
@reboot /usr/local/bin/logkeys --start
It just started logging to /var/log/logkeys.log
once the reboot happened.
Nice hack, @MarAvFe . For non us keymaps, you'll need to precise --keymap
, for it might not be properly detected during you cronjob
@reboot logkeys --start --output=/home/zar3bski/Téléchargements/keys.log --device=/dev/input/event4 --keymap /path/to/keymaps/fr.map