linux-networking – STDOUT上的MTR结果?

linux-networking – STDOUT上的MTR结果?,第1张

概述我正在尝试 mtr(我的traceroute)用于教育目的.然而,我无法管理它直接将结果打印到stdout是非常令人不安的. 默认情况下,它会打开一个GTK窗口,在其中打印结果.如果我使用选项-t我可以强制它在终端中使用ncurses. 但这根本没有用. >我无法将内容重定向到文件或管道(我可以,但有很多令人不安的东西,如ESC [?1049h来自ncurses左右). >当我定义循环时,例如使用 我正在尝试 @L_403_0@(我的traceroute)用于教育目的.然而,我无法管理它直接将结果打印到stdout是非常令人不安的.
默认情况下,它会打开一个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 <[email protected]>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结果?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/yw/1040555.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存