MTR is a network diagnostic utility.
Use the following procedure to install and use MTR on MacOS.
1. Install the brew package manager if it is not already installed:
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
2. Install the mtr utililty with brew:
brew install mtr
3. Run the mtr command according to your specific needs. Here is an example of a command to check port 80:
sudo mtr --tcp --port 80 --report --report-cycles 10 exampledomain.tld
sudo mtr --tcp --port 2087 --report --report-cycles 10 exampledomain.tld
You can learn how to use mtr and interpret the reports that it provides at the following resource: