TRAFFIC_CTL(8)
π TRAFFIC_CTL(8) β the Apache Traffic Server command line tool π
okay bestie, sit down, hydrate, and let me tell you about traffic_ctl, the little CLI that runs the whole Traffic Server situation. this is the page from the Apache Traffic Server manual, section 8, and we're doing the whole thing, no skips. π
β¨ NAME β¨
traffic_ctl β Traffic Server command line tool
β¨ SYNOPSIS β¨
traffic_ctl [OPTIONS] SUBCOMMAND [OPTIONS]
β¨ DESCRIPTION β¨
traffic_ctl is your remote control for a running Traffic Server β you use it to display stuff and to manipulate configure it (yes, that's what the page says, we don't edit, we just vibe). it ships with a whole lil' family of subcommands, and each one handles a different slice of the server:
traffic_ctl alarmβ Display and manipulate Traffic Server alarmstraffic_ctl configβ Manipulate and display configuration recordstraffic_ctl metricβ Manipulate performance and status metricstraffic_ctl serverβ Stop, restart and examine the servertraffic_ctl storageβ Manipulate cache storagetraffic_ctl pluginβ Interact with plugins.traffic_ctl hostβ Manipulate host status. parents for now but will be expanded to origins.
IMPORTANT bestie!! To usetraffic_ctl,traffic_managerneeds to be running. no manager, no vibes. π
β¨ OPTIONS β¨
--debugβ Enable debugging output. it's giving verbose, and we respect that.-V,--versionβ Print version information and exit. short and iconic.
β¨ SUBCOMMANDS β¨
π
traffic_ctl alarm
listβ List all alarm events that have not been acknowledged (cleared).clearβ Clear (acknowledge) all current alarms.resolve ALARM [ALARM...]β Clear (acknowledge) an alarm event. the args are either a specific alarm number (like'1') or an alarm string identifier (like'MGMT_ALARM_PROXY_CONFIG_ERROR').
π
traffic_ctl config
defaults [--records]β Display the default values for all configuration records. the--recordsflag has the same behavior astraffic_ctl config get --records.describe RECORD [RECORD...]β Display all the known information about a configuration record. that's the current and default values, the data type, the record class, and the syntax checking expression. the full dossier, fr fr.diff [--records]β Display configuration records that have non-default values. the--recordsflag has the same behavior astraffic_ctl config get --records.get [--records] RECORD [RECORD...]β Display the current value of a configuration record.--recordsβ If this flag is provided,traffic_ctl config getwill emit results inrecords.configformat.match [--records] REGEX [REGEX...]β Display the current values of all configuration variables whose names match the given regular expression. the--recordsflag has the same behavior astraffic_ctl config get --records.reloadβ Initiate a Traffic Server configuration reload. use this 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 RECORD VALUEβ Set the named configuration record to the specified value. Refer to therecords.configdocumentation for a list of the configuration variables you can specify. Note that this is not a synchronous operation β so don't @ me expecting instant results. π«Άstatusβ Display detailed status about the Traffic Server configuration system. that includes version information, whether the internal configuration store is current, and whether any daemon processes should be restarted.
π
traffic_ctl metric
get METRIC [METRIC...]β Display the current value of the specifies statistics.match REGEX [REGEX...]β Display the current values of all statistics whose names match the given regular expression.zero METRIC [METRIC...]β Reset the named statistics to zero. back to 0, clean slate, main character energy β¨
π
traffic_ctl server
restartβ Shut down and immediately restart Traffic Server--drainβ This option modifies the behavior oftraffic_ctl server restartsuch thattraffic_serveris not shut down until the number of active client connections drops to the number given by theproxy.config.restart.active_client_thresholdconfiguration variable.--managerβ The default behavior oftraffic_ctl server restartis to restarttraffic_server. If this option is specified,traffic_manageris also restarted.startβ Starttraffic_serverif it is already running. π yes that's literally what it says, we are simply reporting the lore.--clear-cacheβ Clear the disk cache upon startup.--clear-hostdbβ Clear the DNS resolver cache upon startup.statusβ Show the current proxy server status, indicating if we're running or not.stopβ Stop the runningtraffic_serverprocess.backtraceβ Show a full stack trace of all thetraffic_serverthreads.
π
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 instorage.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 thetraffic_serverprocess. β οΈ
π
traffic_ctl plugin
msg TAG DATAβ Send a message to plugins. All plugins that have hooked theTSLifecycleHookID::TS_LIFECYCLE_MSG_HOOKwill 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. The DATA is optional and may not be available to consume; if not available then size will be0and the data will beNULL. Any extra passed value beside the tag and the optional data will be ignored. CheckTSPluginMsgfor more info.
π
traffic_ctl host
A stat to track status is created for each host. The name is the host fqdn with a prefix of "proxy.process.host_status". The value of the stat is a string which is the serialized representation of the status. This contains the overall status and the status for each reason. The stats may be viewed using the traffic_ctl metric command or through the stats_over_http endpoint.
--time countβ Set the duration of an operation to count seconds. A value of0means no duration, the condition persists until explicitly changed. The default is0if an operation requires a time and none is provided by this option.--reason active | local | manualβ Sets the reason for the operation.activeβ Set the active health check reason.localβ Set the local health check reason.manualβ 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.
NOTE: Theup/downstatus values are independent, and a host is consider available if and only if all of the statuses are"up".
status HOSTNAME [HOSTNAME ...]β Get the current status of the specified hosts with respect to their use as targets for parent selection. This returns the same information as the per host stat.down HOSTNAME [HOSTNAME ...]β Marks the listed hosts as down so that they will not be chosen as a next hop parent. If--timeis 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.
up HOSTNAME [HOSTNAME ...]β Marks the listed hosts as up so that they will be available for use as a next hop parent. Use--reasonto 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.
β¨ EXAMPLES β¨
Mark down a host with traffic_ctl and view the associated host stats:
$ traffic_ctl host down cdn-cache-02.foo.com --reason manual
$ /opt/trafficserver/bin/traffic_ctl metric match host_status
proxy.process.host_status.cdn-cache-01.foo.com HOST_STATUS_DOWN,ACTIVE:UP:0:0,LOCAL:UP:0:0,MANUAL:DOWN:1556896844:0,SELF_DETECT:UP:0
proxy.process.host_status.cdn-cache-02.foo.com HOST_STATUS_UP,ACTIVE:UP:0:0,LOCAL:UP:0:0,MANUAL:UP:0:0,SELF_DETECT:UP:0
proxy.process.host_status.cdn-cache-origin-01.foo.com HOST_STATUS_UP,ACTIVE:UP:0:0,LOCAL:UP:0:0,MANUAL:UP:0:0,SELF_DETECT:UP:0
In the example above, 'cdn-cache-01.foo.com' 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 cdn-cache-01.foo.com --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
β¨ SEE ALSO β¨
records.config(5), storage.config(5)
β¨ COPYRIGHT β¨
2026, dev@trafficserver.apache.org
and that's the whole page, bestie, you ate it. π this was version 9.2, dated Feb 12, 2026 β go forth and traffic_ctl responsibly, mwah ππ¦β¨
π¦ where this page comes from
- ubuntu noble: trafficserver 9.2.3+ds-1+deb12u1ubuntu0.1 Β· Apache-2.0
- ubuntu questing: trafficserver 9.2.5+ds-1ubuntu2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms