Hide Forgot
Description of problem: The mtr tool has multiple output options available. Aside from the normal "interactive" mode, there is also a report mode available that will run for a certain number of cycles and then quit and output the results to the screen. There is also an option for wide report mode (in both the man page and --help output), but this seems to be ignored and runs the same as interactive mode, updating the screen after each cycle. At the end of the output, the screen is cleared and output is unavailable to review. Version-Release number of selected component (if applicable): sh-4.2$ rpm -q mtr mtr-0.80-3.fc15.i686 sh-4.2$ mtr --version mtr 0.80 sh-4.2$ How reproducible: Every time. Steps to Reproduce: 1. run mtr with -w (or --report-wide) to not truncate hostnames and -c to specify a number of cycles 2. look at output on screen during and after run completes Actual results: The output from mtr displays incrementally for each cycle and is cleared off the screen and unavailable when you are returned to a prompt. Expected results: The output from the run should be visible on the screen (for parsing, cutting and pasting, etc) when you are returned to a prompt and the screen should not display results (and re-draw results) after each cycle. Additional info: When run in report mode normally, there is no output displayed on the screen until the run finishes and the summary prints. It seems that wide mode should behave almost identically and just have a wider field for hostname. As it currently stands, the switch appears to be ignored and the mtr runs the same as when the switch isn't supplied...this makes redirecting to a file to capture output kind of worthless (because of all the control characters), not to mention the output doesn't remain on the screen afterwards to parse.
Looking into this a bit more, I think the problem is that the DisplayMode isn't set properly when the wide report mode switch is passed. I tested the following patch out: sh-4.2$ cat test.patch diff -up ./mtr-0.80/mtr.c.ORIG ./mtr-0.80/mtr.c --- a/mtr.c 2011-05-10 12:20:51.014296029 -0400 +++ b/mtr.c 2011-05-10 12:21:16.826438824 -0400 @@ -172,6 +172,7 @@ void parse_arg (int argc, char **argv) break; case 'w': reportwide = 1; + DisplayMode = DisplayReport; break; case 't': DisplayMode = DisplayCurses; sh-4.2$ in order to set DisplayMode properly when wide report mode is triggered as well. This appears to make things behave much more sanely. The package builds properly, and the output looks the way I expect it should. Any chance we can get this included/passed upstream, or do I need to file this upstream myself?
Created attachment 498098 [details] patch to correct the issue
Meh, screw it. I finally bit the bullet and created a Launchpad account, so I filed this upstream as well. https://bugs.launchpad.net/mtr/+bug/780647
mtr-0.81-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/mtr-0.81-1.fc16
mtr-0.81-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/mtr-0.81-1.fc15
Package mtr-0.81-1.fc15: * should fix your issue, * was pushed to the Fedora 15 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing mtr-0.81-1.fc15' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2011-15240 then log in and leave karma (feedback).
mtr-0.81-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
mtr-0.81-1.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.