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!

Kivc already say rc6 coming out soon. Kivc already say the OpenSSL version is more like alpha testing. Not supposed to be normal operation. You should already know when you are in the test group.
Understood, I am not looking to pull noobs deep into the rabbit hole, but I forsee static linked ps coming out of beta at some point, after which it will be necessary to use the static linked binary for all (not just for ninjas, lol). ;)

@kvic, yes I understand that this is not a lifelong commitment on your part. We all appreciate the rapid pace of development and testing, and if you decide to take a break that may require others to compile stuff for the general public to use. I have my fingers crossed that entware gets openssllib 1.1.1 before that happens, hehe. ;)

@thelonelycoder I updated to amtm4.0... thank you!!!

Kev
 
Originally I had a plan A. Now obsolete even before time to make a poll.
That plan A being a selector in your beta script?
 
amtm 1.5 is now available

What's new in v1.5
- Better Skynet version code (by @Adamm )
- Smarter handling of swap file errors

How to update to v1.5
In the amtm menu, enter u to update to this latest version.
 
The output of a script like this may be of interest for those who need to troubleshoot the router and USB stick behavior over time. It helped me and I believe it would fit nicely in the AMTM menu and as a cron job. ... just an idea.

Thu Nov 29 19:54:58 EST 2018
-------------------------------------
Uptime: 2 days, 15 hours, 11 minutes

CPU,DRAM (over)clock frequency and speed: 1000,800
BogoMIPS : 1998.84
BogoMIPS : 1998.84

CPU Load Average: 0.77 0.44 0.31
CPU temperature : 57øC
2.4 GHz Chip Temp: 39 (C)
5 GHz Chip Temp : 44 (C)

Mem: 255700 204632 51068 0 1056 13704
Swap: 262140 8152 253988
jffs: 64256 7876 56380 12% /jffs

Checking pixelserv-tls (Diversion)... alive
Checking USB flash drive... asus: 1141/1929536 files (1.2% non-contiguous), 169172/3858688 blocks
Checking Skynet version and status... [%] Skynet Update Detected - v6.6.4 (8d385e0a4f74d1c7321ddc26dccc1956)

18/18 Tests Sucessful
[#] 152748 IPs (+0) -- 1663 Ranges Banned (+0) || 2951 Inbound -- 4947 Outbound Connections Blocked! [debug] [3s]
 
The output of a script like this may be of interest for those who need to troubleshoot the router and USB stick behavior over time. It helped me and I believe it would fit nicely in the AMTM menu and as a cron job. ... just an idea.

Thu Nov 29 19:54:58 EST 2018
-------------------------------------
Uptime: 2 days, 15 hours, 11 minutes

CPU,DRAM (over)clock frequency and speed: 1000,800
BogoMIPS : 1998.84
BogoMIPS : 1998.84

CPU Load Average: 0.77 0.44 0.31
CPU temperature : 57øC
2.4 GHz Chip Temp: 39 (C)
5 GHz Chip Temp : 44 (C)

Mem: 255700 204632 51068 0 1056 13704
Swap: 262140 8152 253988
jffs: 64256 7876 56380 12% /jffs

Checking pixelserv-tls (Diversion)... alive
Checking USB flash drive... asus: 1141/1929536 files (1.2% non-contiguous), 169172/3858688 blocks
Checking Skynet version and status... [%] Skynet Update Detected - v6.6.4 (8d385e0a4f74d1c7321ddc26dccc1956)

18/18 Tests Sucessful
[#] 152748 IPs (+0) -- 1663 Ranges Banned (+0) || 2951 Inbound -- 4947 Outbound Connections Blocked! [debug] [3s]
If you write it out as a self contained script and make it publicly available it may be included in amtm.
 
The way I put it together is:
#!/bin/sh
clear
echo
echo
date
echo -------------------------------------
echo -n "Uptime: "
uptime | awk -F'( |,|:)+' '{if ($7=="min") m=$6; else {if ($7~/^day/)
{d=$6;h=$8;m=$9} else {h=$6;m=$7}}} {print d+0,"days,",h+0,"hours,",m+0,"minutes"}'
echo
echo -n "CPU,DRAM (over)clock frequency and speed: "
nvram get clkfreq
echo
cat /proc/cpuinfo | grep BogoMIPS | strings | sed 's/^/ /'
echo
echo -n "CPU Load Average: " ; cat /proc/loadavg | cut -c 1-15
cat /proc/dmu/temperature
echo -n ; sh /mnt/asus/conf/w
echo
free | grep Mem | strings | sed 's/^/ /'
free | grep Swap | strings | sed 's/^/ /'
echo -n " jffs: " ; df /dev/mtdblock4 | tail -n 1 | sed 's/^/ /' | cut -c28-
echo
/opt/etc/init.d/S80pixelserv-tls check | sed 's/^ *//'
echo -n "Checking USB flash drive... " ; tail -n 1 /jffs/amtm-disk-check.log
# echo -e "Checking Dnscrypt status... " ; /jffs/dnscrypt/dnscrypt-proxy -check | sed 's/^/ /' | cut -c28-
echo -n "Checking Skynet version and status... " ; sh /mnt/asus/conf/sk

...and for chips temp (w):
!/bin/bash
alias elog='logger -t " 2.4 GHz Chip Temp" -s'
GETTEMP=`wl -i eth1 phy_tempsense | awk '{ print $1}'`
TEMP=$(((GETTEMP/2)+20))
elog "$TEMP (C)"
wait
alias elog='logger -t " 5 GHz Chip Temp " -s'
GETTEMP=`wl -i eth2 phy_tempsense | awk '{ print $1}'`
TEMP=$(((GETTEMP/2)+20))
elog "$TEMP (C)"

...and then for (sk)
SkyNet:
#/!/bin/bash
/jffs/scripts/firewall update check | grep Skynet | strings | sed 's/^/ /'
wait
echo
/jffs/scripts/firewall debug info | grep Tests | strings | sed 's/^/ /'
wait
echo
/jffs/scripts/firewall debug info | grep IPs | strings | tail -n 1 | sed 's/^/ /'
echo

That's about it - and whoever else has anything to add without overloading it is more than welcome
 
Last edited:
The way I put it together is:
#!/bin/sh
clear
echo
echo
date
echo -------------------------------------
echo -n "Uptime: "
uptime | awk -F'( |,|:)+' '{if ($7=="min") m=$6; else {if ($7~/^day/)
{d=$6;h=$8;m=$9} else {h=$6;m=$7}}} {print d+0,"days,",h+0,"hours,",m+0,"minutes"}'
echo
echo -n "CPU,DRAM (over)clock frequency and speed: "
nvram get clkfreq
echo
cat /proc/cpuinfo | grep BogoMIPS | strings | sed 's/^/ /'
echo
echo -n "CPU Load Average: " ; cat /proc/loadavg | cut -c 1-15
cat /proc/dmu/temperature
echo -n ; sh /mnt/asus/conf/w
echo
free | grep Mem | strings | sed 's/^/ /'
free | grep Swap | strings | sed 's/^/ /'
echo -n " jffs: " ; df /dev/mtdblock4 | tail -n 1 | sed 's/^/ /' | cut -c28-
echo
/opt/etc/init.d/S80pixelserv-tls check | sed 's/^ *//'
echo -n "Checking USB flash drive... " ; tail -n 1 /jffs/amtm-disk-check.log
# echo -e "Checking Dnscrypt status... " ; /jffs/dnscrypt/dnscrypt-proxy -check | sed 's/^/ /' | cut -c28-
echo -n "Checking Skynet version and status... " ; sh /mnt/asus/conf/sk

...and for chips temp (w):
!/bin/bash
alias elog='logger -t " 2.4 GHz Chip Temp" -s'
GETTEMP=`wl -i eth1 phy_tempsense | awk '{ print $1}'`
TEMP=$(((GETTEMP/2)+20))
elog "$TEMP (C)"
wait
alias elog='logger -t " 5 GHz Chip Temp " -s'
GETTEMP=`wl -i eth2 phy_tempsense | awk '{ print $1}'`
TEMP=$(((GETTEMP/2)+20))
elog "$TEMP (C)"

...and then for (sk)
SkyNet:
#/!/bin/bash
/jffs/scripts/firewall update check | grep Skynet | strings | sed 's/^/ /'
wait
echo
/jffs/scripts/firewall debug info | grep Tests | strings | sed 's/^/ /'
wait
echo
/jffs/scripts/firewall debug info | grep IPs | strings | tail -n 1 | sed 's/^/ /'
echo

That's about it - and whoever else has anything to add without overloading it is more than welcome
amtm just runs the install command, not its own code. Diversion and Skynet and the remaining scripts have an install command that downloads a file and runs on its own, with its own install/reinstall/uninstall/settings functions.
The script needs to be hosted on a publicly accessable location.
 
@thelonelycoder Could you let me know which changes I need to implement for YazFi to be amtm compatible please? https://www.snbforums.com/threads/yazfi-enhanced-asuswrt-merlin-guest-wifi-networks.45924/

I suspect it's the reliance on editing a config file, rather than a menu driven system, but confirmation would be good so I can add to my to-do :)
Menu driven UI for install/uninstall/settings functions are a minimum requirement.
When not installed, amtm will run the install command. Once installed it will open the UI for the other functions.
 
Yes, I see an occasional "recovering journal" in the log, but no "not clean". It has gone through four reboots, but again this has plagued me for many moons. Fingers crossed.
Hi, sorry to resurrect an old section of the thread, especially one that's a bit off-topic, but I have been struggling with similar issues and thought it would be better to ask here than create a new thread due to previous discussions about it. Did your issue stay fixed?

I have read through the entire thread and have tried all kinds of solutions/combinations - mbr, gpt, ext2, ext4 without journaling, ext4 with journaling. On every reboot I either get "was not cleanly unmounted, check forced" with a non-journaling FS, or "recovering journal" on ext4 with journaling.

I'm using 2 x new Sandisk Ultra Flair sticks, but have also tried with others. I'm using Partition Wizard on Windows to format them, or booting from a GParted live USB to use that, have also tried either fdisk on the router for mbr or installing gdisk & parted through Entware to do gpt. I haven't tried formatting them from a PC running Linux natively but that seems overkill.

I'm not sure how much of an issue this is, but wondered if you - or anyone really :) - had any suggestions? Is this likely to indicate a long term problem or should I just stop worrying about it? The router is an 86U and it's only a few weeks old, currently running 384.8_beta2.

Also, on a mostly un-related (I think) note, sda1 and sdb2 seem to swap around sometimes when I reboot, and I have to repair the swap file path in AMTM. Is there a way to pin a particular drive or USB port to a particular device? Or am I missing something obvious? (Edit: further reading suggests labelling both flash drives will get around this...? or adding an fstab to /jffs/configs)

Again, sorry for the off-topic, I hope it's okay given previous discussions, but if not I'll start a new thread.

Update: Assigned mount points in a custom fstab and suddenly no more disk check errors. Will have to play tomorrow to see if this is a coincidence or has somehow fixed it...
 
Last edited:
Hi, sorry to resurrect an old section of the thread, especially one that's a bit off-topic, but I have been struggling with similar issues and thought it would be better to ask here than create a new thread due to previous discussions about it. Did your issue stay fixed?

I have read through the entire thread and have tried all kinds of solutions/combinations - mbr, gpt, ext2, ext4 without journaling, ext4 with journaling. On every reboot I either get "was not cleanly unmounted, check forced" with a non-journaling FS, or "recovering journal" on ext4 with journaling.

I'm using 2 x new Sandisk Ultra Flair sticks, but have also tried with others. I'm using Partition Wizard on Windows to format them, or booting from a GParted live USB to use that, have also tried either fdisk on the router for mbr or installing gdisk & parted through Entware to do gpt. I haven't tried formatting them from a PC running Linux natively but that seems overkill.

I'm not sure how much of an issue this is, but wondered if you - or anyone really :) - had any suggestions? Is this likely to indicate a long term problem or should I just stop worrying about it? The router is an 86U and it's only a few weeks old, currently running 384.8_beta2.

Also, on a mostly un-related (I think) note, sda1 and sdb2 seem to swap around sometimes when I reboot, and I have to repair the swap file path in AMTM. Is there a way to pin a particular drive or USB port to a particular device? Or am I missing something obvious? (Edit: further reading suggests labelling both flash drives will get around this...? or adding an fstab to /jffs/configs)

Again, sorry for the off-topic, I hope it's okay given previous discussions, but if not I'll start a new thread.

Update: Assigned mount points in a custom fstab and suddenly no more disk check errors. Will have to play tomorrow to see if this is a coincidence or has somehow fixed it...

You should only use ext2 or ext4-without-journaling. I have posted instructions for making a drive compatible with our routers, you can read here:
https://www.snbforums.com/threads/diversion-the-router-ad-blocker.48538/page-71#post-447604
 
Thanks, I had tried a similar process, but without the step to zero out the drive before formatting. I'll give it a go. Many thanks for the help!
 
Hey guys, my ext2 usb drive 8g won't properly dismount for a reboot. This cause the disk check log to always show a forced scan. I don't know why this is happening as I always showed a clean dismount up until Nov 20. Is there a way to figure the lingering app or whatever is not allowing the drive to cleanly dismount? Thanks guys.
 
Dumb question @john9527 What is fuser and how does it work?
fuser is a command line utility that can tell you what processes are using a file or mount point...
Here's an example output from my system....
Code:
# fuser -m /mnt/Router_Share -v
                     USER        PID ACCESS COMMAND
/tmp/mnt/Router_Share:
                     admin    kernel mount /tmp/mnt/Router_Share
                     admin      1306 F.... minidlna
                     admin      1308 F.... minidlna
                     admin      1309 F.... minidlna
                     admin      5225 f.c.. smbd
 
Problem solved @john9527 The program running was Stubby, and no umount command given. I ended up using this as the contents of my services-stop file:
Code:
#!/bin/sh
/opt/etc/init.d/S61stubby stop  # Added by me
/opt/etc/init.d/rc.unslung stop # Added by Diversion
sh /jffs/scripts/firewall save # Skynet Firewall Addition
swapoff /tmp/mnt/EXT2/myswap.swp  # Added by me
umount /tmp/mnt/EXT2  # Added by me
Works awesome!! Thanks @john9527 you're awesome!:)
 
I ended up using this as the contents of my services-stop file:
Actually, would be better to use /jffs/scripts/unmount (another one of Merlin's custom scripts that's called once for each mnt point with a passed parameter $1 being the mnt point).
 
Actually, would be better to use /jffs/scripts/unmount (another one of Merlin's custom scripts that's called once for each mnt point with a passed parameter $1 being the mnt point).
Where can I find it and could you be a little more descriptive about the use of this $1 value please? Can you give me a sample command in regards to this please? Thanks bud!
 

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