简介
本文档介绍蜂窝网关和可插拔接口模块(PIM)的DM诊断监视器(DM)日志收集过程。
什么是DM日志
DM — 诊断监视器 — 日志用于捕获调制解调器与网络之间通过RF接口进行的数据事务,这有助于排除4G和5G数据连接或性能问题。
基本5G呼叫流
在进入DM日志收集和分析之前,必须了解基本呼叫流程。
基本5G呼叫流
1.设备初始化和单元搜索:
- 5G设备通电并开始搜索可用的5G信元。
- 它扫描附近基站(gNB)广播的同步信号。
2.初始访问:
- 一旦找到合适的信元,设备就会尝试与gNB定时和频率同步。
- 它向gNB发送消息(RRC连接请求),请求连接。
3. RRC连接建立:
- gNB接收请求并与设备建立无线资源控制(RRC)连接。
- 此连接可实现设备与网络之间的安全可靠通信。
4.登记:
- 设备使用网络进行身份验证(使用SIM卡信息)。
- 它向网络注册其在线状态并请求访问服务。
5.数据传输:
- 注册后,设备即可通过5G网络发送和接收数据。
- 这可能包括语音呼叫、数据流量(浏览、流)或其他应用。
6.连接释放:
- 当用户结束呼叫或断开与网络的连接时,设备会释放与gNB的连接。
要点:
- RRC连接:这是实现设备与网络之间安全可靠通信的关键步骤。
- 数据层面:一旦建立RRC连接,设备就可以使用数据平面来发送和接收数据。
- 控制层面:控制平面用于信令和控制功能,例如建立连接和管理资源。
蜂窝网网关的DM日志收集
首先,在启用DM Logs之前关闭调制解调器,可以使用AT命令AT+CFUN=0完成此操作
CellularGateway# cellular 1 modem-at-commands
Value for '' (<string>): AT+CFUN=0
此命令需要几秒钟,会冻结SSH会话,打开另一个到蜂窝网关的SSH会话。
使用AT+CFUN命令验证是否已应用?
CellularGateway# cellular 1 modem-at-commands
Value for '' (<string>): AT+CFUN?
cellular_modem_at_cmd: modem-at-response AT+CFUN?
+CFUN: 0
OK
设置DM日志大小、旋转和自动停止。
CellularGateway# config terminal
Entering configuration mode terminal
CellularGateway(config)# controller cellular 1
CellularGateway(config-cellular-1)# dm-log rotation
CellularGateway(config-cellular-1)# dm-log max_dm_log_size 60
CellularGateway(config-cellular-1)# dm-log autostop-event MODEM_STATE_DNS_ACQUIRED
CellularGateway(config-cellular-1)# dm-log autostop-timer 2
这些设置可以根据日志收集流进行调整,如果问题与蜂窝网络性能相关,则可以选择应用过滤器。
启用DM日志
CellularGateway(config-cellular-1)# dm-log enable
CellularGateway(config-cellular-1)# commit
使用AT+CFUN=1 AT命令启用调制解调器。
CellularGateway# cellular 1 modem-at-commands
Value for '' (<string>): AT+CFUN=1
cellular_modem_at_cmd: modem-at-response AT+CFUN=1
OK
CellularGateway#
CellularGateway# cellular 1 modem-at-commands
Value for '' (<string>): AT+CFUN?
cellular_modem_at_cmd: modem-at-response AT+CFUN?
+CFUN: 1
OK
检查创建的文件。
CellularGateway# gw-action:request file list
-rw-r--r-- 97272745 Dec 11 09:05 dmlog-slot0-20241211-090453.tar.gz
-rw-r--r-- 10550241 Dec 25 10:58 dmlog-slot0-20241225-105827.tar.gz
drwx------ 16384 Sep 27 18:29 lost+found
drwxr-xr-x 4096 Dec 25 11:03 storage
drwxr-xr-x 4096 Sep 27 18:29 tmp
这些文件可以通过从下一跳启动复制来传输。
5GSwitch#copy tftp://192.168.1.1/dmlog-slot0-20241211-090453.tar.gz flash:
Destination filename [dmlog-slot0-20241211-090453.tar.gz]?
Accessing tftp://192.168.1.1/dmlog-slot0-20241211-090453.tar.gz...
Loading dmlog-slot0-20241211-090453.tar.gz from 192.168.1.1 (via GigabitEthernet1/0/3): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
调试完成后,禁用DM日志。
CellularGateway# config terminal
Entering configuration mode terminal
CellularGateway(config-cellular-1)# no dm-log enable
CellularGateway(config-cellular-1)# commit
PIM模块的DM日志收集
首先,关闭蜂窝网接口和无线电。
ISR2#configure terminal
ISR2(config)#interface cellular 0/2/0
ISR2(config-if)#shutdown
ISR2(config-if)#exit
ISR2(config)#controller cellular 0/2/0
ISR2(config-controller)#lte radio off
设置DM日志记录参数,包括旋转、文件大小、自动停止以及是否需要过滤器。
ISR2(config)#controller cellular 0/2/0
ISR2(config-controller)#lte modem dm-log rotation
ISR2(config-controller)#lte modem dm-log filesize 20
ISR2(config-controller)#lte modem dm-log autostop timer 20
启用DM日志
ISR2(config-controller)#lte modem dm-log enable
启用无线电和蜂窝网接口。
ISR2(config)#controller cellular 0/2/0
ISR2(config-controller)#no lte radio off
ISR2(config)#interface cellular 0/2/0
ISR2(config-if)#no shutdown
验证DM日志统计信息和文件。
ISR2#show cellular 0/2/0 logs dm-log
Integrated DM logging is on
Output path = bootflash:
Filter Type = MC73xx generic
Filter Name = Telit Default log mask.bin
Maximum log size = 64 MB
Maximum file size = 20 MB
Log rotation = Enabled
ISR2#dir bootflash: | inc dm
24 -rw- 4236574 Jan 3 2025 11:39:33 +00:00 dmlog-slot2-20250103-113930.tar.gz
调试完成后,禁用DM日志。
ISR2(config)#controller cellular 0/2/0
ISR2(config-controller)#no lte modem dm-log enable
使用EEM脚本禁用PIM模块上的DM日志记录
我们可以使用EEM脚本根据特定日志消息或事件禁用DM日志记录,最常见的使用案例是蜂窝网接口或隧道接口抖动。
event manager applet Cellular-Capture authorization bypass
event syslog pattern "Syslog Messege Needed to stop logging" maxrun 600
action 100 cli command "enable"
action 101 cli command "terminal length 0"
action 102 cli command "term exec prompt timestamp"
action 103 cli command "show cellular 0/2/0 all | append flash:Out_info"
action 104 cli command "show controller cellular 0/2/0 | append flash:Out_info"
action 105 cli command "show dialer | append flash:Out_info"
action 106 cli command "show int cellular 0/2/0 | append flash:Out_info"
action 112 syslog msg "Information loaded"
action"113"wait"180
action 114 cli command "show log | append flash:Out_info"
action 115 cli command "enable"
action 116 cli command "conf t"
action 117 cli command "controller cellular 0 1"
action 118 cli command "no lte modem dm-log enable"
action 119 syslog msg "DM-logs disabled"
action 120 cli command "en
结论
DM日志分析需要TAC帮助,因为收集的文件需要解码,请在需要DM日志记录的问题时打开TAC案例。