troglobit / mcjoin Goto Github PK
View Code? Open in Web Editor NEWSimple multicast testing application
Home Page: https://github.com/troglobit/mcjoin/releases
License: ISC License
Simple multicast testing application
Home Page: https://github.com/troglobit/mcjoin/releases
License: ISC License
As of v2.8 the spinner and plotter for inactive groups updates despite no activity.
Regression due to integration if pev framework.
Hi there,
Would be possible to make mcjoin an official Debian package?
Looks like it is already possible to create a package, what would be needed to make it available over apt?
Would it be possible to add a way to have mcjoin use a differnet listen port per group when joining multiple groups ? Maybe use the stnadard syntax group:port or group+num:port
Thanks for a great tool.
Hey @troglobit,
first I want to say that mcjoin is a great program for testing multicast.
Especially with the new interface it looks really sleek.
We are using the program to test our network setup with multiple clients joining in different locations.
For these tests we run the program 'headless' and we use the debug flag to save the stdout of each of the clients.
However the following line:
Line 265 in 7d17bc7
^H
e.g.
Count 0, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 850, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 850, freq: 100
group seq 0 vs seq 850
Count 1, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 850, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 850, freq: 100
group seq 851 vs seq 850
Count 2, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 851, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 851, freq: 100
Count 3, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 851, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 851, freq: 100
group seq 852 vs seq 851
Count 4, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 852, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 852, freq: 100
Count 5, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 852, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 852, freq: 100
group seq 853 vs seq 852
Count 6, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 853, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 853, freq: 100
Count 7, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 853, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 853, freq: 100
group seq 854 vs seq 853
Count 8, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 854, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 854, freq: 100
Count 9, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 854, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 854, freq: 100
group seq 855 vs seq 854
Count 10, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 855, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 855, freq: 100
Count 11, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 855, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 855, freq: 100
group seq 856 vs seq 855
Count 12, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 856, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 856, freq: 100
Count 13, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 856, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 856, freq: 100
group seq 857 vs seq 856
Count 14, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 857, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 857, freq: 100
Count 15, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 857, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 857, freq: 100
group seq 858 vs seq 857
Count 16, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 858, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 858, freq: 100
Count 17, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 858, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 858, freq: 100
group seq 859 vs seq 858
Count 18, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 859, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 859, freq: 100
Count 19, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 859, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 859, freq: 100
group seq 860 vs seq 859
..�Count 20, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 860, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 860, freq: 100
Count 21, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 860, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 860, freq: 100
group seq 861 vs seq 860
o�Count 22, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 861, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 861, freq: 100
Count 23, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 861, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 861, freq: 100
group seq 862 vs seq 861
O�Count 24, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 862, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 862, freq: 100
Count 25, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 862, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 862, freq: 100
group seq 863 vs seq 862
O�Count 26, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 863, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 863, freq: 100
Count 27, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 863, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 863, freq: 100
group seq 864 vs seq 863
o�Count 28, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 864, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 864, freq: 100
Count 29, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 864, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 864, freq: 100
group seq 865 vs seq 864
.�Count 30, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 865, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 865, freq: 100
Count 31, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 865, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 865, freq: 100
group seq 866 vs seq 865
..�Count 32, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 866, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 866, freq: 100
It happens from around count 20 upwards.
Compiled without that line gives us the consistent output we use.
p.s.:
Would you consider adding a 'timeout' flag that stops the program after x seconds?
Because we are testing link failures and in these cases the numbers of counts don't get hit in which case the program never quits.
Hi Nilsson,
Many thanks for your sharing, that's a great util for mcast testing!
After doing fork the branch, I found -c parameter doesn't work on my local setup, I changed the code and move a size_t total = count * group_num to the top of loop() function as below commit.
Thanks!
Xiangyu
I'd like to use mcjoin in my automated tests, and as such wanted to ask whether the following enhancements are possible?
sysctl
, the question is can it be done through the application?I'm opening this as one ticket as to not flood you with many new ticket suddenly :) If accepted, I can open separate tickets, and even try to contribute some of the code changes.
mcjoin -s -d
results in 100 cpu usage. A quick ptrace shows mainly:
pselect6(5, [0 4], NULL, NULL, NULL, NULL) = 1 (in [0])
read(0, "", 1) = 0
Hi,
I need to know if I could do a monitoring of IGMP/MLD messages (joins/leaves to groups) using the mcjoin
tool. Or if I can do this with another tool. My objective is to start/stop some scripts based on the group state.
Thank you.
Groups are cut off when the argument exceeds 49 characters:
mcjoin fd6f:7b5e:3918:9728:d8fa:2afd:d864:e944,ff3e::f2ce:7765
results in joining group ff3e::f2c
instead of ff3e::f2ce:7765
The issue is caused at the following line:
Line 825 in 3d33bc2
buf size has to be at least: 2 addresses, 3 delimiters, 2 brackets, 5 port digits and 1 zero terminator to support mcjoin source,[group0]:port+num
suggested change:
char buf[2 * INET_ADDRSTR_LEN + 11];
Hi,
I'm trying to run the mcjoin on RHEL 7.4 in GNS3 and from the RHEL, I run tcpdump and can see the udp packet from the sender. However the mcjoin program shows 0 packets. Is there anything I missed?
Sender: mcjoin -s -t 100 -p 50500
Receiver: mcjoin -p 50500
It's useful in container environments to have mcjoin for testing. I've created a PR #2 to build mcjoin in docker and package it in an image based on debian:stretch
. This could be published to https://hub.docker.com/u/troglobit with DockerHub automated builds.
I have been looking for and testing tools for testing multicast for years and this is simply the very best I have come across. Keep up the good work,
Especially I really like the newer animated view.
I would like to suggest making it possible to view packet and byte throughput numbers (not just counter) for each joined group. Looks like some throughput information is already calculated to control the speed of the "spinner".
Maybe add an option to control sampling interval and scale of the byte throughput numbers.
When running two instances of mcjoin the receiver sometimes doesn't print feedback for each packet it receives from the sender mcjoin. Unclear atm. why and for what use-cases this happens. Should be fixed before v2.7.
Receiving multiple groups could also be illustrated better, but might need some other type of output (ncurses?)
We could do quite a bit of statistical analysis, but at least increment a counter every time we don't receive the next expected sequence number (counter).
Like this, for example:
root@n2:/usr/src/mcjoin# ./src/mcjoin -j 225.1.2.4 225.4.3.2
joined group 225.1.2.4 on eth0 ...
joined group 225.4.3.2 on eth0 ...
..................^C
Group 225.1.2.4 received 54 packets, gaps: 0
Group 225.4.3.2 received 54 packets, gaps: 30
Received total: 108 packets
Have you successfully received the multicast stream on docker? Is there anything to do to allow it? I'm running on EVE-NG.
I have Ubuntu 20.04 with disabled Ipv6 and no Ipv6 address on interfaces. In that cast sender just can't send ipv4 packets with error like: No interface enp2s0, or no IPv6 address yet...
My simple workaround was just comment these:
Lines 254 to 255 in 0e287ee
Lines 260 to 261 in 0e287ee
Line 268 in 0e287ee
Hi
When I run mcjoin -s in a container it reports: No interface (eth0), or no IPv6 address yet, rc 0: No error information
Do I need to give special rights to the container?
Reproduction:
mcjoin -s -l debug
Found default intefaces eth0
NOFILE: current 1048576 max 1048576
NOFILE: set new current 2058 max 1048576
Found eth0 addr 172.17.0.2
Valid iface eth0, ifindex 118, addr 172.17.0.2
Sending on iface eth0 addr 172.17.0.2 ifindex 118
No interface (eth0), or no IPv6 address yet, rc 0: No error information
No interface (eth0), or no IPv6 address yet, rc 0: Interrupted system call
No interface (eth0), or no IPv6 address yet, rc 0: Interrupted system call
No interface (eth0), or no IPv6 address yet, rc 0: Interrupted system call
...
I've tried it on an Ubuntu 18.04 host and a Fedora 30 host.
Thanks
It seems like mcjoin only supports SSM in include mode.
It would be great if mcjoin could also be used to test the more complex feature of MLDv2 to join a (group, filter_mode, source-list). Like what setsourcefilter() provides: https://www.rfc-editor.org/rfc/rfc3678#section-5.2.1.
Currently it seems like I can't use mcjoin to join a specific group, excluding specific sources.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.