traffic_shell "a CLI for Traffic Server" ========== Motivation ========== The purpose of traffic_shell (command line interface, or CLI) is to improve the usability of Traffic Server in both OEM and direct sales environments. The CLI is a powerful, easy to use tool which can be used to configure and monitor individual Traffic Server machines. Our goal is to make configuring Traffic Server as easy as configuring other network devices such as routers and switches. The CLI accepts commands in a unix shell-like fashion. Commands are organized in an easy to navigate hierarchy. The CLI supports basic command completion, command history, and context sensitive help. This format was designed to be familiar to network engineers everywhere, and also to be easier to document, maintain, and add features. ============ Architecture ============ The CLI is a standalone executable which is part of a Traffic Server installation on the Linux platform. The CLI supports the following operation modes. Note that a "user" can be a person, a script, or some other mechanism for remote control of network devices via command line interface. - Interactive mode: "traffic_shell" Similar to unix shell, the CLI can be the login shell for administrators. The user types command at a prompt, and the CLI processes the command and displays the result. While in interactive mode, the user can execute a file which contains a list of commands. -- Execute file mode: "traffic_shell -f filename" where file contains a list of CLI commands. CLI runs commands and sends results to stdout. The CLI interface is implemented in a combination of TCL and C++. From the traffic_shell prompt, users can access the scripting capabilities of TCL. The shell and parsing functionality will utilize TCL. Commands themselves will be written in C++. The CLI uses the traffic_manager Management API to make Traffic Server configuration changes. The overall CLI architecture is as follows: - traffic_shell --------------------------- | | | --------------------------------------- | | Shell and parser implemented in TCL/C++ | | --------------------------------------- | | ^ | | ----------------|------------------- | | CLI commands implemented in C++ | | ------------------------------------ | | ^ | | --------|---------- | | Management API (.a) | | ------------------- | | | ------------------------------------------- ================= Quick Start Guide ================= There are two basic commands categories, "show" and "config". Show commands are used to view configuration information and statistics. Config commands are used to configure Traffic Server. To use the config commands, you must first enter "enable mode" by using the enable command, which asks for the admin password (same password as WebUI). At any point you can access context sensitive help by specifying "-h" or "-help" after a command name. The following is a list of commands and options: ------------- Show Commands ------------- show Show command show:status Proxy status show:version Version information show:security Security information show:http HTTP protocol configuration show:icp [peer] ICP protocol configuration show:proxy Proxy configuration show:cache [rules|storage] Cache configuration show:virtual-ip Virtual-ip configuration show:hostdb Host database configuration show:dns-resolver DNS resolver configuration show:logging Logging configuration show:ssl SSL configuration show:parent Parent configuration show:remap Remap configuration show:socks SOCKS configuration show:port-tunnels Port tunnels configuration show:scheduled-update Scheduled update configuration show:proxy-stats Proxy statistics show:http-trans-stats HTTP transaction statistics show:http-stats HTTP statistics show:icp-stats ICP statistics show:cache-stats Cache statistics show:hostdb-stats Host database statistics show:dns-stats DNS statistics show:logging-stats Logging statistics show:alarms Show active alarms --------------- Config commands --------------- config:get Display a variable value config:set Set variable to specified value config:name Set proxy name config:start Start proxy software config:stop Stop proxy software config:ssl config:ssl ports config:parent config:parent name config:parent rules config:remap Update remap configuration file config:clock date config:clock time config:clock timezone config:security config:security password config:http config:http config:http config:http config:http config:http config:http config:http config:http proxy config:icp mode config:icp port config:icp multicast config:icp query-timeout config:icp peers config:port-tunnels server-other-ports config:scheduled-update mode config:scheduled-update retry count interval config:scheduled-update max-concurrent config:scheduled-update force-immediate config:scheduled-update rules config:socks config:socks server-ip config:socks port config:socks timeout config:cache config:cache config:cache ignore-bypass config:cache config:cache file config:cache freshness verify config:cache freshness minimum config:cache freshness no-expire-limit greater-than less-than config:cache config:cache vary config:cache vary cookies config:hostdb config:hostdb config:hostdb , Configure Host Database config:logging event config:logging mgmt-directory config:logging config:logging collation-status config:logging collation-host config:logging collation secret tagged orphan-limit config:logging format type file header config:logging splitting config:logging custom format config:logging rolling offset interval auto-delete , config:dns resolve-timeout config:dns retries , config:virtual-ip config:virtual-ip add device sub-intf config:virtual-ip delete , config:network ip-address (Linux only) config:network hostname (Linux only) config:network netmask (Linux only) config:network domainname (Linux only) config:network dns-ip (Linux only) config:network defaultrouter (Linux only) config:alarms resolve-name config:alarms resolve-number config:alarms resolve-all config:alarms notify , ---------------- Utility commands ---------------- enable Enable Restricted Commands disable Disable Restricted Commands debug Turn debugging print statements on/off