默认情况下,它会打开一个GTK窗口,在其中打印结果.如果我使用选项-t我可以强制它在终端中使用ncurses.
但这根本没有用.
>我无法将内容重定向到文件或管道(我可以,但有很多令人不安的东西,如ESC [?1049h来自ncurses左右).
>当我定义循环时,例如使用-r -c 1后,结果会在运行结束后立即从提示中消失.
>如果我停止程序,结果也会消失.
有没有办法使用这个程序“UNIX-way”?
我只想把结果输出到stdout,没有花哨的额外内容!
我已经在当前的debian wheezy上安装了包mtr.
$mtr --versionmtr 0.82解决方法 尝试在Debian上使用mtr-tiny软件包,让它在没有GTK或ncurses的情况下运行.
mtr-tiny is compiled without support for X and conserves disk space.
root@mail:~# apt-cache show mtr-tinyPackage: mtr-tinyPriority: optionalSection: netInstalled-Size: 120Maintainer: Robert Woodcock <rcw@debian.org>Architecture: amd64Source: mtrVersion: 0.75-2Replaces: mtrDepends: libc6 (>= 2.7-1),libncurses5 (>= 5.6+20071006-3)Conflicts: mtr,suIDmanager (<< 0.50)filename: pool/main/m/mtr/mtr-tiny_0.75-2_amd64.debSize: 40740MD5sum: 46cbf5da3e22772d34a7a696cc6648a5SHA1: 40d6427a48c0dac7b6e31e0a9592ef6381445001SHA256: 9a32f07375e09f11109cd207f8875647bd3f3b88170c071f3a13aca614182e15Description: Full screen ncurses traceroute tool mtr combines the functionality of the 'traceroute' and 'Ping' programs in a single network diagnostic tool. . As mtr starts,it investigates the network connection between the host mtr runs on and a user-specifIEd destination host. After it determines the address of each network hop between the machines,it sends a sequence ICMP ECHO requests to each one to determine the quality of the link to each machine. As it does this,it prints running statistics about each machine. . mtr-tiny is compiled without support for X and conserves disk space.Tag: interface::text-mode,network::scanner,protocol::ip,role::program,scope::utility,uitoolkit::ncurses,use::checking总结
以上是内存溢出为你收集整理的linux-networking – STDOUT上的MTR结果?全部内容,希望文章能够帮你解决linux-networking – STDOUT上的MTR结果?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)