Open-source project
traviscross/mtr avatar
traviscross/mtr

mtr installs a setuid helper, and its git build starts with bootstrap

Official repository for mtr, a network diagnostic tool

3,385 stars379 forksCGPL-2.0

At a glance

What is it?
The official mtr repository, a C network diagnostic tool that merges traceroute and ping into one per-hop view. It ships a setuid-root helper for raw sockets, has no generated configure script in git, no mailing list, and a README that ends on an empty heading.
Who is it for?
mtr suits an engineer who needs a live per-hop view rather than a single path trace, and who is willing to install a setuid-root helper on the machine doing the measuring. It does not suit a host where setuid binaries are prohibited, and on Windows it is not a native build at all but a distro package inside WSL.
Can I use it commercially?
Yes, with conditions. GPL-2.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 13 days ago.
What is it written in?
Mainly C, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • traviscross/mtr3,385 ★ · +38
Star history
Repository2026-09-242026-11-15
traviscross/mtr3.3k3.4k

38 Stars in the last 52 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Apparent loss at a hop does not mean loss at that hop

The most important sentence in this README is a disclaimer about its own output. Intermediate routers may be configured to never send ICMP responses, or may rate-limit them, so apparent loss at an intermediate hop does not always mean that forwarded traffic is being lost at that point. That is the whole measurement problem in one sentence, and it is why a single mtr column cannot be read as a health signal. The mechanism explains it. mtr sends probes to the destination with successively larger time-to-live values and uses the responses from intervening routers to discover and measure the path, which means every router in the path has to answer for the hop to register at all. A router configured to stay quiet, or to answer only sometimes under load, looks identical to a router dropping your traffic. Since mtr keeps probing while it runs, the useful reading of a lossy intermediate hop is that its replies are being throttled, not necessarily that the path is broken there.

mtr-packet is installed setuid-root for raw socket access

One of mtr's two binaries needs elevated privilege and the README says so plainly: mtr-packet must be suid-root because it requires access to raw IP sockets, and it points to a file named SECURITY for the security information. That is a setuid-root binary installed onto a machine, which is a materially different thing from installing a network tool, and it is worth reading the SECURITY file before an unattended install. The two-binary split is visible in the tree as a `packet/` directory sitting alongside the `ui/` directory, and the size of that surface is the reason the rest of this file spends so much time on build details. The privilege requirement is also why the smoke test is run as root: after compiling you are told to test with `sudo ./mtr <host>`, filling in a hostname or address where the placeholder sits. Then, if the run looks right, `make install` puts both binaries in place. Nothing in the flow separates the privileged component from the rest at install time.

A setuid binary's linker refuses untrusted paths, and that shapes the build

The longest and most technical paragraph in the README is about Solaris, and it is about security rather than portability. On Solaris, and possibly other systems, the gtk library may be installed in a directory the dynamic linker refuses to consult when a binary is setuid. The reported workaround is adding `-Wl,-rpath=/usr/lib` to the command line, which the reporter says works with the GNU linker, and which the maintainer corrects as not quite true for the Sun linker either. The alternative offered is moving the gtk libraries to `/usr/lib` rather than leaving them in `/usr/local/lib`, on the stated grounds that the linker treats `/usr/local/lib` as untrusted and `/usr/lib` as trusted, and that if you trust the libraries enough to want them in a setuid program there is a case for putting them in the trusted directory. That is a precise description of how setuid hardening works at the loader level, and it is why the GTK question has build flags attached to it at all.

Git has no configure script, which is why bootstrap.sh comes first

There are two build paths and the file is careful to separate them. From a tarball the build is `./configure && make`, with an explicit warning that this refers to the tarballs published at bitwizard.nl and not the tarballs GitHub can produce. From the git repository you need `./bootstrap.sh && ./configure && make`. The tree explains the difference: it holds `configure.ac` and `Makefile.am` but no generated `configure` and no plain `Makefile`, so a bare `make` in a fresh checkout has nothing to run. The README also explains why the convenience target is gone. There used to be a Makefile in the distribution that ran `./configure` for you and then re-ran make with the generated Makefile, but that suffered bitrot and did not work well with git. That paragraph is a small archaeology of a build simplification being removed for cause. Two more build notes: a non-GTK build is now just `./configure --without-gtk`, and if that does not work the fallback is `make WITHOUT_X11=YES`. On Solaris you need GNU make, so `gmake` rather than `make`. On macOS the file expects no special steps.

Patches must be unified diffs, and must leave out the generated configure

The contribution rules are unusually specific and one of them explains the build. Patches can arrive as a pull request against the GitHub repository or by email, and the instruction is to use unified diffs. Then comes the part worth quoting for its specificity: the diff is usually sort of messy, so please check that it is clean and does not contain too much of your local stuff, with the example given being that the maintainer does not want or need the `configure` script that your automake made for you. In other words, a generated file must not be committed in a patch, which is the same fact that makes `./bootstrap.sh` the first step of a git build. Support has one channel. Bug reports and feature requests go to the GitHub bug tracking system, and there is no mailing list, because the file records that there used to be one, that it got nothing but spam, and that it died when the server was upgraded. Anything expecting a list to post to will not find one. The project is hosted on GitHub now, with the web page still at bitwizard.nl.

Windows means WSL and someone else's package

The Windows story is two separate stories, and the file is clear about which one it recommends. Using mtr on Windows requires the Windows Subsystem for Linux, with a link to Microsoft's WSL installation page and an instruction to install it with the Ubuntu distribution as the default. After that initial process the whole thing is one command: `sudo apt-get -y install mtr`. So the supported path on Windows installs a distribution's build of mtr inside a Linux environment, and it is not a native Windows build at all. The second story is offered as the traditional method for anyone who prefers it, and it goes through Cygwin: obtain Cygwin, then re-run its setup program, `setup-x86.exe` or `setup-x86_64.exe` for a 64-bit install, with the arguments `--package-manager --wait --packages automake,pkg-config,make,gcc-core,libncurses-devel,libjansson-devel`. That package list is the clearest statement of the build's real dependencies, a JSON library and ncurses among them. From there it builds as on Unix, with `./bootstrap.sh && ./configure && make`, followed by `make install`.

The README ends on a heading with nothing under it

The last line of the file is the word REW as a section heading, with no content following it. It reads like a rewrite section that was started and abandoned, and it is the kind of leftover that survives because it costs nothing and nobody opens the repository expecting to find one. Two other details in the same file are worth pairing with it. The repository root holds two licence texts, `COPYING` and `BSDCOPYING`, while the README points only at `COPYING` for the GPL version 2 terms, so whatever the BSD text covers is not explained in the README. And the root carries a mixture of configuration that has nothing to do with a C program: `.flake8`, which is Python linting, and `.dir-locals.el`, which is Emacs. There is also a `fuzz/` directory, so the project has fuzzing infrastructure, and a `.tarball-version` file, a `FORMATS` file, a `NEWS` file, a `TODO` file and a `SECURITY` file. The README is not the whole documentation, and it is not always the current documentation either.

Editorial conclusion

mtr suits an engineer who needs a live per-hop view rather than a single path trace, and who is willing to install a setuid-root helper on the machine doing the measuring. It does not suit a host where setuid binaries are prohibited, and on Windows it is not a native build at all but a distro package inside WSL. Before running it, read the SECURITY file the README points at, and read the caveat about intermediate routers rate-limiting or suppressing ICMP before you read anything into a loss column. The last push to this repository was on 2026-09-24 and it has published no releases, so take the version from a tarball rather than from a tag.

Frequently asked questions

What does MTR do?

It combines the functionality of traceroute and ping in a single network diagnostic tool. Starting up, it investigates the connection between the host it runs on and a destination you specify, sending probes with successively larger time-to-live values and using responses from intervening routers to discover and measure the path, printing running statistics for each hop as it goes.

What is the difference between My Traceroute (MTR) and traceroute?

The difference the README claims is the merge of the two tools: mtr combines traceroute and ping into one program, so path discovery and continuous per-hop statistics come from a single run rather than a single path trace. The README does not present a feature-by-feature comparison.

What is an MTR report?

The README never uses the term report. What it describes is that mtr prints running statistics for each hop while it probes, together with a warning that intermediate routers may be configured never to send ICMP responses or to rate-limit them, so apparent loss at an intermediate hop does not always mean forwarded traffic is being lost there.

Official sources

  1. Issues
  2. License: GPL-2.0
  3. Project website
  4. README
  5. traviscross/mtr on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/traviscross-mtr.svg)](https://hysenlabs.com/projects/traviscross-mtr)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/traviscross-mtr.svg)](https://hysenlabs.com/projects/traviscross-mtr)

Was this useful?