SQM autorate-ingress: Can I set thresholds for this?

ok, I'll get it running on an OpenWrt vm and see if I can figure out what's up. will have to be tomorrow though.

mean time what happens if you run the erl command without the erlc compile step?

I didn't try that until now, here's what I got:

root@Main_SQM:~# erl sqmfeedback.erl
Erlang/OTP 21 [erts-10.0] [source] [smp:1:1] [ds:1:1:10] [async-threads:1]

Eshell V10.0  (abort with ^G)

try that one instead


root@Main_SQM:~# erl -noshell -s sqmfeedback main
{"init terminating in do_boot",{undef,[{sqmfeedback,main,[],[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
init terminating in do_boot ({undef,[{sqmfeedback,main,[],[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})

Crash dump is being written to: erl_crash.dump...done

No rush man, I appreciate the help to begin with xD
Ill do some research on my own as well and see if I can come up with anything.

yeah it's weird. I'll have to try it in the VM, it all works fine on my desktop machine. thanks for being the guinea pig.

you could run erl by itself and then type c(sqmfeedback). (note the period) at the erlang shell but I'm guessing you'll get more of the same.

ahh, this does shed more light on the issue...

1> c(sqmfeedback).
sqmfeedback.erl:46: Warning: variable 'Time' is unused
sqmfeedback.erl:74: Warning: variable 'T' is unused
sqmfeedback.erl:80: Warning: variable 'SitePids' is unused
sqmfeedback.erl:83: Warning: variable 'TimerPid' is unused

actually, it doesn't, that was a clean compile, those warnings are just there to help you catch bugs in case you were supposed to use a variable but didn't. in this case I just assigned some stuff but didn't use the assigned value... now I'm really confused because it compiled fine :man_shrugging:

My ISP pretty much gives me stable rates with decent peering/transit, so I am confident that would rarely/never trigger on my link. (And I do not consider this to be a reasonable solution for the fact that on my link the sync speed varies between retrains, as this is only happening every few days and speeds are reliable while the link is up). So yes I am tempted to play with that, although I am also puzzled by selecting erlang for this task, that seems like using ICBMs to drive away a flock of sparrows :wink:

I needed some ICBM target practice and this particular flock looked ripe for the picking.

imagine this as a first step towards a monitoring and configuration expert system that asks plain language questions and then provides total router domination... :grinning:

Well, for real ICBM target practice I had expected ADA to be the language of choice :wink:
But fair enough your project your choice of language.

Let's quickly brainstorm a name here. How about something that combines both the facts that this is about the network and that only the sky is the limit (sky as in outer atmosphere).

Mmmh, how about "skynet". that has a friendly ring to it?

perfect! will appeal mightily to all those desperate gamers who will fling their cash at me hand over fist. Also I need a special 3D printed enclosure for a RPi that looks like a monster truck. (I don't think I can afford the rights to an Arnold Schwarzenegger action figure)

Ugh. I installed erlang and erlang-compiler and a few others in my VM running 19.07.0 and it gives a similar error when doing erlc, and it just stares blankly at me when I run "erl"... I have to Ctrl-c and (a)bort.

I guess I could try installing a 19.07.1 VM to see if there were any bugfixes related to this...

No luck... I suppose I could go the route you went and just install every erlang package until I can at least run "erl" and get a shell.. meh.

When you just run "erl" from the command line, do you get a shell prompt? I just get a blank screen.

Yeah, I get this:

and when I do 'c(sqmfeedback)' I get this, but it just sits there and does nothing:

ok, type sqmfeedback:main() after the c(sqmfeedback) and it should start the whole system... which will probably break but in a new way!

in mean time, you're running on what? I'm kinda disappointed that I can't get "erl" to do anything. what version of OpenWrt are you running?

I'm not quite following you here... maybe I'm still half asleep xD

I'm running 19.07.1.

at the second prompt in the "erl" shell

2> sqmfeedback:main()

That's what I thought, Ill check to see what the process is doing, but it didn't seem to do much.

1> c(sqmfeedback).                  
sqmfeedback.erl:46: Warning: variable 'Time' is unused
sqmfeedback.erl:74: Warning: variable 'T' is unused
sqmfeedback.erl:80: Warning: variable 'SitePids' is unused
sqmfeedback.erl:83: Warning: variable 'TimerPid' is unused
2> sqmfeedback:main()

ah, yes. you have to type the period too... forgot


or since you've already entered the rest... just type "." to end the command

Anything before it? It just says there's a syntax error with the command:

syntax error before: sqmfeedback

hmm.. just try the whole thing again?

here's what it looks like when I do it (on my desktop machine):

2> sqmfeedback:main().
ping amazon.com with results: [65.7,65.7,65.7,65.8,68.2]
ping gstatic.com with results: [7.17,7.5,8.03,8.1,12.7]
ping akamai.com with results: [7.02,7.28,7.31,8.37,8.39]
ping dns.google.com with results: [6.91,7.04,7.7,8.28,8.47]
ping cloudflare.com with results: [7.26,7.31,7.97,8.08,8.8]
ping fbcdn.com with results: [6.57,6.9,7.35,7.67,8.33]
ping facebook.com with results: [7.19,7.6,7.61,8.09,9.2]
ping one.one.one.one with results: [7.41,7.47,7.54,7.69,8.85]
ping quad9.net with results: [16.5,16.6,16.7,16.7,17.6]