Logging to usb drive

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

Post Reply
zespri
Posts: 5
Joined: Sun Aug 11, 2013 4:02 pm
Location: New Zealand

Logging to usb drive

Post by zespri »

Hello all,

can you please briefly outline for me what is involved in logging stuff onto a usb drive connected to the router. I might want to log traffic there in future, but for now I set a really simple goal to log the syslog using logread:

logread -f » /mnt/bla/logfile

But it seems that an usb drive is mounted on a random name share?
I can find out the name by running mount, but I was wondering what is the best way of doing this, i.e. on router start checking if there is a usb drive attached (when it finishes mounting) and then running some commands (like the one above) that will log to that drive? Am I trying to re-invent the wheel?

Post Reply