Log serial output

Is it possible to send log to serial port at real time?

(I want to make device for display log of my router (RB751U) at real time. It’s easy to make a device that read serial line (via compatible USB-UART convertor) and print it on LCD. But I need to communicate my router with the device.)

You can use the echo facility for logging to get it to post things to the console, but the 700 series doesn’t have a console port, or a way to connect a console cable, so I think you are out of luck on that front. You would at the very least need to use a series that had a console port.

It’s bad… As I understand, Mikroik’s devices have too little ways to extending, writing own apps, etc.

Yes, it DOES have a way to connect a console cable! The 750U has a usb port, so add a USB Serial Port.

… or …

You can send log data through TCP to a syslog PC, and then send it to serial from that PC in real time.

jandafields

  1. Is it possible to set dual target in log (e.g. memory and echo)? Because I want to save log to memory too.
  2. What is target “echo” exactly mean? I didn’t find an answer in Wiki. Does router will only print log to serial port or it will print full RouterOS shell?

Maybe most right way is using scheduler and script to copy log to serial? But this has following issues:

  1. How much system resources it will eat? For “real-time” log I need scheduler interval about 5 seconds.
  2. How to determine “new” log lines after last script calling?
  3. How to work with serial in scripts. I found only very dirty hacks for it.

Yes, you can send to multiple targets. I send mine to memory and remote (and some to disk), all at the same time.

Echo is in the terminal. Memory is in the log screen in winbox. Disk also goes to log screen in winbox, and survives a reboot. Remote sends to syslog server.

You can’t script to copy log to serial, at least not that I have seen. Log is real time.

Thanks. But how to set up it? In wiki there are no information.

Only log strings will output to terminal or everything (like here)?

P.S. Is Wiki the full official documentation? I’m confused because some pages aren’t actual (old) or information too poor…

Add multiple rules for the same topic:
Topic “e-mail” Action “memory”
Topic “e-mail” Action “remote”
Topic “e-mail” Action “echo”


Serial port = Everything
Remote syslog = Only log strings

the wiki is the official manual