A very simple application to send computer statistics (CPU, RAM, keyboard presses, etc.) to my API
Bumps [slab](https://github.com/tokio-rs/slab) from 0.4.10 to 0.4.11. - [Release notes](https://github.com/tokio-rs/slab/releases) - [Changelog](https://github.com/tokio-rs/slab/blob/master/CHANGELOG.md) - [Commits](https://github.com/tokio-rs/slab/compare/v0.4.10...v0.4.11) --- updated-dependencies: - dependency-name: slab dependency-version: 0.4.11 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> |
||
|---|---|---|
| src | ||
| .env.example | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
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
$ nano /etc/systemd/system/computer-statistics.service
[Unit]
Description=Computer statistics client
After=network.target
[Service]
Type=simple
Restart=always
WorkingDirectory=%h/Projects/computer-statistics
ExecStart=%h/Projects/computer-statistics/target/release/computer
Environment="RUST_LOG=info"
[Install]
WantedBy=multi-user.target
$ cargo build --release
$ systemctl --user daemon-reload
$ systemctl --user enable --now computer-statistics.service
$ systemctl --user status computer-statistics.service