mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-05 02:40:37 +00:00
doc: fix tools docs formatting and clarity
This continues the editing from PR #276 with formatting and clarity edits to have these tool documents blend in with the rest of the ACRN documentation. It also builds on PR #307 that set up the doc build infrastructure to allow leaving these tool docs within the tools/ folder. Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This commit is contained in:
committed by
David Kinder
parent
adcfe03482
commit
50324e5876
@@ -1,63 +1,94 @@
|
||||
``acrnlog``
|
||||
===========
|
||||
.. _acrnlog:
|
||||
|
||||
DESCRIPTION
|
||||
###########
|
||||
``acrnlog`` is a userland tool to capture ACRN hypervisor log, it runs as an
|
||||
SOS service at boot. It captures two kinds of logs:
|
||||
acrnlog
|
||||
#######
|
||||
|
||||
- log of current running;
|
||||
Description
|
||||
***********
|
||||
|
||||
- log of last running if crashed and logs remaining.
|
||||
``acrnlog`` is a userland tool used to capture a ACRN hypervisor log. It runs as an
|
||||
SOS service at boot, capturing two kinds of logs:
|
||||
|
||||
The path to save log files is ``/tmp/acrnog/``, so the log files would be lost
|
||||
after reset.
|
||||
- log of the currently running hypervisor
|
||||
- log of last running hypervisor if it crashed and the logs remain.
|
||||
|
||||
USAGE
|
||||
#####
|
||||
The ``acrnlog`` tool is launched as a service at boot, with 4 1MB log files limited.
|
||||
To change the log file limitation:
|
||||
Log files are saved in ``/tmp/acrnlog/``, so the log files would be lost
|
||||
after a system reset.
|
||||
|
||||
- temporary change:
|
||||
Stop the ``acrnlog`` service:
|
||||
Usage
|
||||
*****
|
||||
|
||||
::
|
||||
|
||||
# systemctl disable acrnlog
|
||||
|
||||
Restart ``acrnlog`` running in backgroud with size and number of files.
|
||||
For example:
|
||||
|
||||
::
|
||||
|
||||
# acrnlog -n 8 -s 4 &
|
||||
|
||||
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:
|
||||
|
||||
::
|
||||
|
||||
ACRN:\>get_loglevel
|
||||
console_loglevel: 2, mem_loglevel: 4
|
||||
ACRN:\>set_loglevel 2 5
|
||||
ACRN:\>get_loglevel
|
||||
console_loglevel: 2, mem_loglevel: 5
|
||||
|
||||
- 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:
|
||||
|
||||
::
|
||||
|
||||
ExecStart=/usr/bin/acrnlog -n 8 -s 4
|
||||
The ``acrnlog`` tool is launched as a service at boot, and limited to
|
||||
supporting four 1MB log files by default. You can change this log file
|
||||
limitation temporarily or permanently.
|
||||
|
||||
|
||||
BUILD & INSTALL
|
||||
##################
|
||||
Temporary log file changes
|
||||
==========================
|
||||
|
||||
::
|
||||
You can temporarily change the log file setting by following these
|
||||
steps:
|
||||
|
||||
# make
|
||||
|
||||
copy acrnlog to ``/usr/bin/`` and copy ``acrnlog.service`` to ``/usr/lib/systemd/system/``
|
||||
1. Stop the ``acrnlog`` service:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
# systemctl disable acrnlog
|
||||
|
||||
2. Restart ``acrnlog``, running in the background, and specify the new
|
||||
number of log files and their size (in MB). For example:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
# acrnlog -n 8 -s 4 &
|
||||
|
||||
You can use ``get_loglevel`` and ``set_loglevel`` to query and change
|
||||
the hypervisor loglevel.
|
||||
|
||||
The ``mem_loglevel`` command controls the log to be saved using
|
||||
``acrnlog``, while the ``console_loglevel`` command controls the log
|
||||
output to the console. For example:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
ACRN:\>get_loglevel
|
||||
console_loglevel: 2, mem_loglevel: 4
|
||||
ACRN:\>set_loglevel 2 5
|
||||
ACRN:\>get_loglevel
|
||||
console_loglevel: 2, mem_loglevel: 5
|
||||
|
||||
Permanent log file changes
|
||||
==========================
|
||||
|
||||
You can also permanently change the log file settings by
|
||||
editing ``/usr/lib/systemd/system/acrnlog.service`` and use the ``-n``
|
||||
and ``-s`` options on the ``ExecStart`` cmd, and restart the service.
|
||||
For example, ``acrnlog.service`` could have these parameters added:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
ExecStart=/usr/bin/acrnlog -n 8 -s 4
|
||||
|
||||
and then restart the service with:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
# systemctl daemon-reload
|
||||
# systemctl restart acrnlog
|
||||
|
||||
Build and Install
|
||||
*****************
|
||||
|
||||
Source code for the ``acrnlog`` tools is in the ``tools/acrnlog``
|
||||
folder. Build and install the tools from source using:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
# make
|
||||
# make install
|
||||
|
||||
and if you changed the ``acrnlog.service`` file, install it using:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
# cp acrnlog.service /usr/lib/systemd/system/
|
||||
|
Reference in New Issue
Block a user