A very simple application to send computer statistics (CPU, RAM, keyboard presses, etc.) to my API
Find a file
2025-07-20 16:00:21 +01:00
src chore: update packages 2025-07-20 16:00:03 +01:00
.env.example fix: add native-tls feature to tungstenite 2025-03-22 15:19:36 +00:00
.gitignore feat: add dotenvy 2024-11-29 15:00:21 +00:00
Cargo.lock chore: update packages 2025-07-20 16:00:03 +01:00
Cargo.toml chore: update packages 2025-07-20 16:00:03 +01:00
LICENSE docs: add LICENSE 2024-11-29 15:39:46 +00:00
README.md docs: add systemd service section 2025-07-20 16:00:21 +01:00

computer-statistics

Sends statistics of my computer to my API that can be seen on my website

features

  • CPU usage
  • Memory usage
  • Key press counter
  • Left and right mouse clicks counter

running without sudo

$ sudo nano /etc/udev/rules.d/99-inputbot.rules

Copy and paste this below and save the file.

KERNEL=="event*", SUBSYSTEM=="input", TAG+="uaccess"
KERNEL=="mouse*", SUBSYSTEM=="input", TAG+="uaccess"
KERNEL=="kbd*", SUBSYSTEM=="input", TAG+="uaccess"

Restart your computer.

systemd service

$ sudo nano /etc/systemd/system/computer-statistics.service
[Unit]
Description=Computer statistics client
After=network.target

[Service]
Type=simple
Restart=always
User=trafficlunar
WorkingDirectory=/home/trafficlunar/Projects/computer-statistics
ExecStart=/home/trafficlunar/Projects/computer-statistics/target/release/computer
Environment="RUST_LOG=info"

[Install]
WantedBy=multi-user.target
$ sudo systemctl daemon-reload
$ cargo build --release
$ sudo systemctl enable --now computer-statistics.service
$ sudo systemctl status computer-statistics.service