Monitoring the Subscriber Session
To monitor the subscriber in the SMF, use the following CLI command:
monitor subscriber [ capture-duration duration | gr-instance gr_instance_id | imei imei_id | imsi imsi_value | internal-messages [ yes ] | namespace [ sgw | smf ] | nf-service [ sgw | smf ] | supi supi_id | transaction-logs [ yes ] ]
NOTES:
-
capture-duration duration : Specify the duration in seconds during which monitor subscriber is enabled. The default value is 300 seconds (5 minutes). This is an optional parameter.
-
gr-instance gr_instance_id : Specify the GR instance ID. The instance ID 1 denotes the local instance ID.
-
imei imei_id : Specify the subscriber IMEI. For example: 123456789012345, *
-
imsi imsi_value : Specify the subscriber IMSI. For example: 123456789, *
-
internal-messages [ yes ] : Enable internal messages when set to yes . By default, it is disabled. This is an optional parameter.
-
namespace [ sgw | smf ] : Enable the specified namespace. By default, namespace is set to none. This is an optional parameter.
ImportantThis keyword is deprecated in release 2021.02.0 and replaced with nf-service keyword.
-
nf-service [ sgw | smf ] : Enable the specified NF service. By default, nf-service is set to none. This is an optional parameter.
ImportantThe nf-service keyword replaces the namespace keyword in release 2021.02 and beyond.
-
supi supi_id : Specify the subscriber identifier. For example: imsi-123456789, imsi-123*
-
transaction-logs [ yes ] : Enable transaction logs when set to yes . By default, it is disabled. This is an optional parameter.
To view the transaction history logs, use the dump transactionhistory command.
NoteThe most recent transaction logs are stored in a circular queue of size 1024 transaction logs.
The monitor subscriber CLI command can be run simultaneously on multiple terminals. For example, run the CLI simultaneously in two SMF Ops Center terminals for two subscribers (for example, imsi-123456789012345 and imsi-456780123456789) to implement the following:
-
Monitor the duration when the monitor subscriber is enabled
-
View internal messages for the specified subscriber
-
View transaction logs for the specified subscriber
Terminal 1: The following command monitors and displays subscriber messages for the specified subscriber.
monitor subscriber supi imsi-123456789012345 capture-duration 1000 internal-messages yes
Terminal 2: The following command monitors and displays transaction logs for the specified subscriber.
monitor subscriber supi imsi-456780123456789 capture-duration 500 internal-messages yes transaction-logs yes
After the capture duration is completed, stop the CLI by using the Ctrl+C keys. The captured messages are reordered and stored in a file. To retrieve the list of stored files, use the monitor subscriber list CLI command.
For example:
monitor subscriber list
RELEASE_NAMESPACE: 'smf'
'monsublogs/subscriberID_imsi-*_AT_2019-10-22T09:19:05.586237087.txt.sorted'
monsublogs/subscriberID_imsi-123456789012345_AT_2019-10-22T09:20:11.122225534.txt.sorted