-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose get_loss #978
Expose get_loss #978
Conversation
This works also without Babeld, no? |
Tested also on OpenWrt 22.03 and it also works there. |
@selankon the dependency on babel is not obvious to me, can you exaplin it? |
@G10h4ck probably is not needed. I just copy pasted the code on lime-metrics if lutils.is_installed("lime-proto-bmx6") then
loss = utils.get_loss(node..".mesh", 6)
shell_output = lutils.unsafe_shell("netperf -6 -l 10 -H "..node..".mesh| tail -n1| awk '{ print $5 }'")
elseif lutils.is_installed("lime-proto-babeld") then
loss = utils.get_loss(node, 4)
shell_output = lutils.unsafe_shell("netperf -l 10 -H "..node.."| tail -n1| awk '{ print $5 }'")
else
return {status="error", error={msg="No lime-proto-bmx6 or lime-proto-babeld found", code="1"}}
end Probably, it can work without this. And also, I'm thinking that maybe ipv6 has to be supported? |
just remove the check then, let's keep the IPv6 stuff for another PR |
I don't know why the tests are failing, locally don't, and I can't re run the jobs (could be a permission problems for my user?) |
The tests are failing because someone have to build a new Docker image for unit testing on OpenWrt 22.03. |
It expose the get_loss function for IPv4 ips. It will be used to do diagnosis of where the last internet path is broken, from the frontend on the new landing page. It just return ping loose to specific ip, example: