Community discussions

MikroTik App
 
RB951G2HnD
newbie
Topic Author
Posts: 30
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 ]]
6711150062
[admin@MikroTik] > :put [/interface get [find name=ether1] tx-byte ]]
857076855

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: BenceLK, HeinoHomm and 59 guests