BIG-IP TMSH Manual
BIG-IP TMSH Manual
BIG-IP TMSH Manual
html
1 of 8 17/09/2021, 1:43 PM
Firefox https://clouddocs.f5.com/cli/tmsh-reference/latest/general/tmsh.html
NAME
tmsh - Traffic Management Shell - A command line interface for managing the BIG-
DESCRIPTION
You can use tmsh to configure and manage the BIG-IP system in conjunction with t
which is the browser-based BIG-IP system and network management tool.
MODULES
The structure of tmsh is hierarchical and modular. The highest level is the root
subordinate modules: auth, cli, gtm, ltm, net, sys and wom. Use the command help
the module hierarchy relative to the current module.
The gtm, ltm, net, sys, and wom modules also contain subordinate modules. All mo
contain components. To display the list of modules and components that are avail
type Tab or ? at the tmsh prompt.
To enter a module, type the name of the module at the tmsh prompt.
(tmos)# ltm
(tmos.ltm)#
You can display the components in a module using the commands list (configuratio
runtime status). The following command sequence displays the virtual server conf
system.
In the following examples, the commands list and show display information about
(tmos.ltm)# list
(tmos.ltm)# show
You can access any component in any module from any other module by specifying a
component. For example, from the ltm module, the following command displays all
on the system. The forward slash / specifies that what follows is relative to th
2 of 8 17/09/2021, 1:43 PM
Firefox https://clouddocs.f5.com/cli/tmsh-reference/latest/general/tmsh.html
The forward slash is optional if the root module is the current module. For exam
sequences display profiles.
Most components also support component mode. You can navigate to a single compon
that component. For example, from the ltm module, to navigate to the node compon
command.
(tmos.ltm)# node
(tmos.ltm.node)# list
You can also navigate to a specific object (object mode). For example, from the
object mode for a specific node, enter the command modify followed by the IP add
In object mode, you can configure property settings directly. For example, to se
10.1.1.10 to 10000, use the following command.
To exit a module enter the command exit at the tmsh prompt, as shown below.
(tmos.ltm)# exit
(tmos)#
PRODUCT PROVISIONING
You must provision a BIG-IP system module before you can use tmsh to configure t
Global Traffic Manager. The command sequence list sys provision displays the BIG
provisioned. For more information about provisioning, see the TMOS(r) Management
help sys provision.
You can save a portion of the running configuration known as the base configurat
base configuration from the stored configuration files.
To save the base configuration to the stored configuration files, use the comman
config.
To replace the running base configuration with the configuration in the stored c
command sequence: load /sys base-config.
3 of 8 17/09/2021, 1:43 PM
Firefox https://clouddocs.f5.com/cli/tmsh-reference/latest/general/tmsh.html
Additionally, you can save the entire running configuration or load all of the s
To save the entire running configuration to the stored configuration files, use
/sys config.
To replace the entire running configuration with the configuration in the stored
command sequence: load /sys config.
HELP
tmsh tmsh includes man pages for each of the commands and components that are av
access the man pages using the following command syntax: help [ [command] | [fu
For example, to access the man page for the vlan component from the root module,
help / net vlan.
You can also search the man pages for information on a specific topic. To do thi
help search [topic]. You can perform a help search from within any module in the
to find the man pages that contain a reference to VLANs, use this command sequen
To display a list of topics that are available in a module use this command sequ
module].
For example, to display the topics that are available in the current module use
the topics that are available in the net module use this command sequence: help
CONTEXT-SENSITIVE HELP
tmsh includes a context-sensitive help feature that provides help as you type co
type a question mark (?) on the command line, and tmsh returns information to as
command. Based on when you type the question mark, you get the following results
When you type a question mark immediately following any portion of a command, tm
completions for the command, but does not complete the command as the command co
When you type a space before the question mark, tmsh returns descriptive text th
components, or properties that you can configure.
When you type a question mark in the middle of a command, tmsh returns help on t
cursor.
Note: To use a question mark in a Glob or regular expression, you must escape th
quotation marks, apostrophes, or a backslash.
Additionally, you can request context-sensitive help for the last command in a s
information, see ENTERING MULTIPLE COMMANDS, following.
COMMAND COMPLETION
At any point while typing or editing a command in tmsh, you can press the Tab ke
current or next word, or displays possible completions for the current or next w
after you press the Tab key, no options exist to complete the word. If you move
command line and press the Tab key, tmsh completes what is to the left of the cu
4 of 8 17/09/2021, 1:43 PM
Firefox https://clouddocs.f5.com/cli/tmsh-reference/latest/general/tmsh.html
Command completion also reduces the amount of typing that is required to run com
key, the system automatically completes the current command-line element to as m
possible. If there is more than one possible completion the list of possible com
completion also completes configuration object identifiers.
When you enter multiple commands in this way, all of the commands are added to t
line item, regardless of whether any of the commands were successful. However, i
enter fails to parse, tmsh does not run the remaining commands you entered. tmsh
commands run; therefore, if a command fails to parse, tmsh does not audit the re
information about the command history, see COMMAND HISTORY, following.
You can also specify multiple commands in a command alias by separating the comm
example, to create an alias that displays the properties of the VLANs and VLAN g
command sequence:
create / cli alias vlans command "list / net vlan ; list / net vlan-group"
You can request context-sensitive help and utilize the command completion featur
series of commands. For example, the following command sequence displays help fo
COMMAND HISTORY
tmsh saves in the command history file each command that you enter. The command
off of the system. The next time you log on to the system, you can search for, d
tmsh commands that you entered in previous sessions. The command history persist
the BIG-IP system. For more information about the command history feature, see h
The following examples show how to use the command history feature.
To display the commands in the history list, enter either the command sequence s
point (!). tmsh displays a list of commands each preceded by a numeric ID.
To run a command from the history list, enter an exclamation point followed by t
FILTERING OUTPUT
You can filter the output generated by the commands list (configuration settings
runtime status) using the UNIX grep utility. You must type the character | befor
can use multiple filters chained together. For a list of supported grep options,
Shell (tmsh) Reference Guide.
5 of 8 17/09/2021, 1:43 PM
Firefox https://clouddocs.f5.com/cli/tmsh-reference/latest/general/tmsh.html
The following examples show how to use the grep utility in tmsh.
KEYBOARD BINDINGS
tmsh supports vi, emacs and default keyboard bindings. You can set the binding u
For more information, see help cli preference. For a detailed description of the
Traffic Management Shell (tmsh) Reference Guide.
Note that all mappings provide command-line editing and the capability to search
For glob and regular expression syntax rules, see help glob and help regex. Note
and regular expression special characters using a back slash.
The following examples show how to use glob and regular expressions in tmsh.
Uses a glob expression to display the configuration of all nodes that begin with
Uses a regular expression to display the configuration of all nodes that begin w
that a regular expression must begin with an @ symbol. This identifies to tmsh t
treated as a regular expression and not a glob or standard object identifier. Th
regular expression.
PREFERENCES
You can customize the behavior of tmsh. For more information, see help cli prefe
FILES
tmsh manages several files in a user's home directory.
STATISTICS
You can use tmsh to display statistics, including historical performance statist
in which the statistics display, as well as reset the statistics for some of the
if statistics are available for a component, see the man page for the specific c
The following examples show how to display and reset statistics for the net inte
module.
6 of 8 17/09/2021, 1:43 PM
Firefox https://clouddocs.f5.com/cli/tmsh-reference/latest/general/tmsh.html
The following examples show how to display and reset statistics for the net inte
module.
show interface
reset-stats interface
AUTOMATING TMSH
You can use tmsh to build TCL scripts to automate management of the BIG-IP. See
-c Run the specified command. A command that contains multiple arguments must
may be specified after -c
-h Displays options you can use when accessing tmsh from the system shell.
Note that when you run a tmsh script, the shell generates a debug log file
tmsh.out.[script name].
-q Prevents tmsh from responding to user actions with questions. This option i
interactive shell scripts from the system shell.
-r
This option allows the user to run TMSH the specified version. This is used
compatibility for older TMSH syntax only. The version must be specified in
example 11.5.0
SEE ALSO
Detailed information on the following topics is available through the help comma
script, glob, help, regex, and sys provision.
7 of 8 17/09/2021, 1:43 PM
Firefox https://clouddocs.f5.com/cli/tmsh-reference/latest/general/tmsh.html
For complete information about tmsh, see the Traffic Management Shell (tmsh) Ref
available on the AskF5(sm) Knowledge Base ().
COPYRIGHT
No part of this program may be reproduced or transmitted in any form or by any m
mechanical, including photocopying, recording, or information storage and retrie
other than the purchaser's personal use, without the express written permission
F5 Networks and BIG-IP (c) Copyright 2008-2010, 2012. All rights reserved.
BIG-IP 2014-02-18
8 of 8 17/09/2021, 1:43 PM