Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:services:vnstat [2018/03/03 20:56] – ↷ Links adapted because of a move operation bobafetthotmaildocs:guide-user:services:network_monitoring:vnstat [2018/07/26 23:50] unregistered
Line 1: Line 1:
-====== vnStat ======+====== Network Traffic Monitor with vnStat ======
 vnStat is a console-based network traffic monitor for Linux and BSD that keeps a log of network traffic for the selected interface(s). It uses the network interface statistics provided by the kernel as information source. This means that vnStat won't actually be sniffing any traffic and also ensures light use of system resources. [[http://humdi.net/vnstat/|As it says on their website]]  vnStat is a console-based network traffic monitor for Linux and BSD that keeps a log of network traffic for the selected interface(s). It uses the network interface statistics provided by the kernel as information source. This means that vnStat won't actually be sniffing any traffic and also ensures light use of system resources. [[http://humdi.net/vnstat/|As it says on their website]] 
 ===== Installing ===== ===== Installing =====
Line 176: Line 176:
 vnStat stores stats to /var/lib/vnstat by default and information will not persist across restarts. This means that one might want to relocate the database directory to other forms of persistent storage like your device's flash or external thumb drives. vnStat stores stats to /var/lib/vnstat by default and information will not persist across restarts. This means that one might want to relocate the database directory to other forms of persistent storage like your device's flash or external thumb drives.
  
-By default, vnStat is configured to write to the directory in volatile memory every 30 minutes. Both the directory and the interval can be adjusted in vnStat's configuration. However, keep in mind that frequent writes to flash memory will deteriorate and potentially damage flash memory. Changing the directory to write to flash memory without changing the interval will result in around 17500 write operations, a number that could potentially cause problems.+By default, vnStat is configured to write to the directory in volatile memory every 30 minutes. Both the directory and the interval can be adjusted in vnStat's configuration. However, keep in mind that frequent writes to flash memory will deteriorate and potentially damage flash memory. Changing the directory to write to flash memory without changing the interval will result in around 17500 write operations each year, a number that could potentially cause problems.
  
 Additionally, the database may not persist across firmware flashes. Additionally, the database may not persist across firmware flashes.
Line 254: Line 254:
 == Add for cron and for init == == Add for cron and for init ==
 The below commands will add a cronjob entry that triggers a backup every 6 hours every day, if necessary adjust to an interval you feel comfortable with: The below commands will add a cronjob entry that triggers a backup every 6 hours every day, if necessary adjust to an interval you feel comfortable with:
-<code>echo "*/6 * * * /etc/init.d/vnstat_backup backup" >> /etc/crontabs/root+<code>echo "*/6 * * * /etc/init.d/vnstat_backup backup" >> /etc/crontabs/root
 /etc/init.d/cron restart</code> /etc/init.d/cron restart</code>
  • Last modified: 2021/04/08 01:02
  • by vgaetera