cmuffin

Crystal Muffin - multicast and TCP network tester

Crystal Muffin


cmuffin

This is a Crystal lang port of python-based Muffin tool

  • Cmuffin is a multicast and TCP network health checker.

  • Cmuffin is a connectivity testing tool designed primarily for Market Data testing but can be used for any multicast or TCP testing

  • This project was created because I need a quick way to test basic market data connectivity health on my physical servers by defining easy to read YAML connectivity files.

  • Cmuffin can show you basic connectivity status for your multicast groups and TCP IPs and ports, as well as few other features described below.

Here is a sample scan of my market data feeds:

Cmuffin outputs connection health to a multicast or TCP IP and port, for multicast it shows latency on receiving packets in nanoseconds, microseconds, milliseconds, and seconds.

to run Cmuffin in Debug mode and see the data thats coming in, pass the --debug flag

Installation

download the compiled bin from Releases page (or build a bin yourself - see Building section of readme)

add a new directory for cmuffin config

mkdir -p /etc/cmuffin

add the cmuffin config file based on "config.yaml" in this repo

the Config file has several parameters

# multicast timeout in seconds
mc_timeout: 30

# tcp timeout in seconds
tcp_timeout: 5

hosts:
  hostA:
    ifaces: ["192.168.10.20"]  # list of local interfaces on host that will join to multicast groups
    feeds: ["/path/to/feed/directory"]  # list of directories that contain feed files in YAML format (see sample_feed.yaml in repo)

building

development

crystal build src/cmuffin.cr -o bin/cmuffin --error-trace

for production

crystal build src/cmuffin.cr -o bin/cmuffin --release 

Usage

check a multicast Group and Port connection directly (-d) without a feed file (interface parameter is required for cmuffin to bind on!)

cmuffin -d 233.200.150.10:15000 -i 192.168.38.24

check a feed file on a single local interface (will read in a feed file for mcast and tcp information and spawn off connection tests asynchronously)

cmuffin -i 192.168.38.24 -f cme_options.yaml

pass multiple interfaces

cmuffin -i 192.168.38.24,192.168.38.35 -f cme_options.yaml

check only TCP connectivity (will show a default route and interface over which TCP packets are being sent)

cmuffin -t tcp -f cme_options.yaml 

check only Multicast connectivity

cmuffin -t mcast -f cme_options.yaml (here, if interface is not passed directly via -i,  your interfaces will come from cmuffin config.yaml file)

if a feed file is not provided with -f flag, Cmuffin will check Cmuffin config file for "feeds" key which points to a directory containing all the feed files you want to test

hosts:
  serverA:
    ifaces: ["192.168.20.1", "192.168.20.2"]  # local ifaces that multicast will bind on and join MC groups
    feeds: 
      - /path/to/feed/directory1
      - /path/to/feed/directory2

show all available cmuffin options

cmuffin --help

show version

cmuffin --version

Development

TODO: Write development instructions here

Contributing

  1. Fork it (https://github.com/perfecto25/cmuffin/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

cmuffin

Owner
Statistic
  • 3
  • 0
  • 0
  • 0
  • 0
  • 11 days ago
  • December 22, 2025
License

MIT License

Links
Synced at

Thu, 01 Jan 2026 04:23:30 GMT

Languages