How can I see the bandwidth consumption of my server in real time?

To monitor bandwidth usage in real-time on a VitalPBX 4 server, there are several tools you can use. Below are some of the most popular:

  1. iftop: iftop displays real-time bandwidth usage on a network interface. It’s similar to top, but instead of displaying CPU usage, it shows network activity.
  • Installation:
sudo apt update
sudo apt install iftop
  • Usage:
sudo iftop
  1. nload: nload displays real-time graphs of incoming and outgoing traffic.
  • Installation:
sudo apt update
sudo apt install nload
  • Usage:
sudo nload
  1. vnStat: vnStat doesn’t exactly show in real-time, but it logs bandwidth usage over time and can show statistics by hours, days, and months.
  • Installation:
sudo apt update
sudo apt install vnstat
  • Configuration and Usage:
    • To initialize vnStat’s database on an interface (e.g., eth0):
sudo vnstat -u -i eth0
* To view the statistics:
vnstat -i eth0
  1. bmon: bmon is another tool that displays real-time network traffic, offering various views and details about network activity.
  • Installation:
sudo apt update
sudo apt install bmon
  • Usage:
sudo bmon
  1. NetHogs: NetHogs displays traffic per process, which can be useful to pinpoint which application or process is consuming bandwidth.
  • Installation:
sudo apt update
sudo apt install nethogs
  • Usage:
sudo nethogs

These tools will give you a detailed view of how and where bandwidth is being used on your server. You can choose the one that best fits your needs.