Community discussions

MUM Europe 2020
 
Mashal
just joined
Topic Author
Posts: 10
Joined: Mon Jul 20, 2015 8:03 am

Saving the amount of traffic passed through an interface in Bytes

Sat Sep 24, 2016 4:45 pm

I wanted to know if there is a way to find and save the amount of traffic passed through an interface, for instance the amount of data going out to and coming from the Internet to the local network (total upload/download). i have some ideas in mind for doing them but dont really know if they are applicable:

1- use packet sniffer and stream the data headers to a server for analysis (too complicated)
2- use a firewall filter rule or mangle and get the bytes counter periodically and add them up (dont know the commands for that )
3- there exist a simple tool or way or script that i am not aware of now.

please help me implement a method.
 
pe1chl
Forum Guru
Forum Guru
Posts: 5994
Joined: Mon Jun 08, 2015 12:09 pm

Re: Saving the amount of traffic passed through an interface in Bytes

Sat Sep 24, 2016 7:06 pm

You can use SNMP to poll this number from an external computer and save it there.
Remember that the number resets to zero when the router is rebooted, and it can wrap-around when
there is so much traffic that it overflows (32-bit values). So your program has to handle those situations.
 
tarikin
newbie
Posts: 33
Joined: Sat Sep 24, 2016 11:55 pm
Location: Russia, Moscow

Re: Saving the amount of traffic passed through an interface in Bytes

Sun Sep 25, 2016 12:21 am

The Traffic Flow tool may help you
/ip traffic-flow
MTCNA MTCRE MTCTCE MTCWE MTCUME MTCSE MTCIPv6E
Mikrotik Consultant status since September 2016
 
User avatar
Cha0s
Forum Veteran
Forum Veteran
Posts: 916
Joined: Tue Oct 11, 2005 4:53 pm

Re: Saving the amount of traffic passed through an interface in Bytes

Wed Sep 28, 2016 2:11 pm

Use SNMP and any tool that allows for collecting such information.

Cacti
Observium
Mrtg
Munin
etc..

Who is online

Users browsing this forum: No registered users and 12 guests