1
0

ping 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. .TH PING 8
  2. .SH NAME
  3. ping, gping, traceroute, hogports \- probe the Internet
  4. .SH SYNOPSIS
  5. .B ping
  6. [
  7. .B -alq
  8. ] [
  9. .B -i
  10. .I interval
  11. ] [
  12. .B -s
  13. .I size
  14. ] [
  15. .B -n
  16. .I count
  17. ]
  18. .I destination
  19. .PP
  20. .B gping
  21. [
  22. .B -r
  23. ] [
  24. .B -l
  25. ] [
  26. .B -i
  27. .I interval
  28. ]
  29. .I destination
  30. [
  31. .I destination
  32. \&... ]
  33. .PP
  34. .B traceroute
  35. [
  36. .B -dn
  37. ][
  38. .B -a
  39. .I n
  40. ][
  41. .B -h
  42. .I nbuck
  43. ][
  44. .B -t
  45. .I sttl
  46. ]
  47. .I dest
  48. .PP
  49. .B hogports
  50. .B [\fImtpt\fP/]\fIproto\fP!\fIaddress\fP!\fIstartport\fP[-\fIendport\fP]
  51. .SH DESCRIPTION
  52. .I Ping
  53. sends ICMP echo request messages to a system.
  54. It can be used to determine the network delay
  55. and whether or not the destination is up.
  56. By default, a line is written to standard output for
  57. each request.
  58. If a reply is received the line contains the request
  59. id (starting at 0 and incrementing), the round trip time
  60. for this request, the average round trip time, and the time
  61. to live in the reply packet. If no reply is received the line
  62. contains the word "lost", the request id, and the average round
  63. trip time.
  64. .PP
  65. If a reply is received for each request,
  66. .I ping
  67. returns successfully. Otherwise it returns an error status of
  68. "lost messages".
  69. .PP
  70. The options are:
  71. .TP
  72. .B a
  73. adds the IP source and destination addresses to each report.
  74. .TP
  75. .B i
  76. sets the time between messages
  77. to be
  78. .I interval
  79. milliseconds, default 1000 ms.
  80. .TP
  81. .B l
  82. causes only lost messages to be reported.
  83. .TP
  84. .B n
  85. requests that a total of
  86. .I count
  87. messages be sent, default 32.
  88. .TP
  89. .B q
  90. suppresses any output (i.e. be quiet).
  91. .TP
  92. .B s
  93. sets the length of the message to be
  94. .I size
  95. bytes, ICMP header included.
  96. The size cannot be smaller than 32 or
  97. larger than 8192. The default is
  98. 64.
  99. .PP
  100. .I Gping
  101. is a
  102. .I ping
  103. with a graphical display. It
  104. presents separate graphs for each destination
  105. specified.
  106. .PP
  107. The options are:
  108. .TP
  109. .B r
  110. display round trip time in seconds.
  111. This is the default.
  112. .TP
  113. .B l
  114. display percentage of lost messages.
  115. A message is considered lost if not
  116. replied to in 10 seconds. The percentage
  117. is an exponentially weighted average.
  118. .TP
  119. .B i
  120. sets the time between messages
  121. to be
  122. .I interval
  123. milliseconds, default 5000 ms.
  124. .PP
  125. Graphs can be dropped and added using
  126. the button 3 menu. Clicking button 1
  127. on a datapoint displays the value of the
  128. datapoint and the time it was recorded.
  129. .PP
  130. .I Traceroute
  131. displays the IP addresses and average round trip times to all
  132. routers between the machine it is run on and
  133. .IR dest .
  134. It does this by sending packets to
  135. .I dest
  136. with increasing times to live (TTL) in their headers.
  137. Each router that a packet expires at replies with an ICMP
  138. warning message.
  139. The options are:
  140. .TP
  141. .B d
  142. print debugging to standard error
  143. .TP
  144. .B n
  145. just print out IP numbers, don't try to
  146. look up the names of the routers.
  147. .TP
  148. .B a
  149. make
  150. .I n
  151. attempts at each TTL value (default 3).
  152. .TP
  153. .B t
  154. set the starting TTL value to
  155. .I sttl
  156. (default 1).
  157. .TP
  158. .B h
  159. print out a histogram of times from request
  160. to response at each TTL value. The histogram
  161. contains
  162. .I nbuck
  163. buckets.
  164. .PD
  165. .PP
  166. .I Hogports
  167. announces on a range of ports to keep them from other processes.
  168. For example, to keep anyone from making a vncserver visible on
  169. the network mounted at
  170. .BR /net.alt :
  171. .EX
  172. ip/hogports /net.alt/tcp!*!5900-5950
  173. .EE
  174. .SH SOURCE
  175. .B /sys/src/cmd/ip/ping.c
  176. .br
  177. .B /sys/src/cmd/ip/gping.c
  178. .br
  179. .B /sys/src/cmd/ip/traceroute.c
  180. .br
  181. .B /sys/src/cmd/ip/hogports.c