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
###########
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
#####
_____
To see what it can do, just run:
# acrnctl
::
# acrnctl
or
# acrnctl help
::
# acrnctl help
you may see:
support:
list
start
stop
del
add
Use acrnctl [cmd] help for details
::
support:
list
start
stop
del
add
Use acrnctl [cmd] help for details
There are examples:
(1) add a VM
Each time you can just add one VM. Suppose you have an UOS
launch script, such as launch_UOS.sh
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
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.
::
# 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
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
# acrnctl del vm1-14:59:30
::
# acrnctl del vm1-14:59:30
(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
you can start a vm with 'stop' status, each time can start
one VM.
# acrnctl start vm-yocto
::
# acrnctl start vm-yocto
(5) stop VM
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
#####
# make
_____
::
# make

View File

@ -1,47 +1,63 @@
ACRNLOG
#######
``acrnlog``
===========
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:
- 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.
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:
- temporary change
Stop the acrnlog service:
- temporary change:
Stop the ``acrnlog`` service:
::
# 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:
::
# 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
Use ``get_loglevel``/``set_loglevel`` to query and change the hypervisor loglevel.
- permanent chagne
Edit /usr/lib/systemd/system/acrnlog.service to attached the -n and -s options to
the ExecStart cmd, and restart the service. For example:
The ``mem_loglevel`` controls log to be saved using ``acrnlog``, while
``console_loglevel`` controls log to output to console. 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
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
###########
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.
USAGE
#####
Capture trace data on SOS
1) Launch acrntrace
Capture buffered trace data:
1) Launch ``acrntrace``
Capture buffered trace data:
::
# acrntrace
or clear buffer before tracing start:
or clear buffer before tracing start:
::
# acrntrace -c
Trace files are created under /tmp/acrntrace/, directory name with time
string eg: 20171115-101605
2) To stop acrntrace
Trace files are created under ``/tmp/acrntrace/``, directory name with time string eg: ``20171115-101605``
2) To stop acrntrace
::
# 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
e_data/20171115-101605/cpu0 --vm_exit
- "--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
--vm_exit: to generate vm_exit report
The scripts require bash and python2.
The scripts require bash and python2.
BUILD
#####
::
# make