Turn on Trace Logging for a Subscriber

You can turn on trace logging for a subscriber during runtime by specifying a trace option such as a device IMSI or NAI (network access identifier). Turning on a trace sets the logging level for the specified gateway (Diameter Gateway, CAMEL Application Part (CAP), or both) and the Charging Server dynamically during runtime. This allows these MATRIXX processes to log trace messages to the mtx_debug.log file.

Before you begin

Determine the subscriber trace option value.
Note: A trace can run on one value only for each option (such as --nai or --imsi) at a time. The trace options are:
  • --imsi
  • --msisdn
  • --nai
  • --private
  • --sip_uri
  • --calling
  • --called
Seven different subscriber traces can be active at one time (one for each option). For more information about the set_subscriber_trace.py options, see the discussion about set_subscriber_trace.py.

About this task

This command applies to all servers on the specified engine or the current engine if one is not specified.

When the Diameter Gateway receives a Diameter packet that has one or more Subscription-Id AVPs that match the value being traced, the Diameter Gateway sets the TraceFlags field in the MDC. As the services process the MDC, they trace the MDC if this field is set to a nonzero value.

When the CAMEL Application Part (CAP) receives an InitialDP operation that has a parameter that matches the values being traced, the CAMEL Application Part (CAP) sets the TraceFlags field in the MDC and in context. As the services process the MDC, and other MDCs for the same session, they trace the MDC if this field is set to a nonzero value.

In the CAMEL Application Part (CAP), the IMSI, CalledPartyNumber, and CallingPartyNumber are traced unnormalized and must match the exact digits sent on the network. The MSISDN number is normalized.

Procedure

In a terminal, enter the following command:
set_subscriber_trace.py -e engineId --option option_value

Where:

  • engineId is the ID of the engine in which to turn on trace logging. This is required when the engine on which you run the script is not the local engine.
  • --option is the trace option. For example, --nai.
  • option_value is the value for the specific trace option. For example, if the trace is for an NAI, the option value might be [email protected].
For example, the following command turns on trace logging for an IMSI device.
set_subscriber_trace.py --imsi 310150123456789
The following command turns on trace logging for an IMSI device and an MSISDN device.
set_subscriber_trace.py -e 1 --imsi 310150123456789 --msisdn 447871234567

What to do next

Turn off trace logging.

To turn off trace logging, run the set_subscriber_trace.py script and set the option_value to 0. For example, to turn off trace logging for an IMSI device, enter the following command:

set_subscriber_trace.py --imsi 0

This command turns off the trace flag for the MATRIXX processes and sets the log-level to INFO. You can override the default log level by using the --log_level option and specifying the log level, such as warning. For example:

set_subscriber_trace.py --imsi 0 --log_level warning

If you are tracing multiple devices at one time and only want to turn off tracing for one, you must specify the --log_level option with a value of trace to enable the tracing to continue for the other devices. For example, if you are tracing an IMSI device and an MSISDN device and only want to turn off tracing for the MSISDN device, enter the following command:

set_subscriber_trace.py --msisdn 0 --log_level trace