mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-09 02:24:45 +00:00
tools: acrn-crashlog: Limit the log size of kmsg
Dmesg collects too much log when kernel meets log storm. This patch reads kernel log from "/dev/kmsg" intead of dmesg and limits the generated log size. Tracked-On: #1024 Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com> Reviewed-by: Zhi Jin <zhi.jin@intel.com> Acked-by: Chen, Gang <gang.c.chen@intel.com>
This commit is contained in:
@@ -73,6 +73,7 @@ static void print(void)
|
||||
print_id_item(type, log, id);
|
||||
print_id_item(lines, log, id);
|
||||
print_id_item(path, log, id);
|
||||
print_id_item(sizelimit, log, id);
|
||||
}
|
||||
|
||||
for_each_info(id, info, conf) {
|
||||
@@ -466,6 +467,8 @@ static int parse_log(xmlNodePtr cur, struct log_t *log)
|
||||
res = load_cur_content(cur, log, path);
|
||||
else if (name_is(cur, "lines"))
|
||||
res = load_cur_content(cur, log, lines);
|
||||
else if (name_is(cur, "sizelimit"))
|
||||
res = load_cur_content(cur, log, sizelimit);
|
||||
|
||||
if (res)
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user