What's new

Script to remove dcd crashes from system log

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Manually running the cron job doesn't seem to be working, either.
Are these a different kind of dcd crashes?
No, that's them. Keep in mind the cron job only runs at 10 past every hour. So you have to wait until then to check if it worked or not - this is not a real time removal of the dcd crashes.

Type "cru l" at a shell prompt to see if the cron job is there. No reason it shouldn't work if it's listed there.
 
Type "cru l" at a shell prompt to see if the cron job is there. No reason it shouldn't work if it's listed there.

I'm not sure why it's not working:
ASUSWRT-Merlin RT-AC86U 384.11-2 Sat May 18 03:35:09 UTC 2019
admin@RT-AC86U-9DE0:/tmp/home/root# cru l
*/10 * * * * /jffs/scripts/rm_dcd_crash /tmp/syslog.log #dcd_crash#
00 2 * * Tue sh /opt/share/diversion/file/update-bf.div reset #Diversion_UpdateBF#
20 5 * * * sh /opt/share/diversion/file/rotate-logs.div #Diversion_RotateLogs#
20 17 * * * diversion count_ads count #Diversion_CountAds#
30 1 * * Tue sh /opt/share/diversion/file/stats.div #Diversion_WeeklyStats#
10 1 * * Tue sh /opt/share/diversion/file/update.div #Diversion_UpdateCheck#
25 1 * * * sh /jffs/scripts/firewall banmalware #Skynet_banmalware#
25 1 * * Mon sh /jffs/scripts/firewall update #Skynet_autoupdate#
0 * * * * sh /jffs/scripts/firewall save #Skynet_save#
30 3 * * * /jffs/scripts/FreshJR_QOS -check #FreshJR_QOS#
0 * * * * /jffs/scripts/uiDivStats generate #uiDivStats#
 
I'm not sure why it's not working:
I'm not sure either. If you do a "ls -lA /jffs/scripts/" (without the quotes, and "l" is "el" not "one") does rm_dcd_crash come up something like "xwr-x-rx-r" ??
 
So, I'm really struggling with this for some reason... I'm still getting the constant dcd crashes.
I'm working from a clean install of .14 beta and using the built in nano editor to create and edit the files.
ASUSWRT-Merlin RT-AC86U 384.14-beta1 Thu Nov 7 15:40:54 UTC 2019
admin@RT-AC86U-9C50:/tmp/home/root# ls -lA /jffs/scripts/
-rwxr-xr-x 1 admin root 105376 Nov 8 16:54 FreshJR_QOS
-rwxr-xr-x 1 admin root 111951 Nov 8 16:54 amtm
-rwxr-xr-x 1 admin root 73 Oct 31 06:59 dnsmasq.postconf
-rwxr-xr-x 1 admin root 193098 Oct 31 07:02 firewall
-rwxr-xr-x 1 admin root 141 Oct 31 07:02 firewall-start
-rwxrwxrwx 1 admin root 56 Nov 1 15:12 ledsoff.sh
-rwxrwxrwx 1 admin root 56 Nov 1 15:12 ledson.sh
-rwxr-xr-x 1 admin root 237 Nov 7 16:07 post-mount
-rwxr-xr-x 1 admin root 670 Oct 31 06:59 post-mount.div
-rwxrwxrwx 1 admin root 99 Nov 7 16:07 rm_dcd_crash
-rwxr-xr-x 1 admin root 11 Nov 6 15:30 service-event
-rwxrwxrwx 1 admin root 118 Nov 6 15:30 services-start
-rwxr-xr-x 1 admin root 121 Oct 31 07:02 services-stop
drwxrwxrwx 2 admin root 0 Nov 2 08:35 shared-jy
-rwxr-xr-x 1 admin root 210 Nov 6 15:30 unmount
-rw-rw-rw- 1 admin root 98967 Nov 8 16:54 www_FreshJR_QoS_Stats.asp
admin@RT-AC86U-9C50:/tmp/home/root#
 
So, I'm really struggling with this for some reason... I'm still getting the constant dcd crashes.
I'm working from a clean install of .14 beta and using the built in nano editor to create and edit the files.
It doesn't eliminate them, it just cleans them out of the message log at 10 minutes past every hour, assuming you also started the cron job. The only thing that can eliminate them is ASUS fixing the broken code.
 
It doesn't eliminate them, it just cleans them out of the message log at 10 minutes past every hour, assuming you also started the cron job. The only thing that can eliminate them is ASUS fixing the broken code.
Oh, I understand. It just won't work for me.
 
Oh, I understand. It just won't work for me.
When I ran this (before using Scribe) I ran it every 5 minutes adding this line to
/jffs/scripts/post-mount
Code:
cru a dcd_crash "*/5 * * * * /jffs/scripts/rm_dcd_crash /tmp/syslog.log #rm_dcd_crash"
 
When I ran this (before using Scribe) I ran it every 5 minutes adding this line to
/jffs/scripts/post-mount
Code:
cru a dcd_crash "*/5 * * * * /jffs/scripts/rm_dcd_crash /tmp/syslog.log #rm_dcd_crash"
Thanks.

This is what my post-mount file looks like.
#!/bin/sh
swapon /tmp/mnt/router/myswap.swp # Swap file created by amtm

. /jffs/scripts/post-mount.div # Added by Diversion

cru a dcd_crash "*/10 * * * * /jffs/scripts/rm_dcd_crash /tmp/syslog.log" #remove dcd crash lines from syslog

And /jffs/scripts/rm_dcd_crash
#!/bin/sh
# remove dcd crash lines from system log

/bin/sed -i '/kernel: dcd/,/kernel: x1 /d' $1
 
Thanks.

This is what my post-mount file looks like.


And /jffs/scripts/rm_dcd_crash
Those look good. Show me the output of the command "cru l" in an SSH terminal, please. I think I know why.
 
ASUSWRT-Merlin RT-AC86U 384.14-beta1 Thu Nov 7 15:40:54 UTC 2019
admin@RT-AC86U-9C50:/tmp/home/root# cru l
30 19 * * * /jffs/scripts/ledsoff.sh #lightsoff#
15 6 * * * /jffs/scripts/ledson.sh #lightson#
*/10 * * * * /jffs/scripts/rm_dcd_crash /tmp/syslog.log #dcd_crash#
00 2 * * Thu sh /opt/share/diversion/file/update-bl.div reset #Diversion_UpdateBL#
30 3 * * * /jffs/scripts/FreshJR_QOS -check #FreshJR_QOS#
25 1 * * * sh /jffs/scripts/firewall banmalware #Skynet_banmalware#
25 1 * * Mon sh /jffs/scripts/firewall update #Skynet_autoupdate#
0 * * * * sh /jffs/scripts/firewall save #Skynet_save#
admin@RT-AC86U-9C50:/tmp/home/root#
 
Oops, I missed that it IS in your cron list. You say it does not run? Did you make sure to set the execute permissions on the rm_dcd_crash script?
Code:
chmod 755 /jffs/scripts/rm_dcd_crash
 
Last edited:
As I suspected, the post-mount script runs at boot only, you could run is manually, but it might duplicate other items.

I think it best copy and past this line into your SSH terminal to add it to the cron jobs. Then it will be added automatically at boot from here on. You only need to do this now to get it started.
Code:
cru a dcd_crash "*/5 * * * * /jffs/scripts/rm_dcd_crash /tmp/syslog.log #rm_dcd_crash"
So, just run this in my terminal? Thanks! I’ll give it a try and report back.
 
So, just run this in my terminal? Thanks! I’ll give it a try and report back.
No, I changed my post, see back a couple posts.

I start the corrected one with "Oops"
 
I did this:

Code:
chmod +x rm_dcd_crash
Ok, I'm stumped. You say the crashes are still accumulating in the syslog? If you scroll up they are not removed?
 
Try this in an ssh terminal, it should remove all those entries.
Code:
sh /jffs/scripts/rm_dcd_crash /tmp/syslog.log
 
Ok, I'm out of ideas. I just checked the first page of this thread, remembering I had similar issues. I finally did a router reboot to get it working. I still do not know why, but you might try that you can do a reboot without annoying others using the network.
 
Try using the raw command (in an ssh terminal session) instead of the script.
Code:
/bin/sed -i '/kernel: dcd/,/kernel: x1 /d' /tmp/syslog.log
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top