ping 3.7 KB

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