1{
2    "version": "1.0.0",
3    "segmentStatus":[
4        {"namespace":"segStatus", "matchKey":"tid=\\d+ (.*)", "desc":""},
5        {"namespace":"segWaitOther", "matchKey":"waiting to lock.*held by thread (\\d+)", "desc":" waiting on lock held by "},
6        {"namespace":"segWaitSelf", "matchKey":"- waiting on <(.*)>", "desc":" waiting on itself"},
7        {"namespace":"segIpcTrans", "matchKey":"os\\.(IpcProxy)\\.transact", "desc":" ipc transact:"},
8        {"namespace":"segIpcFull", "matchKey":"os\\.Ipc\\.(blockUntilThreadAvailable)", "desc":" ipc full:"}
9    ],
10    "Rule1":{
11        "DirOrFile":"/data/log/faultlog/",
12        "Subcatalog":".*?\\-.*?\\-[0-9]{5}\\-[0-9]{14}",
13        "featureId":"63_AppFreeze_00",
14        "segmentType":"TwoLayers",
15        "startSeg":["BasicParam.v_process", "main"],
16        "segStack":["^\\s+at\\s+|^\\s+-\\s\\w", "^\\s+at\\s+|^\\s+-\\s\\w"],
17        "rules":[
18            {"namespace":"BasicParam", "matchKey":"PROCESS_NAME", "v_process":"PROCESS_NAME = (.*)"},
19            {"namespace":"BasicParam", "matchKey":"PID = ", "v_pid":"PID = (.*)"},
20            {"namespace":"BasicParam", "matchKey":"UID = ", "v_uid":"UID = (.*)"}
21        ],
22        "segmentRule":[
23            {"namespace":"LayerOneCmd", "matchKey":"----- pid ", "num":2, "v_id":"^----- pid (\\d+) at", "v_name":"^Cmd line: (.*)"},
24            {"namespace":"LayerTwoCmd", "matchKey":" prio=@&@ tid=", "num":3, "v_id":"tid=(\\d+) ", "v_name":"^\"(.*)\" ", "v_sysTid":"sysTid=(\\d+) "}
25        ]
26    },
27    "Rule2":{
28        "DirOrFile":"/data/log/faultlog/faultlogger/",
29        "Subcatalog":"cppcrash-.*-\\d+-\\d+",
30        "featureId":"07_CPP_CRASH_00",
31        "rules":[
32            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)"},
33            {"namespace":"MainCallTrace", "matchKey":"Tid:", "v_trace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)"}
34        ]
35    },
36    "Rule3":{
37        "DirOrFile":"/data/log/faultlog/faultlogger/",
38        "Subcatalog":"jscrash-.*-\\d+-\\d+",
39        "featureId":"07_JS_ERROR_00",
40        "rules":[
41            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)"},
42            {"namespace":"MainCallTrace", "matchKey":"at ",  "v_trace":"@T@at (.*)"}
43        ]
44    },
45    "Rule4":{
46        "DirOrFile":"/data/log/faultlog/faultlogger/",
47        "Subcatalog":"appfreeze-.*-\\d+-\\d+",
48        "featureId":"63_APP_FREEZE_01",
49        "rules":[
50            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)"},
51            {"namespace":"BasicParam", "matchKey":"PID = ", "v_pid":"PID = (.*)"},
52            {"namespace":"MainCallTrace", "matchKey":"@R@(Tid:){1}@{BasicParam.v_pid}@", "v_trace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)"}
53        ]
54    },
55    "Rule5":{
56        "DirOrFile":"/data/log/faultlog/faultlogger/",
57        "Subcatalog":"sysfreeze-.*-\\d+-\\d+",
58        "featureId":"63_SYS_FREEZE_01",
59        "rules":[
60            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)", "v_service_block":"Module name:SERVICE_BLOCK"},
61            {"namespace":"BasicParam", "depend":"BasicParam.v_service_block", "matchKey":"SERVICE_BLOCK at ", "v_first":"SERVICE_BLOCK at (.*)"},
62            {"namespace":"BasicParam", "matchKey":"PID = ", "v_pid":"PID = (.*)"},
63            {"namespace":"MainCallTrace", "matchKey":"@R@(Tid:){1}@{BasicParam.v_pid}@", "v_trace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)"}
64        ]
65    },
66    "Rule6":{
67        "DirOrFile":"/data/log/bbox/",
68        "Subcatalog":"\\d{14}-\\d{8}/ap_log/last_kmsg",
69        "featureId":"04_PANIC_01",
70        "segmentType":"OneLayer",
71        "startSeg":["NocTrace.v_cpu"],
72        "segStack":["[0-9a-zA-Z_.]+\\+0x[0-9a-f]+/0x[0-9a-f]+(.*)", "el1_irq+0"],
73        "rules":[
74            {"namespace":"BasicParam", "matchKey":"Unhandled fault:@|@Unable to handle kernel@|@kernel BUG at@|@BUG: failure at@|@Bad mode in@|@DPM device timeout@|@invoked oom-killer@|@Synchronous External Abort:@|@,init]potentially unexpected fatal signal@|@Internal error:@|@NoC Error Probe:@|@mali gpu: Unhandled Page@|@CFI failure@|@Kernel panic - not syncing:", "v_cause":"pid:\\d+,cpu\\d+,.*\\]([A-Za-z].*)", "v_pname":",cpu[0-9],(.*?)[,:\\]]", "v_noc":"(NoC Error)"},
75            {"namespace":"BasicParam", "depend":"BasicParam.v_pname", "matchKey":"PC is at ", "v_f1":"PC is at ([^\\+ ]+.*)"},
76            {"namespace":"NocTrace", "depend":"BasicParam.v_noc", "matchKey":"err_code=", "v_errcode":"\\[(err_code=\\d+)\\]"},
77            {"namespace":"NocTrace", "depend":"BasicParam.v_noc", "matchKey":"init_flow=", "v_master":"\\[init_flow=\\d+\\]: (.*)"},
78            {"namespace":"NocTrace", "depend":"BasicParam.v_noc", "matchKey":"target_flow=", "v_slave":"\\[target_flow=\\d+\\]: (.*)"},
79            {"namespace":"NocTrace", "depend":"BasicParam.v_noc", "matchKey":"adjusted ADDR", "v_address":"adjusted.* = (.*)"},
80            {"namespace":"NocTrace", "depend":"BasicParam.v_noc", "matchKey":"USER_SIGNAL =", "v_user_signal":"USER_SIGNAL = 0x[0-9a-z]+ (.*)", "v_cpu":"\\(MID: AP_CPU(\\d+)"},
81            {"namespace":"NocTrace", "depend":"BasicParam.v_noc", "matchKey":"sec_val =", "v_security":"(sec_val = 0x[0-9a-f]+)"},
82            {"namespace":"MainCallTrace", "depend":"BasicParam", "matchKey":"Call trace:", "v_trace":"@T@[0-9a-zA-Z_.]+\\+0x[0-9a-f]+/0x[0-9a-f]+(.*)"}
83        ],
84        "segmentRule":[
85            {"namespace":"LayerOneCmd", "matchKey":"]:CPU@&@: stopping", "num":1, "v_id":"\\]:CPU(\\d+): stopping", "v_name":"\\]:(CPU\\d+): stopping"}
86        ]
87    },
88    "Rule7":{
89        "DirOrFile":"/data/log/bbox/",
90        "Subcatalog":"\\d{14}-\\d{8}/ap_log/last_kmsg",
91        "featureId":"04_HWWATCHDOG_00",
92        "rules":[
93            {"namespace":"BasicParam", "matchKey":"sysrq: Trigger a crash", "v_fiq":"(.*)"},
94            {"namespace":"BasicParam", "depend":"BasicParam.v_fiq","matchKey":"PC is at ", "v_f1":"PC is at ([^\\+ ]+.*)", "v_pname":"cpu[0-9],(.*?)[,:\\]]"},
95            {"namespace":"MainCallTrace", "depend":"BasicParam.v_fiq", "matchKey":"Call trace:", "v_trace":"@T@[0-9a-zA-Z_]+\\+0x[0-9a-f]+/0x[0-9a-f]+(.*)"}
96        ]
97    },
98    "Rule8":{
99        "DirOrFile":"/data/log/faultlog/faultlogger/",
100        "Subcatalog":"rustpanic-.*-\\d+-\\d+",
101        "featureId":"04_RUST_PANIC_00",
102        "rules":[
103            {"namespace":"BasicParam", "matchKey":"Module name:", "v_pname":"Module name:(.*)"},
104            {"namespace":"MainCallTrace", "matchKey":"Thread name:", "v_trace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)"}
105        ]
106    },
107    "Rule9":{
108        "DirOrFile":"/data/log/bbox/",
109        "Subcatalog":"\\d{14}-\\d{8}/bootfail_info_\\d{1}",
110        "featureId":"04_BOOTFAIL_00",
111        "rules":[
112            {"namespace":"BasicParam", "matchKey":"Fault Reason: ", "v_bootfailReason":"Fault Reason: (.*)"},
113            {"namespace":"BasicParam", "matchKey":"Error Description: ", "v_bootfailDetail":"Error Description: (.*)"},
114            {"namespace":"BasicParam", "matchKey":"Error No: 0x", "v_bootfailErrno":"Error No: (0x[0-9a-f]+)"}
115        ]
116    },
117    "Rule10":{
118        "DirOrFile":"/data/log/sensorhub-log/",
119        "Subcatalog":"history.log",
120        "featureId":"03_SENSORHUBCRASH_00",
121        "rules":[
122            {"namespace":"BasicParam", "matchKey":"time", "v_last":"@L@time (.+)"}
123        ]
124    },
125    "Rule11":{
126        "DirOrFile":"/data/hisi_logs/",
127        "Subcatalog":"\\d{14}-\\d{8}/cp_log/reset.log",
128        "featureId":"03_MODEMCRASH_00,MODEM_REBOOTSYS",
129        "rules":[
130            {"namespace":"BasicParam", "matchKey":"brief:", "v_first":"brief:(.*)"},
131            {"namespace":"BasicParam", "matchKey":"task_name:", "v_second":"task_name:(.*)"},
132            {"namespace":"BasicParam", "matchKey":"modid:", "v_last":"modid:(.*)"}
133        ]
134    },
135    "Rule12":{
136        "DirOrFile":"/data/hisi_logs/",
137        "Subcatalog":"\\d{14}-\\d{8}/ap_log/last_kmsg",
138        "featureId":"04_PANIC_00",
139        "rules":[
140            {"namespace":"BasicParam", "matchKey":"qtp_rsp", "v_cause":"dfx_qic\\]:(.*)", "v_last":"(qtp_rsp.*)"},
141            {"namespace":"BasicParam", "depend":"BasicParam.v_cause","matchKey":"MID(Master id)", "v_first":"(MID\\(Master id\\).*)"},
142            {"namespace":"BasicParam", "depend":"BasicParam.v_cause","matchKey":"qic_addr", "v_second":"(qic_addr.*)"}
143        ]
144    }
145}
146