Page 1 of 1

Traffic counter script with an output to the TXT file on internal flash

Posted: Sat Feb 11, 2017 5:10 pm
by RB951G2HnD
I would like to to collect an output of the following commands and put it one file (like Traffic.txt) in a suitable format. An appropriate script is required that will be running on a schedule once a day.

[admin@MikroTik] > :put [/interface get [find name=ether1] rx-byte ]]
[admin@MikroTik] > :put [/interface get [find name=ether1] tx-byte ]]

Desired contents of the file for example.

Date RX TX
feb/10/2017 17:57:58 6711150062 857076855
feb/11/2017 17:57:58 6811150000 867076811

It would be perfect if each month new file will be created automatically. Could somebody help please?