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    "Rule2":{
11        "DirOrFile":"/data/log/faultlog/faultlogger/",
12        "Subcatalog":"cppcrash-.*-\\d+-\\d+",
13        "featureId":"07_CPP_CRASH_00",
14        "rules":[
15            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)"},
16            {"namespace":"MainCallTrace", "matchKey":"Thread name:@|@Tid:", "v_trace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)"}
17        ]
18    },
19    "Rule3":{
20        "DirOrFile":"/data/log/faultlog/faultlogger/",
21        "Subcatalog":"jscrash-.*-\\d+-\\d+",
22        "featureId":"07_JS_ERROR_00,07_JS_ERROR_01",
23        "rules":[
24            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)"},
25            {"namespace":"BasicParam", "matchKey":"Error message:", "v_subreasion":"Error message:(.*)"},
26            {"namespace":"MainCallTrace", "matchKey":"at ",  "v_trace":"@T@at (.*)"},
27            {"namespace":"MainCallTrace", "matchKey":"#@&@pc",  "v_nativetrace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)"}
28        ]
29    },
30    "Rule4":{
31        "DirOrFile":"/data/log/faultlog/faultlogger/",
32        "Subcatalog":"appfreeze-.*-\\d+-\\d+",
33        "featureId":"63_APP_FREEZE_00,63_APP_FREEZE_01,63_APP_FREEZE_02",
34        "rules":[
35            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)"},
36            {"namespace":"BasicParam", "matchKey":"PID = ", "v_pid":"PID = (.*)"},
37            {"namespace":"BasicParam", "matchKey":"TID = ", "v_tid":"TID = (.*)"},
38            {"namespace":"BasicParam", "matchKey":"State:", "v_state":"\\bState:(.*)"},
39            {"namespace":"BasicParam", "matchKey":"TracerPid:", "v_tracer":"TracerPid:(.*)"},
40            {"namespace":"BasicParam", "matchKey":"hidumper: No such process", "v_exit":"hidumper: (.*):"},
41            {"namespace":"BasicParam", "matchKey":"timeout: ", "v_timeout":"timeout: (.*)"},
42            {"namespace":"BasicParam", "matchKey":"Result: pid", "v_dumpcatch_result":"Result: pid\\(\\d+\\) (process .*)\\."},
43            {"namespace":"MainCallTrace", "matchKey":"@R@(Tid:){1}@{BasicParam.v_tid}@", "v_trace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)|at (.*)"}
44        ]
45    },
46    "Rule5":{
47        "DirOrFile":"/data/log/faultlog/faultlogger/",
48        "Subcatalog":"sysfreeze-.*-\\d+-\\d+",
49        "featureId":"63_SYS_FREEZE_01",
50        "rules":[
51            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)"},
52            {"namespace":"BasicParam", "matchKey":"PID = ", "v_pid":"PID = (.*)"},
53            {"namespace":"BasicParam", "matchKey":"TID = ", "v_tid":"TID = (.*)"},
54            {"namespace":"BasicParam", "matchKey":"FfrtCallback: task(SERIAL_TASK_TIMEOUT:", "v_queue_name":"FfrtCallback: task\\(SERIAL_TASK_TIMEOUT:.*queue name \\[(sq_\\w+)_\\d+\\]"},
55            {"namespace":"BasicParam", "matchKey":"timeout: ", "v_timeout":"timeout: (.*)"},
56            {"namespace":"MainCallTrace", "matchKey":"@R@(Tid:){1}@{BasicParam.v_tid}@", "v_trace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)"}
57        ]
58    },
59    "Rule6":{
60        "DirOrFile":"/data/hisi_logs/",
61        "Subcatalog":"\\d{14}-\\d{8}/ap_log/dmesg-ramoops-0",
62        "featureId":"04_PANIC_01",
63        "segmentType":"OneLayer",
64        "startSeg":["NocTrace.v_cpu"],
65        "segStack":["[0-9a-zA-Z_.]+\\+0x[0-9a-f]+/0x[0-9a-f]+(.*)", "el1_irq+0"],
66        "rules":[
67            {"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)"},
68            {"namespace":"BasicParam", "depend":"BasicParam.v_pname", "matchKey":"PC is at ", "v_f1":"PC is at ([^\\+ ]+.*)"},
69            {"namespace":"NocTrace", "depend":"BasicParam.v_noc", "matchKey":"err_code=", "v_errcode":"\\[(err_code=\\d+)\\]"},
70            {"namespace":"NocTrace", "depend":"BasicParam.v_noc", "matchKey":"init_flow=", "v_master":"\\[init_flow=\\d+\\]: (.*)"},
71            {"namespace":"NocTrace", "depend":"BasicParam.v_noc", "matchKey":"target_flow=", "v_slave":"\\[target_flow=\\d+\\]: (.*)"},
72            {"namespace":"NocTrace", "depend":"BasicParam.v_noc", "matchKey":"adjusted ADDR", "v_address":"adjusted.* = (.*)"},
73            {"namespace":"NocTrace", "depend":"BasicParam.v_noc", "matchKey":"USER_SIGNAL =", "v_user_signal":"USER_SIGNAL = 0x[0-9a-z]+ (.*)", "v_cpu":"\\(MID: AP_CPU(\\d+)"},
74            {"namespace":"NocTrace", "depend":"BasicParam.v_noc", "matchKey":"sec_val =", "v_security":"(sec_val = 0x[0-9a-f]+)"},
75            {"namespace":"MainCallTrace", "matchKey":"KERNEL CALL STACK", "v_trace":"@T@[0-9a-zA-Z_.]+\\+0x[0-9a-f]+/0x[0-9a-f]+(.*)"},
76            {"namespace":"MainCallTrace", "matchKey":"Stack backtrace:", "v_trace":"@T@[0-9a-zA-Z_.]+\\+0x[0-9a-f]+/0x[0-9a-f]+(.*)"},
77            {"namespace":"MainCallTrace", "depend":"BasicParam", "matchKey":"Call trace:", "v_trace":"@T@[0-9a-zA-Z_.]+\\+0x[0-9a-f]+/0x[0-9a-f]+(.*)"}
78        ],
79        "segmentRule":[
80            {"namespace":"LayerOneCmd", "matchKey":"]:CPU@&@: stopping", "num":1, "v_id":"\\]:CPU(\\d+): stopping", "v_name":"\\]:(CPU\\d+): stopping"}
81        ]
82    },
83    "Rule7":{
84        "DirOrFile":"/data/hisi_logs/",
85        "Subcatalog":"\\d{14}-\\d{8}/ap_log/last_kmsg",
86        "featureId":"04_HWWATCHDOG_00",
87        "rules":[
88            {"namespace":"BasicParam", "matchKey":"fiq triggered by: Watchdog", "v_fiq":"(.*)"},
89            {"namespace":"BasicParam", "depend":"BasicParam.v_fiq","matchKey":"Comm:", "v_pname":"Comm:(.*) Tainted"},
90            {"namespace":"MainCallTrace", "depend":"BasicParam.v_fiq", "matchKey":"Call trace:", "v_trace":"@T@[0-9a-zA-Z_]+\\+0x[0-9a-f]+/0x[0-9a-f]+(.*)"}
91        ]
92    },
93    "Rule8":{
94        "DirOrFile":"/data/log/faultlog/faultlogger/",
95        "Subcatalog":"rustpanic-.*-\\d+-\\d+",
96        "featureId":"04_RUST_PANIC_00",
97        "rules":[
98            {"namespace":"BasicParam", "matchKey":"Module name:", "v_pname":"Module name:(.*)"},
99            {"namespace":"MainCallTrace", "matchKey":"Thread name:", "v_trace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)"}
100        ]
101    },
102    "Rule9":{
103        "DirOrFile":"/data/log/bbox/",
104        "Subcatalog":"\\d{14}-\\d{8}/bootfail_info_0@|@\\d{14}-\\d{8}/bootfail_info_1@|@\\d{14}-\\d{8}/bootfail_info_2@|@\\d{14}-\\d{8}/bootfail_info_3@|@\\d{14}-\\d{8}/bootfail_info_4@|@\\d{14}-\\d{8}/bootfail_info_5@|@\\d{14}-\\d{8}/bootfail_info_6@|@\\d{14}-\\d{8}/bootfail_info_7@|@\\d{14}-\\d{8}/bootfail_info_8@|@\\d{14}-\\d{8}/bootfail_info_9",
105        "featureId":"04_BOOTFAIL_00",
106        "rules":[
107            {"namespace":"BasicParam", "matchKey":"Fault Reason: ", "v_bootfailReason":"Fault Reason: (.*)"},
108            {"namespace":"BasicParam", "matchKey":"Error Description: ", "v_bootfailDetail":"Error Description: (.*)"},
109            {"namespace":"BasicParam", "matchKey":"Error No: 0x", "v_bootfailErrno":"Error No: (0x[0-9a-f]+)"}
110        ]
111    },
112    "Rule10":{
113        "DirOrFile":"/data/log/faultlog/",
114        "Subcatalog":"CPP_CRASH\\d+",
115        "featureId":"07_CPP_CRASH_00",
116        "rules":[
117            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)"},
118            {"namespace":"MainCallTrace", "matchKey":"Thread name:@|@Tid:", "v_trace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)"}
119        ]
120    },
121    "Rule11":{
122        "DirOrFile":"/data/log/faultlog/",
123        "Subcatalog":"JS_ERROR\\d+",
124        "featureId":"07_JS_ERROR_00,07_JS_ERROR_01",
125        "rules":[
126            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)"},
127            {"namespace":"BasicParam", "matchKey":"Error message:", "v_subreasion":"Error message:(.*)"},
128            {"namespace":"MainCallTrace", "matchKey":"at ",  "v_trace":"@T@at (.*)"},
129            {"namespace":"MainCallTrace", "matchKey":"#@&@pc",  "v_nativetrace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)"}
130        ]
131    },
132    "Rule12":{
133        "DirOrFile":"/data/log/faultlog/",
134        "Subcatalog":"*.appfreeze-.*.tmp",
135        "featureId":"63_APP_FREEZE_00,63_APP_FREEZE_01,63_APP_FREEZE_02",
136        "rules":[
137            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)"},
138            {"namespace":"BasicParam", "matchKey":"PID = ", "v_pid":"PID = (.*)"},
139            {"namespace":"BasicParam", "matchKey":"TID = ", "v_tid":"TID = (.*)"},
140            {"namespace":"BasicParam", "matchKey":"State:", "v_state":"\\bState:(.*)"},
141            {"namespace":"BasicParam", "matchKey":"TracerPid:", "v_tracer":"TracerPid:(.*)"},
142            {"namespace":"BasicParam", "matchKey":"hidumper: No such process", "v_exit":"hidumper:(.*):"},
143            {"namespace":"BasicParam", "matchKey":"timeout: ", "v_timeout":"timeout: (.*)"},
144            {"namespace":"BasicParam", "matchKey":"Result: pid", "v_dumpcatch_result":"Result: pid\\(\\d+\\) (process .*)\\."},
145            {"namespace":"MainCallTrace", "matchKey":"@R@(Tid:){1}@{BasicParam.v_tid}@", "v_trace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)|at (.*)"}
146        ]
147    },
148    "Rule13":{
149        "DirOrFile":"/data/log/sensorhub-log/",
150        "Subcatalog":"history.log",
151        "featureId":"03_SENSORHUBCRASH_00",
152        "rules":[
153            {"namespace":"BasicParam", "matchKey":"time", "v_last":"@L@time (.+)"}
154        ]
155    },
156    "Rule14":{
157        "DirOrFile":"/data/hisi_logs/",
158        "Subcatalog":"\\d{14}-\\d{8}/cp_log/reset.log",
159        "featureId":"03_MODEMCRASH_00,03_MODEM_REBOOTSYS_00",
160        "rules":[
161            {"namespace":"BasicParam", "matchKey":"brief:", "v_first":"brief:(.*)"},
162            {"namespace":"BasicParam", "matchKey":"task_name:", "v_second":"task_name:(.*)"},
163            {"namespace":"BasicParam", "matchKey":"modid:", "v_last":"modid:(.*)"}
164        ]
165    },
166    "Rule15":{
167        "DirOrFile":"/data/hisi_logs/",
168        "Subcatalog":"\\d{14}-\\d{8}/ap_log/dmesg-ramoops-0",
169        "featureId":"04_PANIC_00",
170        "rules":[
171            {"namespace":"BasicParam", "matchKey":"qtp_rsp", "v_cause":"dfx_qic\\]:(.*)", "v_last":"(qtp_rsp.*)"},
172            {"namespace":"BasicParam", "depend":"BasicParam.v_cause","matchKey":"MID(Master id)", "v_first":"(MID\\(Master id\\).*)"},
173            {"namespace":"BasicParam", "depend":"BasicParam.v_cause","matchKey":"qic_addr", "v_second":"(qic_addr.*)"}
174        ]
175    },
176    "Rule16":{
177        "DirOrFile":"/data/log/faultlog/faultlogger/",
178        "Subcatalog":"syswarning-.*-\\d+-\\d+",
179        "featureId":"63_SYS_WARNING_01",
180        "rules":[
181            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)"},
182            {"namespace":"BasicParam", "matchKey":"PID = ", "v_pid":"PID = (.*)"},
183            {"namespace":"BasicParam", "matchKey":"TID = ", "v_tid":"TID = (.*)"},
184            {"namespace":"BasicParam", "matchKey":"timeout: ", "v_timeout":"timeout: (.*)"},
185            {"namespace":"MainCallTrace", "matchKey":"@R@(Tid:){1}@{BasicParam.v_tid}@", "v_trace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)"}
186        ]
187    }
188}
189