mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-04 19:17:34 +00:00
fix acrntrace README
fix acrnlog README Fix acrn-manager README Signed-off-by: T <shrmrf@users.noreply.github.com>
This commit is contained in:
parent
d57ced490b
commit
f4b9412013
@ -1,18 +1,34 @@
|
|||||||
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:
|
support:
|
||||||
list
|
list
|
||||||
start
|
start
|
||||||
@ -22,12 +38,18 @@ you may see:
|
|||||||
Use acrnctl [cmd] help for details
|
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
|
# acrnctl add launch_UOS.sh -U 1
|
||||||
vm1-14:59:30 added
|
vm1-14:59:30 added
|
||||||
|
|
||||||
Note that, launch script shoud be able to launch ONE UOS. If
|
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
|
it fail, it is better to print some error logs, to tell user
|
||||||
the reason, so that he knows how to solve it.
|
the reason, so that he knows how to solve it.
|
||||||
@ -35,20 +57,42 @@ There are examples:
|
|||||||
names. so duplicated VM names are not allowed. Beside, if the
|
names. so duplicated VM names are not allowed. Beside, if the
|
||||||
launch script changes VM name at launch time, acrnctl will
|
launch script changes VM name at launch time, acrnctl will
|
||||||
not recgonize it.
|
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
|
# acrnctl list
|
||||||
vm1-14:59:30 untracked
|
vm1-14:59:30 untracked
|
||||||
vm-yocto stop
|
vm-yocto stop
|
||||||
vm-android 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
|
||||||
|
@ -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 current running;
|
||||||
|
|
||||||
- log of last running if crashed and logs remaining.
|
- 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
|
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:
|
The ``mem_loglevel`` controls log to be saved using ``acrnlog``, while
|
||||||
|
``console_loglevel`` controls log to output to console. For example:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
ACRN:\>get_loglevel
|
ACRN:\>get_loglevel
|
||||||
console_loglevel: 2, mem_loglevel: 4
|
console_loglevel: 2, mem_loglevel: 4
|
||||||
ACRN:\>set_loglevel 2 5
|
ACRN:\>set_loglevel 2 5
|
||||||
ACRN:\>get_loglevel
|
ACRN:\>get_loglevel
|
||||||
console_loglevel: 2, mem_loglevel: 5
|
console_loglevel: 2, mem_loglevel: 5
|
||||||
|
|
||||||
- permanent chagne
|
- permanent change:
|
||||||
Edit /usr/lib/systemd/system/acrnlog.service to attached the -n and -s options to
|
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 ExecStart cmd, and restart the service. For example:
|
|
||||||
|
::
|
||||||
|
|
||||||
ExecStart=/usr/bin/acrnlog -n 8 -s 4
|
ExecStart=/usr/bin/acrnlog -n 8 -s 4
|
||||||
|
|
||||||
BUILD&INSTALLATION
|
|
||||||
|
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/``
|
||||||
|
@ -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
|
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
|
::
|
||||||
|
|
||||||
|
# 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
|
||||||
@ -46,4 +67,7 @@ Analyze the trace data on Linux PC
|
|||||||
|
|
||||||
BUILD
|
BUILD
|
||||||
#####
|
#####
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
# make
|
# make
|
||||||
|
Loading…
Reference in New Issue
Block a user