2018-05-25 04:21:16 +08:00
|
|
|
``acrntrace``
|
|
|
|
==============
|
2018-03-29 14:11:04 +08:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
###########
|
2018-05-25 04:21:16 +08:00
|
|
|
|
|
|
|
``acrntrace``: is a tool running on SOS, to capture trace data.
|
2018-03-29 14:11:04 +08:00
|
|
|
scripts directory includes scripts to analyze the trace data.
|
|
|
|
|
|
|
|
USAGE
|
|
|
|
#####
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-03-29 14:11:04 +08:00
|
|
|
Capture trace data on SOS
|
|
|
|
|
2018-05-25 04:21:16 +08:00
|
|
|
1) Launch ``acrntrace``
|
|
|
|
|
|
|
|
Capture buffered trace data:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2018-03-29 14:11:04 +08:00
|
|
|
# acrntrace
|
2018-05-25 04:21:16 +08:00
|
|
|
|
|
|
|
or clear buffer before tracing start:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2018-03-29 14:11:04 +08:00
|
|
|
# acrntrace -c
|
2018-05-25 04:21:16 +08:00
|
|
|
|
|
|
|
Trace files are created under ``/tmp/acrntrace/``, directory name with time string eg: ``20171115-101605``
|
|
|
|
|
|
|
|
2) To stop acrntrace
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2018-03-29 14:11:04 +08:00
|
|
|
# q <enter>
|
|
|
|
|
2018-05-25 04:21:16 +08:00
|
|
|
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``:
|
|
|
|
|
|
|
|
::
|
2018-03-29 14:11:04 +08:00
|
|
|
|
|
|
|
# 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
|
|
|
|
is supported.
|
|
|
|
- A preprocess would be taken out to make the trace data start and end with
|
|
|
|
an VM_ENTER, and a copy of original data file is saved with suffix ".orig";
|
|
|
|
- Analysis report would be given on the std output and in a csv file with
|
|
|
|
name specified via "-o outpu_file";
|
|
|
|
Script usage:
|
|
|
|
[Usage] acrnalyze.py [options] [value] ...
|
|
|
|
[options]
|
|
|
|
-h: print this message
|
|
|
|
-i, --ifile=[string]: input file
|
|
|
|
-o, --ofile=[string]: output file
|
|
|
|
--vm_exit: to generate vm_exit report
|
|
|
|
|
2018-05-25 04:21:16 +08:00
|
|
|
The scripts require bash and python2.
|
2018-03-29 14:11:04 +08:00
|
|
|
|
|
|
|
BUILD
|
|
|
|
#####
|
2018-05-25 04:21:16 +08:00
|
|
|
|
|
|
|
::
|
|
|
|
|
2018-03-29 14:11:04 +08:00
|
|
|
# make
|