Created
September 19, 2024 13:35
-
-
Save shirou/b4429def8a14a56879783eb051020175 to your computer and use it in GitHub Desktop.
run nethogs to watch network traffic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=network usage by nethogs | |
After=network.target | |
[Service] | |
Type=simple | |
ExecStart=/home/shirou/nethogs.sh | |
Restart=always | |
RestartSec=5 | |
StartLimitInterval=0 | |
StartLimitBurst=5 | |
# Logging | |
StandardOutput=append:/var/log/nethogs.log | |
StandardError=append:/var/log/nethogs.log | |
[Install] | |
WantedBy=multi-user.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
/usr/sbin/nethogs -v 1 -d 10 -t wlan0 | grep -vi unknown |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment