ping 3.4 KB

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