What's new

amtm amtm - the Asuswrt-Merlin Terminal Menu

  • 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!

The System Log will have error messages hinting for the reason why. Post them.
thanks. i just checked the messages log at /opt/var/log and there is nothing on the 15th at 230am
Code:
Apr 14 23:42:03 RT-AC3100-0548 start_ddns: update DOMAINS.GOOGLE.COM default@domains.google.com, wan_unit 0
Apr 14 23:42:04 RT-AC3100-0548 inadyn[16855]: In-a-dyn version 2.5 -- Dynamic DNS update client.
Apr 15 00:42:33 RT-AC3100-0548 rc_service: watchdog 366:notify_rc start_ddns
Apr 15 00:42:33 RT-AC3100-0548 custom_script: Running /jffs/scripts/service-event (args: start ddns)
Apr 15 00:42:33 RT-AC3100-0548 start_ddns: update DOMAINS.GOOGLE.COM default@domains.google.com, wan_unit 0
Apr 15 00:42:34 RT-AC3100-0548 inadyn[22112]: In-a-dyn version 2.5 -- Dynamic DNS update client.
Apr 15 01:43:05 RT-AC3100-0548 rc_service: watchdog 366:notify_rc start_ddns
Apr 15 01:43:05 RT-AC3100-0548 custom_script: Running /jffs/scripts/service-event (args: start ddns)
Apr 15 01:43:05 RT-AC3100-0548 start_ddns: update DOMAINS.GOOGLE.COM default@domains.google.com, wan_unit 0
Apr 15 01:43:06 RT-AC3100-0548 inadyn[28807]: In-a-dyn version 2.5 -- Dynamic DNS update client.
Apr 15 02:43:35 RT-AC3100-0548 rc_service: watchdog 366:notify_rc start_ddns
Apr 15 02:43:35 RT-AC3100-0548 custom_script: Running /jffs/scripts/service-event (args: start ddns)
Apr 15 02:43:35 RT-AC3100-0548 start_ddns: update DOMAINS.GOOGLE.COM default@domains.google.com, wan_unit 0
Apr 15 02:43:36 RT-AC3100-0548 inadyn[1952]: In-a-dyn version 2.5 -- Dynamic DNS update client.
Apr 15 02:49:05 RT-AC3100-0548 watchdog: Forced DDNS update (after 1 days)
Apr 15 02:49:05 RT-AC3100-0548 rc_service: watchdog 366:notify_rc restart_ddns
Apr 15 02:49:05 RT-AC3100-0548 custom_script: Running /jffs/scripts/service-event (args: restart ddns)
Apr 15 02:49:05 RT-AC3100-0548 start_ddns: update DOMAINS.GOOGLE.COM default@domains.google.com, wan_unit 0
Apr 15 02:49:06 RT-AC3100-0548 inadyn[2505]: In-a-dyn version 2.5 -- Dynamic DNS update client.
Apr 15 02:49:07 RT-AC3100-0548 inadyn[2505]: Update forced for alias svr0.xxxxx.com, new IP# 190.xxx.241
Apr 15 02:49:08 RT-AC3100-0548 inadyn[2505]: Updating cache for svr0.xxxxx.com
Apr 15 03:30:01 RT-AC3100-0548 adaptive QOS: Scheduled Persistence Check -> No modifications necessary
 
Last edited:
thanks. i just checked the messages log at /opt/var/log and there is nothing on the 15th at 230am
Code:
Apr 14 23:42:03 RT-AC3100-0548 start_ddns: update DOMAINS.GOOGLE.COM default@domains.google.com, wan_unit 0
Apr 14 23:42:04 RT-AC3100-0548 inadyn[16855]: In-a-dyn version 2.5 -- Dynamic DNS update client.
Apr 15 00:42:33 RT-AC3100-0548 rc_service: watchdog 366:notify_rc start_ddns
Apr 15 00:42:33 RT-AC3100-0548 custom_script: Running /jffs/scripts/service-event (args: start ddns)
Apr 15 00:42:33 RT-AC3100-0548 start_ddns: update DOMAINS.GOOGLE.COM default@domains.google.com, wan_unit 0
Apr 15 00:42:34 RT-AC3100-0548 inadyn[22112]: In-a-dyn version 2.5 -- Dynamic DNS update client.
Apr 15 01:43:05 RT-AC3100-0548 rc_service: watchdog 366:notify_rc start_ddns
Apr 15 01:43:05 RT-AC3100-0548 custom_script: Running /jffs/scripts/service-event (args: start ddns)
Apr 15 01:43:05 RT-AC3100-0548 start_ddns: update DOMAINS.GOOGLE.COM default@domains.google.com, wan_unit 0
Apr 15 01:43:06 RT-AC3100-0548 inadyn[28807]: In-a-dyn version 2.5 -- Dynamic DNS update client.
Apr 15 02:43:35 RT-AC3100-0548 rc_service: watchdog 366:notify_rc start_ddns
Apr 15 02:43:35 RT-AC3100-0548 custom_script: Running /jffs/scripts/service-event (args: start ddns)
Apr 15 02:43:35 RT-AC3100-0548 start_ddns: update DOMAINS.GOOGLE.COM default@domains.google.com, wan_unit 0
Apr 15 02:43:36 RT-AC3100-0548 inadyn[1952]: In-a-dyn version 2.5 -- Dynamic DNS update client.
Apr 15 02:49:05 RT-AC3100-0548 watchdog: Forced DDNS update (after 1 days)
Apr 15 02:49:05 RT-AC3100-0548 rc_service: watchdog 366:notify_rc restart_ddns
Apr 15 02:49:05 RT-AC3100-0548 custom_script: Running /jffs/scripts/service-event (args: restart ddns)
Apr 15 02:49:05 RT-AC3100-0548 start_ddns: update DOMAINS.GOOGLE.COM default@domains.google.com, wan_unit 0
Apr 15 02:49:06 RT-AC3100-0548 inadyn[2505]: In-a-dyn version 2.5 -- Dynamic DNS update client.
Apr 15 02:49:07 RT-AC3100-0548 inadyn[2505]: Update forced for alias svr0.xxxxx.com, new IP# 190.xxx.241
Apr 15 02:49:08 RT-AC3100-0548 inadyn[2505]: Updating cache for svr0.xxxxx.com
Apr 15 03:30:01 RT-AC3100-0548 adaptive QOS: Scheduled Persistence Check -> No modifications necessary
The amtm reboot scheduler sets the cron job via the /jffs/scripts/init-start file, which amtm then greps for displaying in its UI.
As it is correctly shown in your previous screen shot I know it is set correctly.
One check you can do is to run this command in the terminal, it should list the #amtm_RebootScheduler# job:
Code:
cru l
That's a lower case L.
 
Well, I have a suggestion. Batch updates on scripts.
A real example - Jack yaz released an update for almost all of his scripts at the same time and amtm said that they have updated. And then, we had to go manually inside each script to update.
So my suggestion is, when looking for updates (u option) on amtm, it asks "Do you want to update the script(s)?" And then amtm calls the update function of each script in need.
Thanks for the suggestion but as with Diversion, I would not appreciate if a third party script would trigger the update. I leave that to the individual scripts for they know better how to handle updates and compatibility issues, including recovering form failures.
 
Yep, it is a valid point. Besides the nightly back up of the entire USB key and JFFS directory, I also do daily backups of key information files that I want a history of.

In addition, I backup all my final important scripts and all my OpenVPN server keys to another network location on a one time basis. Anything else really is not important if I loose it. Still, now you have challenged me, I don't think it would be difficult to modify the script to create a unique directory name per night. The number of backups might get unmanageable after a while. But, it will give me something to do while trapped at home :)

I'm not doing this on my device but throwing an idea out there for an alternate idea to backup with 'history. One could create 7 new cron entries, to run a unique one each day, and use tar
'tar -czf /(backup_location_mountpoint)/backup_filename_Monday.tgz /tmp/mnt/backup_dir' (and one for Tuesday, Wednesday, etc)

This assumes you dont need the file and structure intact and usable from the other mount point. It will also hammer the CPUs since the tar 'z' option is there to compress (substitute 'j' for 'z' for better compression & slower compression). Not sure if the BusyBox tar version is full-featured or you'd want to get a better entware version. Then there's cron and its funky command syntax. I've not dedicated any brainpower to figure it out but i'm sure a daily job is possible.

Just idea sharing FWIW.
 
And if I had paid more attention to the menus, I would have also realized I could disable the adblocking with option a. But if there’s a hard way to do something, I’ll find it! :(
You have that special skill too?! :oops:
 
I'm not doing this on my device but throwing an idea out there for an alternate idea to backup with 'history. One could create 7 new cron entries, to run a unique one each day, and use tar
'tar -czf /(backup_location_mountpoint)/backup_filename_Monday.tgz /tmp/mnt/backup_dir' (and one for Tuesday, Wednesday, etc)

This assumes you dont need the file and structure intact and usable from the other mount point. It will also hammer the CPUs since the tar 'z' option is there to compress (substitute 'j' for 'z' for better compression & slower compression). Not sure if the BusyBox tar version is full-featured or you'd want to get a better entware version. Then there's cron and its funky command syntax. I've not dedicated any brainpower to figure it out but i'm sure a daily job is possible.

Just idea sharing FWIW.

I've been thinking about a method on how best to check the backup directory (assuming one directory for each day, or a .gz file) and delete any directory older than 10 days. Checking, of course, to make sure we hold onto at least the last 5 backups in case the backup script fails to run and loose some days.
 
That's built into Diversion, one of the perks it offers. It checks for firmware updates (FWun), Diversion and amtm updates including amtm third party updates (DivUn).
One just has to enable it.

Edit: Building this rather large email function into amtm and effectively duplicating the functions is pointless IMHO.

I don't want any script updating without me first approving it so I can monitor the progress. That said, I already have a email script that I call from other scripts whenever something happens that I want to be made aware of. I would like to see a command line amtm utility that will simply check for script updates and output to stdout or something that I can use within my own script.
 
The amtm reboot scheduler sets the cron job via the /jffs/scripts/init-start file, which amtm then greps for displaying in its UI.
As it is correctly shown in your previous screen shot I know it is set correctly.
One check you can do is to run this command in the terminal, it should list the #amtm_RebootScheduler# job:
Code:
cru l
That's a lower case L.
thanks.
yes. it is there. still i dont see that my router is actually rebooting on the specified days :(

Code:
andresmorago@RT-AC3100-0548:/tmp/home/root# cru l
30 2 1,15 * * service reboot #amtm_RebootScheduler#
*/5 * * * * /jffs/scripts/connmon generate #connmon#
0 * * * * /jffs/scripts/uiDivStats generate #uiDivStats#
5 0 * * * /opt/sbin/logrotate /opt/etc/logrotate.conf >> /opt/tmp/logrotate.daily 2>&1 #logrotate#
*/10 * * * * /jffs/scripts/ntpmerlin generate #ntpMerlin#
13,43 3-5 * * * /jffs/scripts/spdmerlin generate #spdMerlin#
25 10 * * * sh /jffs/scripts/firewall banmalware #Skynet_banmalware#
15 1 * * Mon sh /jffs/scripts/firewall update #Skynet_autoupdate#
0 * * * * sh /jffs/scripts/firewall save #Skynet_save#
*/2 * * * * /etc/openvpn/server1/vpns-watchdog1.sh #CheckVPNServer1#
00 2 * * Mon sh /opt/share/diversion/file/update-bl.div reset #Diversion_UpdateBL#
20 5 * * * sh /opt/share/diversion/file/rotate-logs.div #Diversion_RotateLogs#
20 17 * * * diversion count_ads count #Diversion_CountAds#
51 */12 * * * sh /jffs/scripts/firewall debug genstats #Skynet_genstats#
30 3 * * * /jffs/scripts/FreshJR_QOS -check #FreshJR_QOS#
andresmorago@RT-AC3100-0548:/tmp/home/root#
 
I don't want any script updating without me first approving it so I can monitor the progress. That said, I already have a email script that I call from other scripts whenever something happens that I want to be made aware of. I would like to see a command line amtm utility that will simply check for script updates and output to stdout or something that I can use within my own script.
For amtm there's the silent third party update check that Diversion uses:
Code:
amtm tpu
If there are updates available, /tmp/amtm-tpu-check is created with the bare info. If not, then there are no updates.
Be sure to delete the file after you've done your check.
To check for an amtm update, you'd have to be creative yourself.
 
I don't want any script updating without me first approving it so I can monitor the progress. That said, I already have a email script that I call from other scripts whenever something happens that I want to be made aware of. I would like to see a command line amtm utility that will simply check for script updates and output to stdout or something that I can use within my own script.
Neither amtm nor Diversion have the ability to auto-update. Not even through the command line. They both require explicit user input to update.
And just to repeat that again. None of my scripts have ever had or will ever have that ability.
 
Last edited:
thanks.
yes. it is there. still i dont see that my router is actually rebooting on the specified days :(

Code:
andresmorago@RT-AC3100-0548:/tmp/home/root# cru l
30 2 1,15 * * service reboot #amtm_RebootScheduler#
*/5 * * * * /jffs/scripts/connmon generate #connmon#
0 * * * * /jffs/scripts/uiDivStats generate #uiDivStats#
5 0 * * * /opt/sbin/logrotate /opt/etc/logrotate.conf >> /opt/tmp/logrotate.daily 2>&1 #logrotate#
*/10 * * * * /jffs/scripts/ntpmerlin generate #ntpMerlin#
13,43 3-5 * * * /jffs/scripts/spdmerlin generate #spdMerlin#
25 10 * * * sh /jffs/scripts/firewall banmalware #Skynet_banmalware#
15 1 * * Mon sh /jffs/scripts/firewall update #Skynet_autoupdate#
0 * * * * sh /jffs/scripts/firewall save #Skynet_save#
*/2 * * * * /etc/openvpn/server1/vpns-watchdog1.sh #CheckVPNServer1#
00 2 * * Mon sh /opt/share/diversion/file/update-bl.div reset #Diversion_UpdateBL#
20 5 * * * sh /opt/share/diversion/file/rotate-logs.div #Diversion_RotateLogs#
20 17 * * * diversion count_ads count #Diversion_CountAds#
51 */12 * * * sh /jffs/scripts/firewall debug genstats #Skynet_genstats#
30 3 * * * /jffs/scripts/FreshJR_QOS -check #FreshJR_QOS#
andresmorago@RT-AC3100-0548:/tmp/home/root#
Beats me. All is set and ready to do the reboot and yet nothing happens?
No log entry, no nothing?

Time to do a reboot through the WebUI, see if that works.
Or issue the command in the terminal:
Code:
service reboot
 
yes. i was able to reboot just fine today with a regular reboot command. iim thinking its time to do a clean install of my router :/
 
Neither amtm nor Diversion have the ability to auto-update. Not even through the command line. They both require explicit user input to update.
And just to repeat that again. None of my scripts have ever had or will ever have that ability.
I am glad you always keep the users best interest in mind when it comes to not introducing risky features like automatic update.
 
I am glad you always keep the users best interest in mind when it comes to not introducing risky features like automatic update.
Theoretically I could allow such a service for amtm as it does not depend on non-router software (as does Skynet) and the chances that it breaks something are slim when a rigurous testing procedure is done before release.
@Adamm does offer that periodic update check and install for Skynet, which works really well and so far for me without a problem, kudos to Melbourne!

Diversion does rely on Entware, and is in my opinion much more complex than Skynet and amtm combined. The chances that an update breaks something are real, even with a careful check procedure. It’s human do err and I had my share of incidents in that area.
Early birds that update within minutes when one is released usually catch it so I can intervene before the damage reaches the bulk of users installations.

With that in mind and not wanting to hear the why’s and when’s from users I will decline any auto-update feature for amtm and Diversion.
 
Getting update errors and timeouts today. Rebooting the router didn't help.
 

Attachments

  • Screen Shot 2020-04-21 at 12.08.58 PM.png
    Screen Shot 2020-04-21 at 12.08.58 PM.png
    43.2 KB · Views: 165
GitHub issues.
 

Similar threads

Latest 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