TecMint published a tutorial about installing vnStat and vnStati to monitor network traffic in Linux.
How to Install vnStat and vnStati to Monitor Network Traffic in Linux
VnStat is a console-based network traffic monitoring tool design for Linux and BSD. It will keep a log of the network traffic for selected network interfaces.
How to Install vnStat and vnStati to Monitor Network Traffic in Linux