Community discussions

MUM Europe 2020
Topic Author
Posts: 29
Joined: Mon Oct 21, 2013 9:52 am

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

Sat Feb 11, 2017 5:10 pm

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?

Who is online

Users browsing this forum: No registered users and 29 guests