ping 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. .TH PING 8
  2. .SH NAME
  3. ping, gping, traceroute, hogports \- probe the Internet
  4. .SH SYNOPSIS
  5. .B ping
  6. [
  7. .B -6aflqr
  8. ] [
  9. .B -i
  10. .I interval
  11. ] [
  12. .B -n
  13. .I count
  14. ] [
  15. .B -s
  16. .I size
  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 6
  73. force the use of IPv6's ICMP,
  74. .BR icmpv6 ,
  75. instead of IPv4's ICMP.
  76. .I Ping
  77. tries to determine which version of IP to use automatically.
  78. .TP
  79. .B a
  80. adds the IP source and destination addresses to each report.
  81. .TP
  82. .B f
  83. send messages as fast as possible (flood).
  84. .TP
  85. .B i
  86. sets the time between messages
  87. to be
  88. .I interval
  89. milliseconds, default 1000 ms.
  90. .TP
  91. .B l
  92. causes only lost messages to be reported.
  93. .TP
  94. .B n
  95. requests that a total of
  96. .I count
  97. messages be sent, default 32.
  98. .TP
  99. .B q
  100. suppresses any output (i.e. be quiet).
  101. .TP
  102. .B r
  103. randomizes the delay with a minimum extra delay of 0 ms and a
  104. maximum extra delay of the selected interval.
  105. .TP
  106. .B s
  107. sets the length of the message to be
  108. .I size
  109. bytes, ICMP header included.
  110. The size cannot be smaller than 32 or
  111. larger than 8192. The default is 64.
  112. .PP
  113. .I Gping
  114. is a
  115. .I ping
  116. with a graphical display. It
  117. presents separate graphs for each destination
  118. specified.
  119. .PP
  120. The options are:
  121. .TP
  122. .B r
  123. display round trip time in seconds.
  124. This is the default.
  125. .TP
  126. .B l
  127. display percentage of lost messages.
  128. A message is considered lost if not
  129. replied to in 10 seconds. The percentage
  130. is an exponentially weighted average.
  131. .TP
  132. .B i
  133. sets the time between messages
  134. to be
  135. .I interval
  136. milliseconds, default 5000 ms.
  137. .PP
  138. Graphs can be dropped and added using
  139. the button 3 menu. Clicking button 1
  140. on a datapoint displays the value of the
  141. datapoint and the time it was recorded.
  142. .PP
  143. .I Traceroute
  144. displays the IP addresses and average round trip times to all
  145. routers between the machine it is run on and
  146. .IR dest .
  147. It does this by sending packets to
  148. .I dest
  149. with increasing times to live (TTL) in their headers.
  150. Each router that a packet expires at replies with an ICMP
  151. warning message.
  152. The options are:
  153. .TP
  154. .B d
  155. print debugging to standard error
  156. .TP
  157. .B n
  158. just print out IP numbers, don't try to
  159. look up the names of the routers.
  160. .TP
  161. .B a
  162. make
  163. .I n
  164. attempts at each TTL value (default 3).
  165. .TP
  166. .B t
  167. set the starting TTL value to
  168. .I sttl
  169. (default 1).
  170. .TP
  171. .B h
  172. print out a histogram of times from request
  173. to response at each TTL value. The histogram
  174. contains
  175. .I nbuck
  176. buckets.
  177. .PD
  178. .PP
  179. .I Hogports
  180. announces on a range of ports to keep them from other processes.
  181. For example, to keep anyone from making a vncserver visible on
  182. the network mounted at
  183. .BR /net.alt :
  184. .EX
  185. ip/hogports /net.alt/tcp!*!5900-5950
  186. .EE
  187. .SH SOURCE
  188. .B /sys/src/cmd/ip/ping.c
  189. .br
  190. .B /sys/src/cmd/ip/gping.c
  191. .br
  192. .B /sys/src/cmd/ip/traceroute.c
  193. .br
  194. .B /sys/src/cmd/ip/hogports.c
  195. .SH SEE ALSO
  196. .IR ip (3)