Darkstat is a network traffic monitoring tool. It captures network traffic and calculates statistics. Darkstat provides web interface to view traffic graphs and reports.
This tutorial demonstrates how to install Darkstat on Raspberry Pi.
Connect to Raspberry Pi via SSH. Update the package lists and install Darkstat with commands:
sudo apt update sudo apt install -y darkstat
We can check Darkstart version as follows:
Now we need to configure Darkstat. Open the main configuration file:
sudo nano /etc/darkstat/init.cfg
START_DARKSTAT option and change value from
yes. By default, Darkstat listens traffic on eth0 interface. It can be provided using
INTERFACE option. Run the following command if you want to get a list of all available network interfaces:
ip addr show
The following options has been changed in the configuration file:
START_DARKSTAT=yes INTERFACE="-i wlan0"
To apply changes restart Darkstart service:
sudo service darkstat restart
We can check service status as follows:
sudo service darkstat status
We can stop and start the Darkstat service with commands:
sudo service darkstat stop sudo service darkstat start
Get IP address of the Raspberry Pi:
By default, Darkstat listens on port 667.
Open a browser and access a web interface by going to URL
<IP_ADDRESS> is IP address of Raspberry Pi.
If you wish to completely remove Darkstat and related dependencies, execute the following command:
sudo apt purge --autoremove -y darkstat
You can also remove the statistics:
sudo rm -rf /var/lib/darkstat
Leave a CommentCancel reply