- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- ping timeout value.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2008 03:49 PM
тАО06-09-2008 03:49 PM
I would like to understand -W option on Fedora Linux. What is the default value of -W. I was going through the man page.
-W timeout
Time to wait for a response, in seconds. The option affects only timeout in absense of any responses,
otherwise ping waits for two RTTs.
What is the values of two RTTS? If I ues -W 1000 would it mean it will wait for 1000 seconds for the response packet before declaring timeout.
Regards
Padma
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2008 10:25 PM
тАО06-09-2008 10:25 PM
SolutionAccording to ping source code:
if (nreceived) {
/* approx. 2*tmax, in seconds (2 RTT) */
expire = tmax / (512*1024);
if (expire == 0)
expire = 1;
}
2 RTTs would be 2*tmax, being tmax the maximum RTT obtained from a ping sequence. You can see it at the end of a ping as:
rtt min/avg/max/mdev = 0.040/0.042/0.044/0.002 ms, pipe 2
That would mean that the -W allows you to
specify how much time you will wait for a
response, in case that you have, for example,
missing packets.
After some echo reply, you will have your RTTs calculated,
if a response is not received, and you don't
specify -W, it will wait 2*tmax, otherwise,
will wait -W
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2008 09:19 AM
тАО06-10-2008 09:19 AM
Re: ping timeout value.
Thanks for the response. What is the value of tmax
In my case it is returning
rtt min/avg/max/mdev = 0.398/0.656/0.915/0.259 ms
How do i interpret this. I wanted to call ping from a c program and with -W. what would be reasonable default value in case user doesn't specify it.
Thanks
Padma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2008 12:24 PM
тАО06-10-2008 12:24 PM
Re: ping timeout value.
>>> In my case it is returning
>>> rtt min/avg/max/mdev = 0.398/0.656/0.915/0.259 ms
As you can see above, the max would be the third value, first is min, then average, then max.
>>> I wanted to call ping from a c program and with -W. what would be reasonable default value in case user doesn't specify it.
This depends of what you are trying to do, probably, you don't even need to specify a timeout value, but a count. Or probably, would be better if you use -w (lower).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2008 01:02 PM
тАО06-10-2008 01:02 PM
Re: ping timeout value.
Ok I got you, so if min is 0.398 mili seconds then I believe we use -W
right?
Padma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2008 02:58 PM
тАО06-10-2008 02:58 PM
Re: ping timeout value.
That would be correct, but remember that -W use max, not min. But, why do you want to specify this value?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2008 03:38 PM
тАО06-10-2008 03:38 PM
Re: ping timeout value.
Thanks for your response. We have a enterprise specific MIB file which I can do ping through snmp, now a user can specify this value, if this value is not specified then I have to start with some default value.
Regards
Padma