1
traffic_shell "a CLI for Traffic Server"
7
The purpose of traffic_shell (command line interface, or CLI) is to
8
improve the usability of Traffic Server in both OEM and direct sales
9
environments. The CLI is a powerful, easy to use tool which can be
10
used to configure and monitor individual Traffic Server machines. Our
11
goal is to make configuring Traffic Server as easy as configuring
12
other network devices such as routers and switches.
14
The CLI accepts commands in a unix shell-like fashion. Commands are
15
organized in an easy to navigate hierarchy. The CLI supports basic
16
command completion, command history, and context sensitive help. This
17
format was designed to be familiar to network engineers everywhere,
18
and also to be easier to document, maintain, and add features.
24
The CLI is a standalone executable which is part of a Traffic Server
25
installation on the Linux platform. The CLI supports the following
26
operation modes. Note that a "user" can be a person, a script, or some
27
other mechanism for remote control of network devices via command line
32
Similar to unix shell, the CLI can be the login shell for
33
administrators. The user types command at a prompt, and the CLI
34
processes the command and displays the result. While in interactive
35
mode, the user can execute a file which contains a list of commands.
38
"traffic_shell -f filename" where file contains a list of CLI commands.
39
CLI runs commands and sends results to stdout.
41
The CLI interface is implemented in a combination of TCL and C++.
42
From the traffic_shell prompt, users can access the scripting
45
The shell and parsing functionality will utilize TCL. Commands
46
themselves will be written in C++. The CLI uses the traffic_manager
47
Management API to make Traffic Server configuration changes.
49
The overall CLI architecture is as follows:
51
- traffic_shell ---------------------------
53
| --------------------------------------- |
54
| Shell and parser implemented in TCL/C++ |
55
| --------------------------------------- |
57
| ----------------|------------------- |
58
| CLI commands implemented in C++ |
59
| ------------------------------------ |
61
| --------|---------- |
62
| Management API (.a) |
63
| ------------------- |
65
-------------------------------------------
71
There are two basic commands categories, "show" and "config". Show
72
commands are used to view configuration information and statistics.
73
Config commands are used to configure Traffic Server. To use the
74
config commands, you must first enter "enable mode" by using the
75
enable command, which asks for the admin password (same password as
78
At any point you can access context sensitive help by specifying "-h"
79
or "-help" after a command name. The following is a list of commands
87
show:status Proxy status
88
show:version Version information
89
show:security Security information
90
show:http HTTP protocol configuration
91
show:icp [peer] ICP protocol configuration
92
show:proxy Proxy configuration
93
show:cache [rules|storage] Cache configuration
94
show:virtual-ip Virtual-ip configuration
95
show:hostdb Host database configuration
96
show:dns-resolver DNS resolver configuration
97
show:logging Logging configuration
98
show:ssl SSL configuration
99
show:parent Parent configuration
100
show:remap Remap configuration
101
show:socks SOCKS configuration
102
show:port-tunnels Port tunnels configuration
103
show:scheduled-update Scheduled update configuration
104
show:proxy-stats Proxy statistics
105
show:http-trans-stats HTTP transaction statistics
106
show:http-stats HTTP statistics
107
show:icp-stats ICP statistics
108
show:cache-stats Cache statistics
109
show:hostdb-stats Host database statistics
110
show:dns-stats DNS statistics
111
show:logging-stats Logging statistics
112
show:alarms Show active alarms
118
config:get <variable> Display a variable value
119
config:set <variable> <value> Set variable to specified value
120
config:name <string> Set proxy name <string>
121
config:start Start proxy software
122
config:stop Stop proxy software
124
config:ssl <on | off>
125
config:ssl ports <int>
127
config:parent <on | off>
128
config:parent name <parent>
129
config:parent rules <url>
131
config:remap <url> Update remap configuration file <url>
133
config:clock date <mm/dd/yyyy>
134
config:clock time <hh:mm:ss>
135
config:clock timezone <number from list>
137
config:security <ip-allow | mgmt-allow | admin> <url-config-file>
138
config:security password
140
config:http <on | off>
141
config:http <keep-alive-timeout-in | keep-alive-timeout-out> <seconds>
142
config:http <inactive-timeout-in | inactive-timeout-out> <seconds>
143
config:http <active-timeout-in | active-timeout-out> <seconds>
144
config:http <remove-from | remove-referer> <on | off>
145
config:http <remove-user | remove-cookie> <on | off>
146
config:http <remove-header> <string>
147
config:http <insert-ip | remove-ip> <on | off>
148
config:http proxy <fwd | rev | fwd-rev>
150
config:icp mode <disabled | receive | send-receive>
151
config:icp port <int>
152
config:icp multicast <on | off>
153
config:icp query-timeout <seconds>
154
config:icp peers <url-config-file>
156
config:port-tunnels server-other-ports <port>
158
config:scheduled-update mode <on | off>
159
config:scheduled-update retry count <int> interval <int>
160
config:scheduled-update max-concurrent <int>
161
config:scheduled-update force-immediate <on | off>
162
config:scheduled-update rules <url-config-file>
164
config:socks <on | off>
165
config:socks server-ip <x.x.x.x>
166
config:socks port <int>
167
config:socks timeout <seconds>
170
config:cache <on | off>
171
config:cache <http> <on | off>
172
config:cache ignore-bypass <on | off>
173
config:cache <max-object-size | max-alternates> <int>
174
config:cache file <url-config-file>
175
config:cache freshness verify <when-expired | no-date | always | never>
176
config:cache freshness minimum <explicit | last-modified | nothing>
177
config:cache freshness no-expire-limit greater-than <sec> less-than <sec>
178
config:cache <dynamic | alternates> <on | off>
179
config:cache vary <text | images | other> <string>
180
config:cache vary cookies <none | all | non-text>
183
config:hostdb <lookup-timeout | foreground-timeout> <seconds>
184
config:hostdb <background-timeout | invalid-host-timeout> <seconds>
185
config:hostdb <re-dns-on-reload> <on | off>,
186
Configure Host Database
188
config:logging event <enabled | trans-only | error-only | disabled>
189
config:logging mgmt-directory <string>
190
config:logging <space-limit | space-headroom> <megabytes>
191
config:logging collation-status <inactive | host | send-standard |
192
send-custom | send-all>
193
config:logging collation-host <string>
194
config:logging collation secret <string> tagged <on | off> orphan-limit <int>
195
config:logging format <squid | netscape-common | netscape-ext | netscape-ext2>
196
type <ascii | binary> file <string> header <string>
197
config:logging splitting <icp | http> <on | off>
198
config:logging custom <on | off> format <traditional | xml>
199
config:logging rolling <on | off> offset <hour> interval <hours>
200
auto-delete <on | off>,
202
config:dns resolve-timeout <seconds>
203
config:dns retries <int>,
205
config:virtual-ip <on | off>
206
config:virtual-ip add <x.x.x.x> device <string> sub-intf <int>
207
config:virtual-ip delete <virtual ip number>,
209
config:network ip-address <x.x.x.x> (Linux only)
210
config:network hostname <string> (Linux only)
211
config:network netmask <x.x.x.x> (Linux only)
212
config:network domainname <string> (Linux only)
213
config:network dns-ip <x.x.x.x> (Linux only)
214
config:network defaultrouter <x.x.x.x> (Linux only)
216
config:alarms resolve-name <string>
217
config:alarms resolve-number <int>
218
config:alarms resolve-all
219
config:alarms notify <on | off>,
225
enable Enable Restricted Commands
227
disable Disable Restricted Commands
229
debug <on|off> Turn debugging print statements on/off