You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.. Licensed to the Apache Software Foundation (ASF) under one
2
-
or more contributor license agreements. See the NOTICE file
3
-
distributed with this work for additional information
4
-
regarding copyright ownership. The ASF licenses this file
5
-
to you under the Apache License, Version 2.0 (the
6
-
"License"); you may not use this file except in compliance
7
-
with the License. You may obtain a copy of the License at
1
+
.. Licensed to the Apache Software Foundation (ASF) under one or more contributor license
2
+
agreements. See the NOTICE file distributed with this work for additional information regarding
3
+
copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
4
+
(the "License"); you may not use this file except in compliance with the License. You may obtain
5
+
a copy of the License at
8
6
9
7
http://www.apache.org/licenses/LICENSE-2.0
10
8
11
-
Unless required by applicable law or agreed to in writing,
12
-
software distributed under the License is distributed on an
13
-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
-
KIND, either express or implied. See the License for the
15
-
specific language governing permissions and limitations
16
-
under the License.
9
+
Unless required by applicable law or agreed to in writing, software distributed under the License
10
+
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11
+
or implied. See the License for the specific language governing permissions and limitations
12
+
under the License.
17
13
18
14
.. include:: ../../common.defs
19
15
@@ -37,19 +33,19 @@ a running Traffic Server. :program:`traffic_ctl` includes a number
37
33
of subcommands that control different aspects of Traffic Server:
38
34
39
35
:program:`traffic_ctl alarm`
40
-
Display and manipulate Traffic Server alarms
36
+
Display and manipulate Traffic Server alarms
41
37
:program:`traffic_ctl config`
42
-
Manipulate and display configuration records
38
+
Manipulate and display configuration records
43
39
:program:`traffic_ctl metric`
44
-
Manipulate performance and status metrics
40
+
Manipulate performance and status metrics
45
41
:program:`traffic_ctl server`
46
-
Stop, restart and examine the server
42
+
Stop, restart and examine the server
47
43
:program:`traffic_ctl storage`
48
-
Manipulate cache storage
44
+
Manipulate cache storage
49
45
:program:`traffic_ctl plugin`
50
-
Interact with plugins.
46
+
Interact with plugins.
51
47
:program:`traffic_ctl host`
52
-
Manipulate host status. parents for now but will be expanded to origins.
48
+
Manipulate host status. parents for now but will be expanded to origins.
53
49
54
50
To use :program:`traffic_ctl`, :ref:`traffic_manager` needs to be running.
55
51
@@ -59,11 +55,11 @@ Options
59
55
.. program:: traffic_ctl
60
56
.. option:: --debug
61
57
62
-
Enable debugging output.
58
+
Enable debugging output.
63
59
64
60
.. option:: -V, --version
65
61
66
-
Print version information and exit.
62
+
Print version information and exit.
67
63
68
64
Subcommands
69
65
===========
@@ -92,69 +88,62 @@ traffic_ctl config
92
88
.. program:: traffic_ctl config
93
89
.. option:: defaults[--records]
94
90
95
-
Display the default values for all configuration records. The
96
-
*--records* flag has the same behavior as :option:`traffic_ctl
97
-
config get --records`.
91
+
Display the default values for all configuration records. The --records* flag has the same
92
+
behavior as :option:`traffic_ctl config get --records`.
98
93
99
94
.. program:: traffic_ctl config
100
95
.. option:: describeRECORD[RECORD...]
101
96
102
-
Display all the known information about a configuration record.
103
-
This includes the current and default values, the data type,
104
-
the record class and syntax checking expression.
97
+
Display all the known information about a configuration record. This includes the current and
98
+
default values, the data type, the record class and syntax checking expression.
105
99
106
100
.. program:: traffic_ctl config
107
101
.. option:: diff[--records]
108
102
109
-
Display configuration records that have non-default values. The
110
-
*--records* flag has the same behavior as :option:`traffic_ctl
111
-
config get --records`.
103
+
Display configuration records that have non-default values. The --records* flag has the same
104
+
behavior as :option:`traffic_ctl config get --records`.
112
105
113
106
.. program:: traffic_ctl config
114
107
.. option:: get[--records]RECORD[RECORD...]
115
108
116
-
Display the current value of a configuration record.
109
+
Display the current value of a configuration record.
117
110
118
111
.. program:: traffic_ctl config get
119
112
.. option:: --records
120
113
121
-
If this flag is provided, :option:`traffic_ctl config get` will emit
122
-
results in :file:`records.config` format.
114
+
If this flag is provided, :option:`traffic_ctl config get` will emit results in
115
+
:file:`records.config` format.
123
116
124
117
.. program:: traffic_ctl config
125
118
.. option:: match[--records]REGEX[REGEX...]
126
119
127
-
Display the current values of all configuration variables whose
128
-
names match the given regular expression. The *--records* flag
129
-
has the same behavior as :option:`traffic_ctl config get --records`.
120
+
Display the current values of all configuration variables whose names match the given regular
121
+
expression. The *--records* flag has the same behavior as :option:`traffic_ctl config get
122
+
--records`.
130
123
131
124
.. program:: traffic_ctl config
132
125
.. option:: reload
133
126
134
-
Initiate a Traffic Server configuration reload. Use this command
135
-
to update the running configuration after any configuration
136
-
file modification. If no configuration files have been modified
137
-
since the previous configuration load, this command is a no-op.
127
+
Initiate a Traffic Server configuration reload. Use this command to update the running
128
+
configuration after any configuration file modification. If no configuration files have been
129
+
modified since the previous configuration load, this command is a no-op.
138
130
139
-
The timestamp of the last reconfiguration event (in seconds
140
-
since epoch) is published in the `proxy.node.config.reconfigure_time`
141
-
metric.
131
+
The timestamp of the last reconfiguration event (in seconds since epoch) is published in the
132
+
`proxy.node.config.reconfigure_time` metric.
142
133
143
134
.. program:: traffic_ctl config
144
135
.. option:: setRECORDVALUE
145
136
146
-
Set the named configuration record to the specified value.
147
-
Refer to the :file:`records.config` documentation for a list
148
-
of the configuration variables you can specify. Note that this
149
-
is not a synchronous operation.
137
+
Set the named configuration record to the specified value. Refer to the :file:`records.config`
138
+
documentation for a list of the configuration variables you can specify. Note that this is not a
139
+
synchronous operation.
150
140
151
141
.. program:: traffic_ctl config
152
142
.. option:: status
153
143
154
-
Display detailed status about the Traffic Server configuration
155
-
system. This includes version information, whether the internal
156
-
configuration store is current and whether any daemon processes
157
-
should be restarted.
144
+
Display detailed status about the Traffic Server configuration system. This includes version
145
+
information, whether the internal configuration store is current and whether any daemon processes
146
+
should be restarted.
158
147
159
148
.. _traffic-ctl-metric:
160
149
@@ -163,40 +152,39 @@ traffic_ctl metric
163
152
.. program:: traffic_ctl metric
164
153
.. option:: getMETRIC[METRIC...]
165
154
166
-
Display the current value of the specifies statistics.
155
+
Display the current value of the specifies statistics.
167
156
168
157
.. program:: traffic_ctl metric
169
158
.. option:: matchREGEX[REGEX...]
170
159
171
-
Display the current values of all statistics whose names match
172
-
the given regular expression.
160
+
Display the current values of all statistics whose names match
161
+
the given regular expression.
173
162
174
163
.. program:: traffic_ctl metric
175
164
.. option:: zeroMETRIC[METRIC...]
176
165
177
-
Reset the named statistics to zero.
166
+
Reset the named statistics to zero.
178
167
179
168
traffic_ctl server
180
169
------------------
181
170
.. program:: traffic_ctl server
182
171
.. option:: restart
183
172
184
-
Shut down and immediately restart Traffic Server
173
+
Shut down and immediately restart Traffic Server
185
174
186
175
.. program:: traffic_ctl server restart
187
176
.. option:: --drain
188
177
189
-
This option modifies the behavior of :option:`traffic_ctl server restart`
190
-
such that :program:`traffic_server` is not shut down until the
191
-
number of active client connections drops to the number given
192
-
by the :ts:cv:`proxy.config.restart.active_client_threshold`
193
-
configuration variable.
178
+
This option modifies the behavior of :option:`traffic_ctl server restart` such that
179
+
:program:`traffic_server` is not shut down until the number of active client connections drops to
180
+
the number given by the :ts:cv:`proxy.config.restart.active_client_threshold` configuration
181
+
variable.
194
182
195
183
.. option:: --manager
196
184
197
-
The default behavior of :option:`traffic_ctl server restart` is to restart
198
-
:program:`traffic_server`. If this option is specified,
199
-
:program:`traffic_manager` is also restarted.
185
+
The default behavior of :option:`traffic_ctl server restart` is to restart
186
+
:program:`traffic_server`. If this option is specified,:program:`traffic_manager` is also
187
+
restarted.
200
188
201
189
.. program:: traffic_ctl server
202
190
.. option:: start
@@ -225,91 +213,116 @@ traffic_ctl server
225
213
.. program:: traffic_ctl server
226
214
.. option:: backtrace
227
215
228
-
Show a full stack trace of all the :program:`traffic_server` threads.
216
+
Show a full stack trace of all the :program:`traffic_server` threads.
229
217
230
218
traffic_ctl storage
231
219
-------------------
232
220
.. program:: traffic_ctl storage
233
221
.. option:: offlinePATH[PATH...]
234
222
235
-
Mark a cache storage device as offline. The storage is identified
236
-
by :arg:`PATH` which must match exactly a path specified in
237
-
:file:`storage.config`. This removes the storage from the cache
238
-
and redirects requests that would have used this storage to other
239
-
storage. This has exactly the same effect as a disk failure for
240
-
that storage. This does not persist across restarts of the
223
+
Mark a cache storage device as offline. The storage is identified by :arg:`PATH` which must match
224
+
exactly a path specified in :file:`storage.config`. This removes the storage from the cache and
225
+
redirects requests that would have used this storage to other storage. This has exactly the same
226
+
effect as a disk failure for that storage. This does not persist across restarts of the
241
227
:program:`traffic_server` process.
242
228
243
229
traffic_ctl plugin
244
230
-------------------
245
231
.. program:: traffic_ctl plugin
246
232
.. option:: msgTAGDATA
247
233
248
-
Send a message to plugins. All plugins that have hooked the :cpp:enumerator:`TSLifecycleHookID::TS_LIFECYCLE_MSG_HOOK`
249
-
will receive a callback for that hook. The :arg:`TAG` and :arg:`DATA` will be available to the
250
-
plugin hook processing. It is expected that plugins will use :arg:`TAG` to select relevant messages
251
-
and determine the format of the :arg:`DATA`.
234
+
Send a message to plugins. All plugins that have hooked the
235
+
:cpp:enumerator:`TSLifecycleHookID::TS_LIFECYCLE_MSG_HOOK` will receive a callback for that hook.
236
+
The :arg:`TAG` and :arg:`DATA` will be available to the plugin hook processing. It is expected
237
+
that plugins will use :arg:`TAG` to select relevant messages and determine the format of the
238
+
:arg:`DATA`.
252
239
253
240
traffic_ctl host
254
241
----------------
255
242
.. program:: traffic_ctl host
243
+
244
+
A stat to track status is created for each host. The name is the host fqdn with a prefix of
245
+
"proxy.process.host_status". The value of the stat is a string which is the serialized
246
+
representation of the status. This contains the overall status and the status for each reason. The
247
+
stats may be viewed using the :program:`traffic_ctl metric` command or through the `stats_over_http`
248
+
endpoint.
249
+
250
+
.. option:: --timecount
251
+
252
+
Set the duration of an operation to ``count`` seconds. A value of ``0`` means no duration, the
253
+
condition persists until explicitly changed. The default is ``0`` if an operation requires a time
254
+
and none is provided by this option.
255
+
256
+
.. option:: --reasonactive|local|manual
257
+
258
+
Sets the reason for the operation.
259
+
260
+
``active``
261
+
Set the active health check reason.
262
+
263
+
``local``
264
+
Set the local health check reason.
265
+
266
+
``manual``
267
+
Set the administrative reason. This is the default reason if a reason is needed and not
268
+
provided by this option.
269
+
270
+
Internally the reason can be ``self_detect`` if
271
+
:ts:cv:`proxy.config.http.parent_proxy.self_detect` is set to the value 2 (the default). This is
272
+
used to prevent parent selection from creating a loop by selecting itself as the upstream by
273
+
marking this reason as "down" in that case.
274
+
275
+
.. note::
276
+
277
+
The up / down status values are independent, and a host is consider available if and only if
278
+
all of the statuses are "up".
279
+
256
280
.. option:: statusHOSTNAME[HOSTNAME...]
257
281
258
-
Get the current status of the hosts used in parent.config as a next hop in a multi-tiered cache hierarchy. The value 0 or 1 is returned indicating that the host is marked as down '0' or marked as up '1'. If a host is marked as down, it will not be used as the next hop parent, another host marked as up will be chosen.
282
+
Get the current status of the specified hosts with respect to their use as targets for parent
283
+
selection. This returns the same information as the per host stat.
0 commit comments