.\" Man page generated from reStructuredText. . .TH "TRAFFIC_CTL" "8" "January 24, 2017" "7.0" "Apache Traffic Server" .SH NAME traffic_ctl \- Traffic Server command line tool . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fBtraffic_ctl\fP [OPTIONS] SUBCOMMAND [OPTIONS] .SH DESCRIPTION .sp \fBtraffic_ctl\fP is used to display and manipulate configure a running Traffic Server. \fBtraffic_ctl\fP includes a number of subcommands that control different aspects of Traffic Server: .INDENT 0.0 .TP .B \fBtraffic_ctl alarm\fP Display and manipulate Traffic Server alarms .TP .B \fBtraffic_ctl cluster\fP Stop, restart and examine the cluster .TP .B \fBtraffic_ctl config\fP Manipulate and display configuration records .TP .B \fBtraffic_ctl metric\fP Manipulate performance and status metrics .TP .B \fBtraffic_ctl server\fP Stop, restart and examine the server .TP .B \fBtraffic_ctl storage\fP Manipulate cache storage .TP .B \fBtraffic_ctl plugin\fP Interact with plugins. .UNINDENT .SH OPTIONS .INDENT 0.0 .TP .B \-\-debug Enable debugging output. .UNINDENT .INDENT 0.0 .TP .B \-V, \-\-version Print version information and exit. .UNINDENT .SH SUBCOMMANDS .SS traffic_ctl alarm .INDENT 0.0 .TP .B list List all alarm events that have not been acknowledged (cleared). .UNINDENT .INDENT 0.0 .TP .B clear Clear (acknowledge) all current alarms. .UNINDENT .INDENT 0.0 .TP .B resolve ALARM [ALARM...] Clear (acknowledge) an alarm event. The arguments are a specific alarm number (e.g. \(aq\(aq1\(aq\(aq), or an alarm string identifier (e.g. \(aq\(aqMGMT_ALARM_PROXY_CONFIG_ERROR\(aq\(aq). .UNINDENT .SS traffic_ctl cluster .INDENT 0.0 .TP .B restart [\-\-drain] [\-\-manager] Shut down and immediately restart Traffic Server, node by node across the cluster. The \fI\-\-drain\fP and \fI\-\-manager\fP options have the same behavior as for the \fItraffic_ctl server restart\fP subcommand. .UNINDENT .INDENT 0.0 .TP .B status Show the current cluster status. .UNINDENT .SS traffic_ctl config .INDENT 0.0 .TP .B defaults [\-\-records] Display the default values for all configuration records. The \fI\-\-records\fP flag has the same behavior as \fI\%traffic_ctl config get \-\-records\fP\&. .UNINDENT .INDENT 0.0 .TP .B 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. .UNINDENT .INDENT 0.0 .TP .B diff [\-\-records] Display configuration records that have non\-default values. The \fI\-\-records\fP flag has the same behavior as \fI\%traffic_ctl config get \-\-records\fP\&. .UNINDENT .INDENT 0.0 .TP .B get [\-\-records] RECORD [RECORD...] Display the current value of a configuration record. .UNINDENT .INDENT 0.0 .TP .B \-\-records If this flag is provided, \fItraffic_ctl config get\fP will emit results in \fBrecords.config\fP format. .UNINDENT .INDENT 0.0 .TP .B match [\-\-records] REGEX [REGEX...] Display the current values of all configuration variables whose names match the given regular expression. The \fI\-\-records\fP flag has the same behavior as \fI\%traffic_ctl config get \-\-records\fP\&. .UNINDENT .INDENT 0.0 .TP .B reload 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. .sp The timestamp of the last reconfiguration event (in seconds since epoch) is published in the \fIproxy.node.config.reconfigure_time\fP metric. .UNINDENT .INDENT 0.0 .TP .B set RECORD VALUE Set the named configuration record to the specified value. Refer to the \fBrecords.config\fP documentation for a list of the configuration variables you can specify. Note that this is not a synchronous operation. .UNINDENT .INDENT 0.0 .TP .B status 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. .UNINDENT .SS traffic_ctl metric .INDENT 0.0 .TP .B clear [\-\-cluster] Reset all statistics to zero. The \fI\-\-cluster\fP option applies this across all cluster nodes. .UNINDENT .INDENT 0.0 .TP .B get METRIC [METRIC...] Display the current value of the specifies statistics. .UNINDENT .INDENT 0.0 .TP .B match REGEX [REGEX...] Display the current values of all statistics whose names match the given regular expression. .UNINDENT .INDENT 0.0 .TP .B zero [\-\-cluster] METRIC [METRIC...] Reset the named statistics to zero. The \fI\-\-cluster\fP option applies this across all cluster nodes. .UNINDENT .SS traffic_ctl server .INDENT 0.0 .TP .B restart Shut down and immediately restart Traffic Server .UNINDENT .INDENT 0.0 .TP .B \-\-drain This option modifies the behavior of \fItraffic_ctl server restart\fP such that \fBtraffic_server\fP is not shut down until the number of active client connections drops to the number given by the \fBproxy.config.restart.active_client_threshold\fP configuration variable. .UNINDENT .INDENT 0.0 .TP .B \-\-manager The default behavior of \fItraffic_ctl server restart\fP is to restart \fBtraffic_server\fP\&. If this option is specified, \fBtraffic_manager\fP is also restarted. .UNINDENT .INDENT 0.0 .TP .B start Start \fBtraffic_server\fP if it is already running. .UNINDENT .INDENT 0.0 .TP .B \-\-clear\-cache Clear the disk cache upon startup. .UNINDENT .INDENT 0.0 .TP .B \-\-clear\-hostdb Clear the DNS resolver cache upon startup. .UNINDENT .INDENT 0.0 .TP .B status Show the current proxy server status, indicating if we\(aqre running or not. .UNINDENT .INDENT 0.0 .TP .B stop Stop the running \fBtraffic_server\fP process. .UNINDENT .INDENT 0.0 .TP .B backtrace Show a full stack trace of all the \fBtraffic_server\fP threads. .UNINDENT .SS traffic_ctl storage .INDENT 0.0 .TP .B offline DEVICE [DEVICE ...] Mark a cache storage device as offline. The storage is identified by a \fIpath\fP which must match exactly a path specified in \fBstorage.config\fP\&. 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 \fBtraffic_server\fP process. .UNINDENT .SS traffic_ctl plugin .INDENT 0.0 .TP .B msg TAG DATA Send a message to plugins. All plugins that have hooked the \fBTS_LIFECYCLE_MSG_HOOK\fP will receive a callback for that hook. The \fITAG\fP and \fIDATA\fP will be available to the plugin hook processing. .UNINDENT .SH EXAMPLES .sp Configure Traffic Server to log in Squid format: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ traffic_ctl config set proxy.config.log.squid_log_enabled 1 $ traffic_ctl config set proxy.config.log.squid_log_is_ascii 1 $ traffic_ctl config reload .ft P .fi .UNINDENT .UNINDENT .SH SEE ALSO .sp \fIrecords.config(5)\fP, \fIstorage.config(5)\fP .SH COPYRIGHT 2015, dev@trafficserver.apache.org .\" Generated by docutils manpage writer. .