set_trace.py
The set_trace.py
script changes the system log level dynamically for a single MATRIXX Engine
server during runtime for the current session. Specific messages can be logged for one or
more MATRIXX services, including more specific tasks that form a service. The script updates
the values set in the ${MTX_CUSTOM_DIR}/mtx_log_config_update.cfg file
but does not change the base system configuration parameter in the
${MTX_CONF_DIR}/mtx_config.xml
file. The script only makes logging
changes on the server on which the script runs.
For more information about the MATRIXX environment variables, see the discussion about container directories and environment variables in MATRIXX Installation and Upgrade.
Syntax
Run this script as the mtx
user:
set_trace.py -h | -d | mtx_service | log_level | [task_name,debug_flag,trace_flag] | module,name=value[ name=value]
If the log level is not debug or trace, you must first set it appropriately for a specified MATRIXX process. Otherwise, the debug or trace log messages are not logged:
set_trace.py mtx_service | log_level
set_trace.py [<task_name>,<debug_flag>,<trace_flag>] | module,<name>=<value>[ <name>=<value>]
Options
- -h
- Displays help information at the command line.
- -d, --debug
- Debug flag. The default is to not print debugging messages. If this option is specified, extra messages are printed to help with debugging this script.
- mtx_service
-
Table 1. Values for mtx_service and task_name Application mtx_service Abbreviation task_name Value test_app app - test_app_driver_task
- file_sink_task
- io_sender_task
- io_receiver_task
cdr_checker cdr_checker - cdr_checker_driver_task
- cdr_checker_sink_task
- io_sender_task
- io_receiver_task
cdr_converter cdr_converter - cdr_converter_driver_task
- cdr_dispatcher_sender_task
- to_diameter_task
- diameter_sender_task
- diameter_client_sender_task
- diameter_receiver_task
- diameter_client_receiver_task
- from_diameter_task
- cdr_dispatcher_receiver_task
- cdr_converter_file_sink_task
cdr_simulator cdr_simulator - cdr_simulator_driver_task
- file_sink_task
- io_sender_task
- io_receiver_task
camel_gateway cg - unitdata_receiver_task
- unitdata_sender_task
- from_sccp_task
- to_sccp_task
- camel_logging_task
- analyzer_task
- stats_task
- stats_monitor_task
- transporter_task
charging_server chrg - task_manager_handler_task
- replay_task
- upgrade_task
- normalization_task
- from_tcap_task
- charging_task
- enrichment_task
- response_task
- retry_task
- stats_monitor_task
cluster_manager cluster - timing_task
- cmp_receiver_task
- service_mgr_task
- peer_cluster_mgr_task
- peer_cluster_monitor_task
- cluster_mgmt_server_task
- lb_monitor_server_task
- event_dispatcher_task
- system_monitor_task
- publishing_ha_mgr_task
- cluster_state_monitor_task
- snmp_monitor_task
- kafka_monitor_task
- cluster
- stats_monitor_task
diameter_gateway diam - diameter_receiver_task
- diameter_client_receiver_task
- from_diameter_task
- diameter_logging_task
- to_diameter_task
- diameter_sender_task
- diameter_client_sender_task
- analyzer_task
- stats_task
- stats_monitor_task
- external_mdc_producer_sender_task
diameter_test_app diam_app - diameter_test_app_driver_task
- to_diameter_task
- diameter_sender_task
- diameter_client_sender_task
- diameter_receiver_task
- diameter_client_receiver_task
- from_diameter_task
- file_sink_task
event_loader eloader - event_loader_cleanup_task
- event_loader_dispatcher_task
- event_loader_purge_task
- event_loader_worker_task
- topology_processing_task
- stats_monitor_task
mdc_gateway gw - network_receiver_task
- network_client_receiver_task
- from_network_task
- to_network_task
- network_sender_task
- network_client_sender_task
- to_activemq_task
- from_activemq_task
- analyzer_task
- stats_task
- stats_monitor_task
- transporter_task
network_enabler ne - external_network_task
- internal_network_task
- stats_task
- stats_monitor_task
price_loader_app price - price_loader_app_driver_task
- price_loader_app_sink_task
- io_sender_task
- io_receiver_task
prometheus_agent prometheus - main_task
- stats_monitor_task
route_cache_controller rcc - main_task
route_cache_controller_l2 rccl2 - main_task
route_cache_proxy rcp - main_task
snmp_agent snmp - main_task
- stats_monitor_task
event_stream_server stream - event_publisher_task
- event_writer_task
- event_file_manager_task
- kafka_event_producer_task
- event_archiver_task
- mef_v2_generator_task
- topology_processing_task
- stats_monitor_task
system_monitor sysmon - main_task
task_manager task - topology_processing_task
- subscriber_db_scan_task
- alert_db_scan_task
- activity_db_scan_task
- event_db_scan_task
- upgrade_cleanup_task
- schedule_db_task_object_scan_task
- schedule_db_application_delay_response_object_scan_task
- schedule_db_call_out_object_scan_task
- schedule_db_payment_op_object_scan_task
- schedule_db_notification_object_scan_task
- schedule_db_start_call_object_scan_task
- stats_monitor_task
- response_task
traffic_manager tra - main_task
- stats_monitor_task
traffic_manager traffic - main_task
- stats_monitor_task
transaction_server txn - transaction_request_receiver_task
- gtc_sorting_task
- control_channel_task
- transaction_manager_task
- transaction_stream_task
- database_copier_copy_task
- database_copier_sender_task
- database_copier_receiver_task
- database_copier_merge_task
- transaction_rsync_task
- transaction_log_manager_task
- checkpoint_writer_task
- transaction_log_reader_task
- p2p_sender_receiver_task
- checkpoint_manager_task
- database_replay_manager_task
- replay_analyzer_task
- stats_monitor_task
- index_organizer_driver_task
- index_organizer_task
- transaction_sorted_logging_task
- transaction_stream_kafka_task
- transaction_init_logging_task
- log_level
- Specifies the log level, one of the following:
off
— No messages are logged.critical
— Only critical messages are logged.error
— Only critical and error messages are logged.warning
-- Only warning, critical, and error messages are logged.info
— Only warning, critical, error, and informational messages are logged.debug
— Only warning, critical, error, informational, and debug messages are logged.trace
— All messages (critical, error, warning, informational, debug, and trace) are logged.
- task_name
- Sets the log level for the specified task. Values for mtx_service and task_name lists the task names you can use. These tasks are also listed in the mtx_config_base.xml file on the MATRIXX Engine server.
- debug_flag
-
0x01
— Turns debugging on. This option directs this script to write debug messages for the specified service and task to the log. If this option is not set, debugging is not enabled.0x00
- Turns debugging off.
- trace_flag
-
trace_flag
is one of the following values. The value is valid for all specified services and tasks. For a certain process, any process that connects to this process is a client, and any process this process connects to is a server. The following diagram explains the how specific messages can be traced:Process +-------------------------+ | Task1 Task2 | client | +------+ +------+ | server +------+ A | | | B | | | C +------+ | |------->| |---->| |------->| | | | | | | | | | | | | | | | | | | | | | | | F | | | E | | | D | | | |<-------| |<----| |<-------| | | | | | | | | | | | +------+ | +------+ +------+ | +------+ | | +-------------------------+
Use the following flags to set tracing dynamically at runtime for any MATRIXX process:- 0xFF — Set all trace flags.
- 0x00 — Turns tracing off. Reset all trace flags.
- 0x00000001 — Trace all input messages from the client. (Message A)
- 0x00000002 — Trace all output messages to the client. (Message F)
- 0x00000004 — Trace all input messages from the server. (Message D)
- 0x00000008 — Trace all output messages to the server. (Message C)
- 0x00000010 — Trace inter-task input messages. (Message B task 2 and Message E task 1)
- 0x00000020 — Trace inter-task output messages. (Message B task 1 and Message E task 2)
- 0x00000040 — Trace raw data, for example, packet data.
Enable tracing for the Transaction Server
To do this, run one of the following commands before setting the log level for a specific service or task, as shown in the ensuing examples:
set_trace.py txn trace
Set the Charging Server log level to debug
set_trace.py chrg debug
Set the log level to debug
for all services and to trace for all
tasks in the Transaction Server
set_trace.py txn all,0x01,0xFF
Set the log level to trace for all Charging Server tasks
set_trace.py chrg all,0x01,0x00
Enable trace logging for OID index compression and rebalancing operations
set_trace.py txn module,sto_oidindex_compress_rebalance_bool=1
Enable trace logging for the Charging Server hash index rebalancing operations
set_trace.py chg module,sto_hashindex_rebalance_bool=1