2018-05-25 04:21:16 +08:00
`` acrnlog ``
===========
2018-03-29 16:17:45 +08:00
DESCRIPTION
###########
2018-05-25 04:21:16 +08:00
`` acrnlog `` is a userland tool to capture ACRN hypervisor log, it runs as an
2018-03-29 16:17:45 +08:00
SOS service at boot. It captures two kinds of logs:
2018-05-25 04:21:16 +08:00
- log of current running;
- log of last running if crashed and logs remaining.
The path to save log files is `` /tmp/acrnog/ `` , so the log files would be lost
2018-03-29 16:17:45 +08:00
after reset.
USAGE
#####
2018-05-25 04:21:16 +08:00
The `` acrnlog `` tool is launched as a service at boot, with 4 1MB log files limited.
2018-03-29 16:17:45 +08:00
To change the log file limitation:
2018-05-25 04:21:16 +08:00
- temporary change:
Stop the `` acrnlog `` service:
::
2018-03-29 16:17:45 +08:00
# systemctl disable acrnlog
2018-05-25 04:21:16 +08:00
Restart `` acrnlog `` running in backgroud with size and number of files.
2018-03-29 16:17:45 +08:00
For example:
2018-05-25 04:21:16 +08:00
::
2018-03-29 16:17:45 +08:00
# acrnlog -n 8 -s 4 &
2018-05-25 04:21:16 +08:00
Use `` get_loglevel `` /`` set_loglevel `` to query and change the hypervisor loglevel.
The `` mem_loglevel `` controls log to be saved using `` acrnlog `` , while
`` console_loglevel `` controls log to output to console. For example:
::
2018-03-29 16:17:45 +08:00
2018-05-25 04:21:16 +08:00
ACRN:\>get_loglevel
console_loglevel: 2, mem_loglevel: 4
ACRN:\>set_loglevel 2 5
ACRN:\>get_loglevel
console_loglevel: 2, mem_loglevel: 5
2018-03-29 16:17:45 +08:00
2018-05-25 04:21:16 +08:00
- permanent change:
Edit `` /usr/lib/systemd/system/acrnlog.service `` to attached the `` -n `` and `` -s `` options to the `` ExecStart `` cmd, and restart the service. For example:
2018-03-29 16:17:45 +08:00
2018-05-25 04:21:16 +08:00
::
ExecStart=/usr/bin/acrnlog -n 8 -s 4
BUILD & INSTALL
2018-03-29 16:17:45 +08:00
##################
2018-05-25 04:21:16 +08:00
::
2018-03-29 16:17:45 +08:00
# make
2018-05-25 04:21:16 +08:00
copy acrnlog to `` /usr/bin/ `` and copy `` acrnlog.service `` to `` /usr/lib/systemd/system/ ``