print_tra_connections.py
The print_tra_connections.py script reports active Traffic Routing Agent (TRA) connections data through the management interface server for all virtual servers. Enable connections reporting in the tra_config.xml file.
Syntax
print_tra_connections.py [-h] [-a address] [-p] [-v virtual_server] [-s] [-S]
- -h, --help
- Help about the script options.
- -a, --address address:port
- (Optional) Management server IP address (or host name) and port. If not specified, the script attempts to read connection information from the local tra_config.xml file.
- -p, --past
- Displays past tracked connections per Virtual Server (VS).
To adjust the limit of reported past connections, change the value for the global
diagnostics-past-connections-win-sz
parameter in the ${MTX_CONF_DIR}/tra_config.xml file:<tm-config> <parameters ... diagnostics-past-connections-win-sz=set_value />
Where set_value is the maximum number of past connections to report. Set the
diagnostics-past-connections-win-sz
parameter to 0 to disable reporting of past connections. - -v, --virtual_server virtual_server
- VS name(s) to match based on the virtual_server sub- string.
- -s, --summary
- Limits output to VS name(s) and number of active connections per each VS.
- -S, --ssl
- Use an HTTPS connection to the management server.Note: You must enable secure socket layer (SSL) connections on the target server before using this option. For more information about enabling SSL, see MATRIXX Security.
Run Without Options
If you run the print_tra_connections.py utility without arguments, it
reads the port of the management interface server from
<management-interface>
element in the
tra_config.xml file. By default the script lists detailed
connection data for all VSs:
- VS name
- Total number of active bridges
- Upstream and downstream Information for each bridge:
- Remote address
- Local address
- Created origin time
- Bytes sent
- Bytes received
- Packets sent
- Packets received
For more information about configuring the management interface port in the tra_config.xml file, see the discussion about displaying Traffic Routing Agent connections.
Run Specifying Management Server Address and Port and Virtual Server Matching Sub-String
print_tra_connections.py -a localhost:7080 -v udp
The -a
option specifies the host name (in this case
localhost
) and port of the management interface server, and the
-v
option limits reported information based on VS names that
match the specified sub-string (in this case udp
.) The script lists
detailed connection data for all matching VSs, the same as in the previous no-option
example.
Run Specifying Summarized Output
print_tra_connections.py -a localhost:7080 -v udp -s
The -a
option specifies the host name (in this case
localhost
) and the port of the management interface server, and
the -v
option limits reported information based on VS names that
match the specified sub-string (in this case udp
.) The
-s
option limits the output to the following:
- VS name
- Total number of active connections