System Log on USB

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Goto page 1, 2, 3, 4, 5, 6  Next
Author Message
oliver44
DD-WRT Guru


Joined: 01 Jun 2016
Posts: 504

PostPosted: Sat Feb 12, 2022 8:25    Post subject: System Log on USB Reply with quote
Hello all,

Can someone help me with a tutorial on how to prepare a USB to use to write System Log on it?
I want to mention that I am not an experienced user in ddwrt and configuration commands,I need concrete
details on how I could use it.

ubs 3gb format Ext4
Linksys WRT1900ACS V2
Firmware Version DD-WRT v3.0-r48322


Thank you!

_________________
Internet provider https://en.wikipedia.org/wiki/RCS_%26_RDS 1Gbps
WDR3600 rev.1.5 - DD-Wrt
Linksys WRT1900ACS v.2 DD-Wrt/-OpenWrt



https://ipv6.chappell-family.com/ipv6tcptest/
https://en.internet.nl/connection/e91f490fe1c54cb2b78145c0ab0d2b5a/results
http://www.dnssec-or-not.com/
https://dnscheck.tools/#results


Last edited by oliver44 on Sat Feb 12, 2022 9:29; edited 1 time in total
Sponsor
AndyOxon
DD-WRT User


Joined: 16 Aug 2021
Posts: 81
Location: Oxford, UK.

PostPosted: Sat Feb 12, 2022 9:15    Post subject: Reply with quote
I believe USB sticks use EXT2, and EXT3 & 4 are for USB HDD. If this doesn’t help you, then I would telnet/ssh into the router and navigate the to the location you want to place the logs with commands ‘ls’ & ‘cd’ and copy the location from there to your settings.
_________________
Hardware (Device/Firmware/Roles):
Netgear RAX50 | Stock | Gateway, DHCP, AP, NAS.
Netgear WNDR4500v2 | FreshTomato | Router, WAP (2G), WDS-AP (5G), Samba, Torrent Client.
Netgear WNDR4500v2 | FreshTomato | Router, WAP (2G), WDS-AP (5G).
oliver44
DD-WRT Guru


Joined: 01 Jun 2016
Posts: 504

PostPosted: Sat Feb 12, 2022 9:21    Post subject: Reply with quote
I changed the format of the stick with EXT2, I guess I need to configure a script to send write system logs to USB memory ?

Or what should be the command line commands via ssh?



usb for system log.PNG
 Description:
 Filesize:  46.09 KB
 Viewed:  3169 Time(s)

usb for system log.PNG



_________________
Internet provider https://en.wikipedia.org/wiki/RCS_%26_RDS 1Gbps
WDR3600 rev.1.5 - DD-Wrt
Linksys WRT1900ACS v.2 DD-Wrt/-OpenWrt



https://ipv6.chappell-family.com/ipv6tcptest/
https://en.internet.nl/connection/e91f490fe1c54cb2b78145c0ab0d2b5a/results
http://www.dnssec-or-not.com/
https://dnscheck.tools/#results
AndyOxon
DD-WRT User


Joined: 16 Aug 2021
Posts: 81
Location: Oxford, UK.

PostPosted: Sat Feb 12, 2022 9:28    Post subject: Reply with quote
I thought mine was set to a local path, but I can’t find it now. I might have been thinking of a different firmware. I’m just trying to find anything useful for you…
_________________
Hardware (Device/Firmware/Roles):
Netgear RAX50 | Stock | Gateway, DHCP, AP, NAS.
Netgear WNDR4500v2 | FreshTomato | Router, WAP (2G), WDS-AP (5G), Samba, Torrent Client.
Netgear WNDR4500v2 | FreshTomato | Router, WAP (2G), WDS-AP (5G).
AndyOxon
DD-WRT User


Joined: 16 Aug 2021
Posts: 81
Location: Oxford, UK.

PostPosted: Sat Feb 12, 2022 9:30    Post subject: Reply with quote
I think this is what you need: https://wiki.dd-wrt.com/wiki/index.php/Logs --Saving the logfile across reboots
_________________
Hardware (Device/Firmware/Roles):
Netgear RAX50 | Stock | Gateway, DHCP, AP, NAS.
Netgear WNDR4500v2 | FreshTomato | Router, WAP (2G), WDS-AP (5G), Samba, Torrent Client.
Netgear WNDR4500v2 | FreshTomato | Router, WAP (2G), WDS-AP (5G).
oliver44
DD-WRT Guru


Joined: 01 Jun 2016
Posts: 504

PostPosted: Sat Feb 12, 2022 9:39    Post subject: Reply with quote
I apologize but my English is not the best, I just have to copy and save this script in startup script, I don't have to configure anything anymore ?

killall syslogd
syslogd -L -s 8192 -O /opt/var/log/messages

#credits to frater for the commands

_________________
Internet provider https://en.wikipedia.org/wiki/RCS_%26_RDS 1Gbps
WDR3600 rev.1.5 - DD-Wrt
Linksys WRT1900ACS v.2 DD-Wrt/-OpenWrt



https://ipv6.chappell-family.com/ipv6tcptest/
https://en.internet.nl/connection/e91f490fe1c54cb2b78145c0ab0d2b5a/results
http://www.dnssec-or-not.com/
https://dnscheck.tools/#results
AndyOxon
DD-WRT User


Joined: 16 Aug 2021
Posts: 81
Location: Oxford, UK.

PostPosted: Sat Feb 12, 2022 9:54    Post subject: Reply with quote
From the guide, I would place it in Administration > Management > CRON.

Reboot and see if the logs are where you want them. If Not, then place the script into Administration > Commands > Shutdown instead.

And if after rebooting you can't se your logs still, place it in both CRON AND Shutdown command.

You may just need to SSH in and enter the 2 commands, but I don't know if this will be permanent. Test, test, test.

Good Luck!

_________________
Hardware (Device/Firmware/Roles):
Netgear RAX50 | Stock | Gateway, DHCP, AP, NAS.
Netgear WNDR4500v2 | FreshTomato | Router, WAP (2G), WDS-AP (5G), Samba, Torrent Client.
Netgear WNDR4500v2 | FreshTomato | Router, WAP (2G), WDS-AP (5G).
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12887
Location: Netherlands

PostPosted: Sat Feb 12, 2022 10:01    Post subject: Reply with quote
A cron job is not necessary, I think.

Just Administration/Commands and Save as USB so that you know that it will run once the USB drive is up.

Alternatively Save as startup but begin with:
is-mounted /opt

_________________
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
AndyOxon
DD-WRT User


Joined: 16 Aug 2021
Posts: 81
Location: Oxford, UK.

PostPosted: Sat Feb 12, 2022 10:18    Post subject: Reply with quote
I'm going to assume that /opt is not mounted. So be sure to replace /opt/var/log/messages with /tmp/mnt/sda1/directory_name
_________________
Hardware (Device/Firmware/Roles):
Netgear RAX50 | Stock | Gateway, DHCP, AP, NAS.
Netgear WNDR4500v2 | FreshTomato | Router, WAP (2G), WDS-AP (5G), Samba, Torrent Client.
Netgear WNDR4500v2 | FreshTomato | Router, WAP (2G), WDS-AP (5G).
oliver44
DD-WRT Guru


Joined: 01 Jun 2016
Posts: 504

PostPosted: Sat Feb 12, 2022 10:36    Post subject: Reply with quote
I reworked the stick format, can you please tell me what the final script should look like and where I should add it concretely!

Thank you for help



usb for system log.PNG
 Description:
 Filesize:  46.09 KB
 Viewed:  3131 Time(s)

usb for system log.PNG



_________________
Internet provider https://en.wikipedia.org/wiki/RCS_%26_RDS 1Gbps
WDR3600 rev.1.5 - DD-Wrt
Linksys WRT1900ACS v.2 DD-Wrt/-OpenWrt



https://ipv6.chappell-family.com/ipv6tcptest/
https://en.internet.nl/connection/e91f490fe1c54cb2b78145c0ab0d2b5a/results
http://www.dnssec-or-not.com/
https://dnscheck.tools/#results


Last edited by oliver44 on Sat Feb 12, 2022 10:47; edited 1 time in total
AndyOxon
DD-WRT User


Joined: 16 Aug 2021
Posts: 81
Location: Oxford, UK.

PostPosted: Sat Feb 12, 2022 10:45    Post subject: Reply with quote
why is ur USB now mounted to /jffs?
_________________
Hardware (Device/Firmware/Roles):
Netgear RAX50 | Stock | Gateway, DHCP, AP, NAS.
Netgear WNDR4500v2 | FreshTomato | Router, WAP (2G), WDS-AP (5G), Samba, Torrent Client.
Netgear WNDR4500v2 | FreshTomato | Router, WAP (2G), WDS-AP (5G).
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12887
Location: Netherlands

PostPosted: Sat Feb 12, 2022 10:48    Post subject: Reply with quote
As you only made /jffs

Administration/Commands and Save as USB:
Code:
killall syslogd
syslogd -L -s 8192 -O /jffs/var/log/messages


P.S. check your settings see attachment



DDWRT USB storage and NAS v2.pdf
 Description:

Download
 Filename:  DDWRT USB storage and NAS v2.pdf
 Filesize:  477.49 KB
 Downloaded:  568 Time(s)


_________________
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
oliver44
DD-WRT Guru


Joined: 01 Jun 2016
Posts: 504

PostPosted: Sat Feb 12, 2022 10:48    Post subject: Reply with quote
sorry I got the picture wrong!
_________________
Internet provider https://en.wikipedia.org/wiki/RCS_%26_RDS 1Gbps
WDR3600 rev.1.5 - DD-Wrt
Linksys WRT1900ACS v.2 DD-Wrt/-OpenWrt



https://ipv6.chappell-family.com/ipv6tcptest/
https://en.internet.nl/connection/e91f490fe1c54cb2b78145c0ab0d2b5a/results
http://www.dnssec-or-not.com/
https://dnscheck.tools/#results
AndyOxon
DD-WRT User


Joined: 16 Aug 2021
Posts: 81
Location: Oxford, UK.

PostPosted: Sat Feb 12, 2022 10:53    Post subject: Reply with quote
egc wrote:
Administration/Commands and Save as USB:
Code:
killall syslogd
syslogd -L -s 8192 -O /jffs/var/log/messages


Will dd-wrt auto-create missing folders?

_________________
Hardware (Device/Firmware/Roles):
Netgear RAX50 | Stock | Gateway, DHCP, AP, NAS.
Netgear WNDR4500v2 | FreshTomato | Router, WAP (2G), WDS-AP (5G), Samba, Torrent Client.
Netgear WNDR4500v2 | FreshTomato | Router, WAP (2G), WDS-AP (5G).
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12887
Location: Netherlands

PostPosted: Sat Feb 12, 2022 10:56    Post subject: Reply with quote
syslogd should do that, at least on my router Smile
_________________
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
Goto page 1, 2, 3, 4, 5, 6  Next Display posts from previous:    Page 1 of 6
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions 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