Useful CLI commands F5
CLI commands
tmsh on F5 is the CLI tool to get and set all config of the F5. You can get the same configuration options like in the F5 UI.
Use "tmsh" to start an interactive shell or use "tmsh show ..." directly to get an output of the command
The tmsh and tmctl utilities include commands for troubleshooting device trust and device group operations.
Useful CLI command line troubleshooting tools
Show Commands
Command | Description |
---|---|
tmsh show sys license | The output displays licensing information for the BIG-IP system, including a list of active modules. |
tmsh show sys license | grep "Service Check Date" | Use the tmsh command to see the license check date. |
tmsh run cm sniff-updates | Displays the commit ID updates that occur over the configuration management communications channel. |
tmsh run cm watch-devicegroup-device | Displays information about the devices in the device group to which the local device belongs. |
tmsh run cm watch-sys-device | Displays information about the local device. |
tmsh run cm watch-trafficgroup-device | Displays information about the traffic groups associated with devices in a device group. |
tmsh sys db configsync.timesyncthreshold | Displays the time threshold for the time difference between devices in the trust domain. If the time difference between devices exceeds the configured threshold value, the BIG-IP system logs an error. |
tmsh show cm device | Displays the time difference, in seconds, between the local device and each of the other devices in the trust domain. |
tmsh show cm traffic-group | Displays status for all traffic groups on the local device, including the next-active device, the previously-active device, and the reason that an active traffic group is active on its current device. This information is also available with the tmsh cm traffic-group all-properties command. |
tmsh show cm sync-status | Displays the current network connection status, either connected or disconnected. |
tmsh show sys ha-mirror | Displays the current status of mirrored connections. |
tmsh show cm failover-status | In addition to other information, displays log messages when:
|
tmctl sod_tg_conn_stat | Displays SOD messaging statistics for each type of message sent and received. |
tmctl sod_tg_msg_stat | Displays the outgoing packets from the SOD daemon to the other devices in the device group. |
tmsh list net interface media-active vendor vendor-partnum serial module-description | Show installed SFP modules with their serials. |
tmsh list net interface all-properties | Show all installed interfaces with all properties |
tmsh show ltm virtual | egrep "Availability" | awk '{$1=$1;print}' | sort | uniq -c |
Count status of virtual servers. Example output:
|
tmsh show ltm pool | egrep "Availability" | awk '{$1=$1;print}' | sort | uniq -c |
Count status of pools. Example output: |
tmsh list ltm virtual description destination pool profiles |
List Virtual Servers with all the properties. Additional properties can be added, use tab for a full list in interactive tmsh. |
Set Commands
Command | Description |
---|---|
tmsh run cm config-sync <sync_direction> <sync_group> |
For example, the following command pushes the local device's configuration to remote devices in the Syncfailover device group: run cm config-sync to-group Syncfailover To do a full sync use: run cm config-sync to-group Syncfailover force-full-load-push |
tmsh run sys failover standby | Specifies that the active unit or cluster fails over to a Standby state, causing the standby unit or cluster to become Active. |
tmsh run sys failover offline | Changes the status of a unit or cluster to Forced Offline. If persist or no-persist are not specified, the change in status will be persisted in-between system restarts. |
tmsh modify cm trust-domain Root add-device { ca-devices true | false ip_address } device-name device_name username admin password admin | In addition to adding a device to a trust domain, returns error messages for these conditions:
|
Backup Commands
Command | Description |
---|---|
tmsh save sys ucs <YEAR><MONTH><DAY>.ucs |
Using tmsh to generate a UCS backup file. Example with the actual Year Month and Date.
|
tmsh load sys ucs ucs_archive_name |
Restore the UCS archive on the system. |
tmsh delete sys ucs ucs_archive_name |
Delete the named UCS archive on the system. |