traffic_ctl now uses a JSONRPC endpoint instead of traffic_manager. traffic_manager is not required. To build this version of traffic_ctl --enable-jsonrpc-tc should be passed when configure the build.


traffic_ctl is used to display,manipulate and configure a running Traffic Server. traffic_ctl includes a number of subcommands that control different aspects of Traffic Server:

traffic_ctl config

Manipulate and display configuration records

traffic_ctl metric

Manipulate performance and status metrics

traffic_ctl server

Stop, restart and examine the server

traffic_ctl storage

Manipulate cache storage

traffic_ctl plugin

Interact with plugins.

traffic_ctl host

Manipulate host status. parents for now but will be expanded to origins.

traffic_ctl rpc

Interact directly with the JSONRPC 2.0 server in Traffic Server



Enable debugging output.

-V, --version

Print version information and exit.

-f, --format

Specify the output print style.




Will honour the old traffic_ctl output messages. This is the default format type.


<if available> will print a different output, a prettier output. This depends on the implementation, it’s not required to always implement a pretty output


It will show the response message formatted to JSON. This is ideal if you want to redirect the stdout to a different source. It will only stream the json response, no other messages.


Show the JSONRPC request and response + the default output.

In case of a record request(config) --records overrides this flag.

Default: legacy


$ traffic_ctl config get variable --format rpc
--> {request}
<-- {response}
variable 1234
$ traffic_ctl config get variable --format json

There will be no print out beside the json response. This is ideal to redirect to a file.


Option available only for records request.


Path to the runroot file.


traffic_ctl alarm


Option not available in the JSONRPC 2.0 version.

traffic_ctl config

defaults [--records]


Display the default values for all configuration records. The --records flag has the same behavior as traffic_ctl config get --records.

describe RECORD [RECORD...]


Display all the known information about a configuration record. This includes the current and default values, the data type, the record class and syntax checking expression.

Error output available if --format pretty is specified.

diff [--records]


Display configuration records that have non-default values. The --records flag has the same behavior as traffic_ctl config get --records.

get [--records] RECORD [RECORD...]


Display the current value of a configuration record.

Error output available if --format pretty is specified.


If this flag is provided, traffic_ctl config get will emit results in records.config format.

match [--records] REGEX [REGEX...]


Display the current values of all configuration variables whose names match the given regular expression. The --records flag has the same behavior as traffic_ctl config get --records.



Initiate a Traffic Server configuration reload. Use this command to update the running configuration after any configuration file modification. If no configuration files have been modified since the previous configuration load, this command is a no-op.

The timestamp of the last reconfiguration event (in seconds since epoch) is published in the proxy.node.config.reconfigure_time metric.



Set the named configuration record to the specified value. Refer to the records.config documentation for a list of the configuration variables you can specify. Note that this is not a synchronous operation.



Display detailed status about the Traffic Server configuration system. This includes version information, whether the internal configuration store is current and whether any daemon processes should be restarted.



Display information about the registered files in Traffic Server. This includes the full file path, config record name, parent config (if any) if needs root access and if the file is required in Traffic Server.

traffic_ctl metric



Display the current value of the specified statistics.

Error output available if --format pretty is specified.

match REGEX [REGEX...]


Display the current values of all statistics whose names match the given regular expression.



Reset the named statistics to zero.

describe RECORD [RECORD...]


Display all the known information about a metric record.

Error output available if --format pretty is specified.

traffic_ctl server




Drop the number of active client connections.


Option not yet available

traffic_ctl storage

offline PATH [PATH ...]


Mark a cache storage device as offline. The storage is identified by PATH which must match exactly a path specified in storage.config. This removes the storage from the cache and redirects requests that would have used this storage to other storage. This has exactly the same effect as a disk failure for that storage. This does not persist across restarts of the traffic_server process.

status PATH [PATH ...]


Show the storage configuration status.

traffic_ctl plugin



Send a message to plugins. All plugins that have hooked the TSLifecycleHookID::TS_LIFECYCLE_MSG_HOOK will receive a callback for that hook. The TAG and DATA will be available to the plugin hook processing. It is expected that plugins will use TAG to select relevant messages and determine the format of the DATA.

traffic_ctl host

A record to track status is created for each host. The name is the host fqdn. The value of the record when retrieved, is a serialized string representation of the status. This contains the overall status and the status for each reason. The records may be viewed using the traffic_ctl host status command.

--time count

Set the duration of an operation to count seconds. A value of 0 means no duration, the condition persists until explicitly changed. The default is 0 if an operation requires a time and none is provided by this option.

--reason active | local | manual

Sets the reason for the operation.


Set the active health check reason.


Set the local health check reason.


Set the administrative reason. This is the default reason if a reason is needed and not provided by this option.

Internally the reason can be self_detect if proxy.config.http.parent_proxy.self_detect is set to the value 2 (the default). This is used to prevent parent selection from creating a loop by selecting itself as the upstream by marking this reason as “down” in that case.


The up / down status values are independent, and a host is consider available if and only if all of the statuses are “up”.



Get the current status of the specified hosts with respect to their use as targets for parent selection. If the HOSTNAME arguments are omitted, all host records available are returned.



Marks the listed hosts as down so that they will not be chosen as a next hop parent. If --time is included the host is marked down for the specified number of seconds after which the host will automatically be marked up. A host is not marked up until all reason codes are cleared by marking up the host for the specified reason code.

Supports --time, --reason.



Marks the listed hosts as up so that they will be available for use as a next hop parent. Use --reason to mark the host reason code. The ‘self_detect’ is an internal reason code used by parent selection to mark down a parent when it is identified as itself and

Supports --reason.

traffic_ctl rpc

A mechanism to interact directly with the Traffic Server JSONRPC 2.0 endpoint. This means that this is not tied to any particular API but rather to the rpc endpoint, so you can directly send requests and receive responses from the server.


Reads a file or a set of files from the disc, use the content of the files as message(s) to the JSONRPC 2.0 endpoint. All jsonrpc messages will be validated before sending them. If the file contains invalid json|yaml format the message will not be send, in case of a set of files, if a particular file is not a proper json/yaml format then that particular file will be skipped.


traffic_ctl rpc file jsonrpc_cmd1.json jsonrpc_cmd2.yaml


Request the entire admin api. This will retrieve all the registered methods and notifications on the server side.


$ traffic_ctl rpc get-api
- admin_host_set_status
- admin_server_stop_drain
- admin_server_start_drain
- admin_clear_metrics_records
- admin_clear_all_metrics_records
- admin_plugin_send_basic_msg
- admin_lookup_records
- admin_config_set_records
- admin_storage_get_device_status
- admin_storage_set_device_offline
- admin_config_reload
- show_registered_handlers
- some_registered_notification_handler

Input mode, traffic_ctl will provide a control input from a stream buffer. Once the content is written the terminal traffic_ctl will wait for the user to press Control-D to send the request to the rpc endpoint. This feature allows you to directly interact with the jsonrpc endpoint and test your API easily and without the need to know the low level implementation details of the transport layer. traffic_ctl will validate the input format, not the message content. The message content will be validated by the server. See example input_example_2.

--raw, -r

No json/yaml parse validation will take place, the input content will be directly send to the server.


$ traffic_ctl rpc input
>> Ctrl-D to fire the request
<pressed Ctrl-D>

<-- Server's response.

Example 2:

You can see a valid json {} but an invalid JSONRPC 2.0 message. In this case the server is responding.

$ traffic_ctl rpc input
>> Ctrl-D to fire the request
<pressed Ctrl-D>
< -- Server's response
      "message":"Invalid Request"

Invoke a remote call by using the method name as parameter. This could be a handy option if you are developing a new handler or you just don’t want to expose the method in traffic_ctl, for instance when implementing a custom handler inside a proprietary plugin.

--params, -p

Parameters to be passed in the request, YAML or JSON format are accepted. If JSON is passed as param it should not be mixed with YAML. It’s important that you follow the JSONRPC 2.0 Protocol specs. If the passed param does not follows the specs the server will reject the request.

Example 1:

Call a jsonrpc method with no parameter.

$ traffic_ctl rpc invoke some_jsonrpc_handler
--> {"id": "0dbab88d-b78f-4ebf-8aa3-f100031711a5", "jsonrpc": "2.0", "method": "some_jsonrpc_handler"}
<-- { response }

Example 2:

Call a jsonrpc method with parameters.

$ traffic_ctl rpc invoke reload_files_from_folder --params 'filenames: ["file1", "file2"]' 'folder: "/path/to/folder"'
--> {"id": "9ac68652-5133-4d5f-8260-421baca4c67f", "jsonrpc": "2.0", "method": "reload_files_from_folder", "params": {"filenames": ["file1", "file2"], "folder": "/path/to/folder"}}
<-- { response }


Mark down a host with traffic_ctl and view the associated host stats:

.. code-block:: bash

   # traffic_ctl host down --reason manual


In the example above, ‘’ is unavailable, HOST_STATUS_DOWN and was marked down for the manual reason, MANUAL:DOWN:1556896844:0, at the time indicated by the UNIX time stamp 1556896844. To make the host available, one would have to clear the manual reason using:

# traffic_ctl host up --reason manual

Configure Traffic Server to insert Via header in the response to the client

# traffic_ctl config set proxy.config.http.insert_response_via_str 1
# traffic_ctl config reload


Runroot needs to be configured in order to let traffic_ctl know where to find the socket. This is done by default and there is no change you have to do to interact with it, but make sure that you are not overriding the dump_runroot=False when creating the ATS Process, otherwise the runroot.yaml will not be set.

See also

records.config(5), storage.config(5), Configuration, JSONRPC 2.0 Protocol