fix acrntrace README

fix acrnlog README

Fix acrn-manager README

Signed-off-by: T <shrmrf@users.noreply.github.com>
This commit is contained in:
Taimoor 2018-05-24 22:21:16 +02:00 committed by David Kinder
parent d57ced490b
commit f4b9412013
3 changed files with 156 additions and 72 deletions

View File

@ -1,54 +1,98 @@
acrnctl ``acrnctl``
####### ===========
DESCRIPTION DESCRIPTION
########### ___________
acrnctl: The acrnctl can help user to create, delete, launch and stop UOSs.
It runs under Service OS, and UOSs should be based on acrn-dm ``acrnctl``: The ``acrnctl`` tool can help user create, delete, launch and stop UOSs.
It runs under Service OS, and UOSs should be based on ``acrn-dm``
USAGE USAGE
##### _____
To see what it can do, just run: To see what it can do, just run:
# acrnctl
::
# acrnctl
or or
# acrnctl help
::
# acrnctl help
you may see: you may see:
support:
list ::
start
stop support:
del list
add start
Use acrnctl [cmd] help for details stop
del
add
Use acrnctl [cmd] help for details
There are examples: There are examples:
(1) add a VM (1) add a VM
Each time you can just add one VM. Suppose you have an UOS Each time you can just add one VM. Suppose you have an UOS
launch script, such as launch_UOS.sh launch script, such as launch_UOS.sh
you can run: you can run:
# acrnctl add launch_UOS.sh -U 1
vm1-14:59:30 added ::
Note that, launch script shoud be able to launch ONE UOS. If
it fail, it is better to print some error logs, to tell user # acrnctl add launch_UOS.sh -U 1
the reason, so that he knows how to solve it. vm1-14:59:30 added
The vmname is important, the acrnctl searchs VMs by their
names. so duplicated VM names are not allowed. Beside, if the Note that, launch script shoud be able to launch ONE UOS. If
launch script changes VM name at launch time, acrnctl will it fail, it is better to print some error logs, to tell user
not recgonize it. the reason, so that he knows how to solve it.
The vmname is important, the acrnctl searchs VMs by their
names. so duplicated VM names are not allowed. Beside, if the
launch script changes VM name at launch time, acrnctl will
not recgonize it.
(2) delete VMs (2) delete VMs
# acrnctl del vm1-14:59:30
::
# acrnctl del vm1-14:59:30
(3) show VMs (3) show VMs
# acrnctl list
vm1-14:59:30 untracked ::
vm-yocto stop
vm-android stop # acrnctl list
vm1-14:59:30 untracked
vm-yocto stop
vm-android stop
(4) start VM (4) start VM
you can start a vm with 'stop' status, each time can start you can start a vm with 'stop' status, each time can start
one VM. one VM.
# acrnctl start vm-yocto
::
# acrnctl start vm-yocto
(5) stop VM (5) stop VM
you can stop VMs, if their status is not 'stop' you can stop VMs, if their status is not 'stop'
# acrnctl stop vm-yocto vm1-14:59:30 vm-android
::
# acrnctl stop vm-yocto vm1-14:59:30 vm-android
BUILD BUILD
##### _____
# make
::
# make

View File

@ -1,47 +1,63 @@
ACRNLOG ``acrnlog``
####### ===========
DESCRIPTION DESCRIPTION
########### ###########
acrnlog is a userland tool to capture ACRN hypervisor log, it runs as an ``acrnlog`` is a userland tool to capture ACRN hypervisor log, it runs as an
SOS service at boot. It captures two kinds of logs: SOS service at boot. It captures two kinds of logs:
- 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 - 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
after reset. after reset.
USAGE USAGE
##### #####
The acrnlog tool is launched as a service at boot, with 4 1MB log files limited. The ``acrnlog`` tool is launched as a service at boot, with 4 1MB log files limited.
To change the log file limitation: To change the log file limitation:
- temporary change - temporary change:
Stop the acrnlog service: Stop the ``acrnlog`` service:
::
# systemctl disable acrnlog # systemctl disable acrnlog
Restart acrnlog running at backgroud with size and number of files. Restart ``acrnlog`` running in backgroud with size and number of files.
For example: For example:
::
# acrnlog -n 8 -s 4 & # acrnlog -n 8 -s 4 &
Use get_loglevel/set_loglevel to query and change the hypervisor loglevel. 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 chagne The ``mem_loglevel`` controls log to be saved using ``acrnlog``, while
Edit /usr/lib/systemd/system/acrnlog.service to attached the -n and -s options to ``console_loglevel`` controls log to output to console. For example:
the ExecStart cmd, and restart the service. For example:
ExecStart=/usr/bin/acrnlog -n 8 -s 4 ::
BUILD&INSTALLATION 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
BUILD & INSTALL
################## ##################
::
# make # make
copy acrnlog to /usr/bin/ and copy acrnlog.service to /usr/lib/systemd/system/
copy acrnlog to ``/usr/bin/`` and copy ``acrnlog.service`` to ``/usr/lib/systemd/system/``

View File

@ -1,31 +1,52 @@
acrntrace ``acrntrace``
######### ==============
DESCRIPTION DESCRIPTION
########### ###########
acrntrace: is a tool running on SOS, to capture trace data.
``acrntrace``: is a tool running on SOS, to capture trace data.
scripts directory includes scripts to analyze the trace data. scripts directory includes scripts to analyze the trace data.
USAGE USAGE
##### #####
Capture trace data on SOS Capture trace data on SOS
1) Launch acrntrace 1) Launch ``acrntrace``
Capture buffered trace data:
Capture buffered trace data:
::
# acrntrace # acrntrace
or clear buffer before tracing start:
or clear buffer before tracing start:
::
# acrntrace -c # acrntrace -c
Trace files are created under /tmp/acrntrace/, directory name with time
string eg: 20171115-101605 Trace files are created under ``/tmp/acrntrace/``, directory name with time string eg: ``20171115-101605``
2) To stop acrntrace
2) To stop acrntrace
::
# q <enter> # q <enter>
3) Copy the trace data to linux pc
# scp -r /tmp/acrntrace/20171115-101605/ xxx@10.239.142.239:/home/xxxx/t
race_data
Analyze the trace data on Linux PC 3) Copy the trace data to linux pc
::
# scp -r /tmp/acrntrace/20171115-101605/ xxx@10.239.142.239:/home/xxxx/trace_data
**Analyze the trace data on Linux PC**
1) Run the python script to analyze the ``vm_exits``:
::
1) Run the python script to analyze the vm_exits:
# acrnalyze.py -i /home/xxxx/trace_data/20171115-101605/0 -o /home/xxxx/trac # acrnalyze.py -i /home/xxxx/trace_data/20171115-101605/0 -o /home/xxxx/trac
e_data/20171115-101605/cpu0 --vm_exit e_data/20171115-101605/cpu0 --vm_exit
- "--vm_exit" specify the analysis to do, currently, only vm_exit analysis - "--vm_exit" specify the analysis to do, currently, only vm_exit analysis
@ -42,8 +63,11 @@ Analyze the trace data on Linux PC
-o, --ofile=[string]: output file -o, --ofile=[string]: output file
--vm_exit: to generate vm_exit report --vm_exit: to generate vm_exit report
The scripts require bash and python2. The scripts require bash and python2.
BUILD BUILD
##### #####
::
# make # make