0

I would like to create a bash script for my centos server to monitor the bandwidth usage. Like whether eth0 or eth1 is UP, it should monitor the bandwidth rate it sends and receives in every 15 seconds. I can do the scripting part fine.

But do you know which network/Ethernet monitoring tool on Centos system provides the best result in CLI(text format)? I do not prefer any tools that provide results only in GUI. The ultimate aim is to share the result from the bandwidth monitoring script to my external monitoring server. The result either in Kbps or Mbps is fine.

Keith
  • 4,637
  • 15
  • 25
vjwilson
  • 129
  • 1
  • 6
  • 1
    Why reinvent the wheel? There's probably something here you can use: https://exchange.nagios.org/directory/Plugins/Network-Connections%2C-Stats-and-Bandwidth – Keith Dec 18 '17 at 19:15
  • Thanks, @Keith I will look into it. The reason I was planning to do my own because the one plugin check_netint we already have from Nagios is not working properly on a Centos7 host, because its ifconfig output not parsing correctly unlike centos6/5 does. – vjwilson Dec 19 '17 at 02:33

1 Answers1

2

Try using dstat -n -f 15 and/or iftop

shodanshok
  • 47,711
  • 7
  • 111
  • 180