ping 3.4 KB

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