什么是PING -W参数的最大值?
在我的计算机中,我运行命令ping 127.0.0.1 -c3 -w 5
,结果还可以。代码>,结果不正确,结果是
ping:不良持续时间。
因此,我想知道ping -w参数的最大值是什么?
In my computer,I run the command ping 127.0.0.1 -c3 -W 5
and the result is ok.But when I run the command ping 127.0.0.1 -c3 -W 5000
,the result is not ok,the result is
ping: bad linger time.
.So I wonder What's the max value for Ping -W parameter?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
关于您发布的版本,我只是查找代码 on Github S20160308 。
如 427
在您的特定情况下的最大值是
int_max/1000000
。现在int_max
也可以取决于实现,但是保留默认值应为 2147483647 ,这将导致PING的答案-W最大值的最大值2.147
但是,在较新版本的ping中,此值要高得多。
因此,您可以考虑更新
iputils
Regarding your posted version i simply looked up the code on github for release s20160308.
as seen in line 427
the max value in your specific case is
INT_MAX/1000000
. NowINT_MAX
can also depending on the implementation, but keeping the defaults it should be 2147483647 which would result in the answer of ping -W maximum value of2.147
however in newer version of ping, this value is much higher.
so you might consider updating your
iputils