traffic_ctl

概要

traffic_ctl [OPTIONS] SUBCOMMAND [OPTIONS]

解説

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

traffic_ctl alarm
Display and manipulate Traffic Server alarms
traffic_ctl cluster
Stop, restart and examine the cluster
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.

オプション

--debug

Enable debugging output.

-V, --version

バージョン情報を表示して終了します。

Subcommands

traffic_ctl alarm

list

承認 ( 消去 ) されていないすべてのアラームイベントを一覧表示します。

clear

Clear (acknowledge) all current alarms.

resolve ALARM [ALARM...]

Clear (acknowledge) an alarm event. The arguments are a specific alarm number (e.g. ''1''), or an alarm string identifier (e.g. ''MGMT_ALARM_PROXY_CONFIG_ERROR'').

traffic_ctl cluster

restart [--drain] [--manager]

Shut down and immediately restart Traffic Server, node by node across the cluster. The --drain and --manager options have the same behavior as for the traffic_ctl server restart subcommand.

status

Show the current cluster status.

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.

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.

--records

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.

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.

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 the records.config documentation for a list of the configuration variables you can specify. Note that this is not a synchronous operation.

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.

traffic_ctl metric

clear [--cluster]

Reset all statistics to zero. The --cluster option applies this across all cluster nodes.

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 [--cluster] METRIC [METRIC...]

Reset the named statistics to zero. The --cluster option applies this across all cluster nodes.

traffic_ctl server

restart

Shut down and immediately restart Traffic Server

--drain

This option modifies the behavior of traffic_ctl server restart such that traffic_server is not shut down until the number of active client connections drops to the number given by the proxy.config.restart.active_client_threshold configuration variable.

--manager

The default behavior of traffic_ctl server restart is to restart traffic_server. If this option is specified, traffic_manager is also restarted.

start

Start traffic_server if it is already running.

--clear-cache

Clear the disk cache upon startup.

--clear-hostdb

Clear the DNS resolver cache upon startup.

status

プロキシーサーバーが実行中かどうかを示している現在の状態を表示します。

stop

Stop the running traffic_server process.

backtrace

Show a full stack trace of all the traffic_server threads.

traffic_ctl storage

offline DEVICE [DEVICE ...]

キャッシュストレージデバイスをオフラインとしてマークします。ストレージは storage.config 内で指定されているパスと完全に一致している パスによって特定されます。これはストレージをキャッシュから取り除き、このストレージではなく他のストレージを使うようにリクエストをリダイレクトします。これはそのストレージが故障したときとまったく同じ効果を持っています。これは traffic_server プロセスのリスタートをまたいで持続しません。

traffic_ctl plugin

msg TAG DATA

Send a message to plugins. All plugins that have hooked the TS_LIFECYCLE_MSG_HOOK will receive a callback for that hook. The TAG and DATA will be available to the plugin hook processing.

Squid フォーマットでログを取るように Traffic Server を設定するには

$ 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

参考

records.config(5), storage.config(5)