Save the log on the pendrive

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
Frakko
DD-WRT Guru


Joined: 06 May 2016
Posts: 518

PostPosted: Fri Mar 06, 2020 7:48    Post subject: Save the log on the pendrive Reply with quote
I have the R7000 netgear and i wanted to save the log on the pendrive that i recently mounted.
Is this possible Question Is there possibly a guide Question
Thank you.
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Fri Mar 06, 2020 12:11    Post subject: Reply with quote
The log is a text file: /var/log/messages

You can make a cron job periodically copying it to your USB drive.

If I am debugging restarts etc. I send the log to my NAS or run syslog watcher on my PC, on Services/System log just enter the IP address of the NAS/PC which will get the logging send to

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Frakko
DD-WRT Guru


Joined: 06 May 2016
Posts: 518

PostPosted: Fri Mar 06, 2020 17:31    Post subject: Reply with quote
Do you have any links / guides / examples Question Wink
I wonder why you can't just move the directory to another directory Question
Thank you Exclamation
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14126
Location: Texas, USA

PostPosted: Fri Mar 06, 2020 17:35    Post subject: Reply with quote
Frakko wrote:
Do you have any links / guides / examples Question Wink
I wonder why you can't just move the directory to another directory Question
Thank you Exclamation


Google "script to save syslog file to usb drive dd-wrt" ... that's the only spoon I have handy.

EDIT: Did you forget about this post that you made in the forum two years ago?

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Frakko
DD-WRT Guru


Joined: 06 May 2016
Posts: 518

PostPosted: Mon Mar 09, 2020 5:23    Post subject: Reply with quote
Embarassed
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1855
Location: Hung Hom, Hong Kong

PostPosted: Fri Mar 13, 2020 6:58    Post subject: Re: Save the log on the pendrive Reply with quote
Frakko wrote:
I have the R7000 netgear and i wanted to save the log on the pendrive that i recently mounted.
Is this possible Question Is there possibly a guide Question
Thank you.

It would be interesting if Services->Services->System Log->Remote Server had an option to write to a file in a USB drive instead of just an IP address.

After a bit of Google-ing, I found the following:

omfile: File Output Module
https://www.rsyslog.com/doc/v8-stable/configuration/modules/omfile.html
Code:
Purpose

The omfile plug-in provides the core functionality of writing messages to files residing inside the local file system (which may actually be remote if methods like NFS are used). Both files named with static names as well files with names based on message content are supported by this module.

... and this tutorial:

A dead simple tutorial on how to forward Rsyslog messages to a file
https://medium.com/@vbmade2000/a-dead-simple-tutorial-on-how-to-forward-rsyslog-logs-to-a-file-130364c049fb

BTW, there is Windows Agent - rsyslog
https://www.rsyslog.com/windows-agent/


_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14126
Location: Texas, USA

PostPosted: Fri Mar 13, 2020 16:01    Post subject: Reply with quote
@mwchang, this is a repeat post. @Frakko forgot about a previous post where the issue was solved. See my previous post in this thread Wink
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1855
Location: Hung Hom, Hong Kong

PostPosted: Fri Mar 13, 2020 17:50    Post subject: Reply with quote
kernel-panic69 wrote:
@mwchang, this is a repeat post. @Frakko forgot about a previous post where the issue was solved. See my previous post in this thread Wink

It's not as simple as an option in WEBUI!


_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1855
Location: Hung Hom, Hong Kong

PostPosted: Tue Jan 24, 2023 12:02    Post subject: Reply with quote
Possibly related:

Changeset 51493 – DD-WRT
option to save syslog on jffs
https://svn.dd-wrt.com/changeset/51493

_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum