Thank you for that and for your research work!
On a different matter, a general question: using the http port 8000 API, is there a way to get hold of some values such as the attenuation, the link-uptime and o/s-uptime/time since boot? (One of these latter values might be available at the end of one of the long, long data listings though.)
Attenuation and link uptime as displayed in the status page would need you to parse them out of :8000/data/stats just like the javascript in the page does, and unfortunately neither are stored in the log file if you mean finding historical values - i.e what was the attenuation before this resync - but could be added.
No way to get uptime with the modem as it is.
I've been playing with the
httpd server included with busybox in the stock firmware (rather than the zyxel httpd that runs the normal web UI), its remarkably easy to get old school cgi scripts working for what ever you might want. If you were feeling adventurous you could try something like:
~ # cd /data
/data # mkdir -p www/cgi-bin
/data # busybox httpd -h /data/www/ -p 8001
/data # echo "#!/bin/sh" > www/cgi-bin/uptime
/data # echo "echo" >> www/cgi-bin/uptime
/data # echo "uptime" >> www/cgi-bin/uptime
/data # chmod +x www/cgi-bin/uptime
Visiting modemip:8001/cgi-bin/uptime you would be greeted by:
08:54:26 up 40 min, load average: 1.03, 1.05, 1.00
The other values you mentioned could be awked out in similar scripts residing in /data/www/cgi-bin. Starting of this server could be added without issue to your processing of /data/boot-cmds.sh.
Edit:
I haven't forgotten about the ssh server btw, these additional values could be added to the normal stats server then.