diff --git a/misc/debug_tools/acrn_crashlog/data/acrnprobe.xml b/misc/debug_tools/acrn_crashlog/data/acrnprobe.xml index 1fb16d534..3e8ae16bb 100644 --- a/misc/debug_tools/acrn_crashlog/data/acrnprobe.xml +++ b/misc/debug_tools/acrn_crashlog/data/acrnprobe.xml @@ -48,7 +48,7 @@ t_acrnlog_last file - /tmp/acrnlog/acrnlog_last.[*] + /var/log/acrnlog/acrnlog_last.[*] @@ -89,13 +89,13 @@ acrnlog_cur file - /tmp/acrnlog/acrnlog_cur.[-1] + /var/log/acrnlog/acrnlog_cur.[-1] 500 acrnlog_last file - /tmp/acrnlog/acrnlog_last.[*] + /var/log/acrnlog/acrnlog_last.[*] diff --git a/misc/debug_tools/acrn_log/README.rst b/misc/debug_tools/acrn_log/README.rst index c4ebec439..414447444 100644 --- a/misc/debug_tools/acrn_log/README.rst +++ b/misc/debug_tools/acrn_log/README.rst @@ -12,7 +12,7 @@ as a Service VM service at boot, capturing two kinds of logs: - log of the running hypervisor - log of the last running hypervisor if it crashed and the logs remain -Log files are saved in ``/tmp/acrnlog/``, so the log files would be lost +Log files are saved in ``/var/log/acrnlog/``, so the log files would be lost after a system reset. Usage diff --git a/misc/debug_tools/acrn_log/acrnlog.c b/misc/debug_tools/acrn_log/acrnlog.c index f8ecc31b2..9e60c02da 100644 --- a/misc/debug_tools/acrn_log/acrnlog.c +++ b/misc/debug_tools/acrn_log/acrnlog.c @@ -43,7 +43,7 @@ struct hvlog_file { }; static struct hvlog_file cur_log = { - .path = "/tmp/acrnlog/acrnlog_cur", + .path = "/var/log/acrnlog/acrnlog_cur", .fd = -1, .left_space = 0, .index = ~0, @@ -51,7 +51,7 @@ static struct hvlog_file cur_log = { }; static struct hvlog_file last_log = { - .path = "/tmp/acrnlog/acrnlog_last", + .path = "/var/log/acrnlog/acrnlog_last", .fd = -1, .left_space = 0, .index = ~0, @@ -433,7 +433,7 @@ static void display_usage(void) "\t-s: size limitation for each log file, in MB.\n" "\t 0 means no limitation.\n" "\t-n: how many files you would like to keep on disk\n" - "[Output] capatured log files under /tmp/acrnlog/\n"); + "[Output] capatured log files under /var/log/acrnlog/\n"); } static int parse_opt(int argc, char *argv[]) @@ -495,9 +495,9 @@ int main(int argc, char *argv[]) if (parse_opt(argc, argv)) return -1; - ret = mk_dir("/tmp/acrnlog"); + ret = mk_dir("/var/log/acrnlog"); if (ret) { - printf("Cannot create /tmp/acrnlog. Error: %s\n", + printf("Cannot create /var/log/acrnlog. Error: %s\n", strerror(errno)); return ret; }