Skip to content

Commit 2f8c31f

Browse files
chengangcdbkinder
authored andcommitted
tools: acrn-crashlog: update the documents
This patch updates the documents according to the latest implementation of crashlogctl. Tracked-On: #1024 Signed-off-by: CHEN Gang <gang.c.chen@intel.com> Reviewed-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> Reviewed-by: Zhi Jin <zhi.jin@intel.com>
1 parent 655132f commit 2f8c31f

File tree

2 files changed

+103
-20
lines changed

2 files changed

+103
-20
lines changed

tools/acrn-crashlog/README.rst

Lines changed: 97 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ ACRN-Crashlog
44
Introduction
55
************
66

7-
``ACRN-Crashlog`` is a joint name for the tools (``acrnprobe``,
8-
``usercrash_s``, ``usercrash_c``, ``debugger``, and more). Together
9-
these tools collect logs and information after each crash or event on an
10-
ACRN platform, including the hypervisor, Service OS (SOS), and Android
11-
as a Guest (AaaG). ``ACRN-Crashlog`` provides a flexible way to
12-
configure which events are of interest, by using an XML configuration
13-
file.
7+
``ACRN-Crashlog`` is a collective name for various tools (``acrnprobe``,
8+
``usercrash_s``, ``usercrash_c``, ``debugger``, and more) and a overall
9+
control utility called ``crashlogctl``. Together these tools collect logs
10+
and information after each crash or event on an ACRN platform, including
11+
the hypervisor, Service OS (SOS), and Android as a Guest (AaaG).
12+
``ACRN-Crashlog`` provides a flexible way to configure which events are
13+
of interest, by using an XML configuration file.
1414

1515
Building
1616
********
@@ -61,6 +61,96 @@ To install the build:
6161
$ cd acrn-crashlog
6262
$ sudo make install
6363
64+
Enabling/Disabling
65+
******************
66+
67+
To enable this tool:
68+
69+
.. code-block:: none
70+
71+
$ sudo crashlogctl enable
72+
73+
Then it will show:
74+
75+
.. code-block:: console
76+
77+
... Backup core pattern to /var/log/crashlog/default_core_pattern
78+
'/usr/share/defaults/telemetrics/telemetrics.conf' ->
79+
'/etc/telemetrics/telemetrics.conf'
80+
... Set server_delivery_enabled=false in /etc/telemetrics/telemetrics.conf
81+
... Set record_retention_enabled=true in /etc/telemetrics/telemetrics.conf
82+
'/usr/share/acrn/crashlog/40-watchdog.conf' ->
83+
'/etc/systemd/system.conf.d/40-watchdog.conf'
84+
'/usr/share/acrn/crashlog/80-coredump.conf' ->
85+
'/etc/sysctl.d/80-coredump.conf'
86+
Created symlink /etc/systemd/system/hprobe.timer → /dev/null.
87+
Created symlink /etc/systemd/system/telemd-update-trigger.service →
88+
/dev/null.
89+
Created symlink /etc/systemd/system/pstore-clean.service → /dev/null.
90+
Created symlink /etc/systemd/system/pstore-probe.service → /dev/null.
91+
Created symlink /etc/systemd/system/oops-probe.service → /dev/null.
92+
Created symlink /etc/systemd/system/klogscanner.service → /dev/null.
93+
Created symlink /etc/systemd/system/journal-probe.service → /dev/null.
94+
Created symlink /etc/systemd/system/bert-probe.service → /dev/null.
95+
Created symlink /etc/systemd/system/multi-user.target.wants/acrnprobe.service
96+
→ /usr/lib/systemd/system/acrnprobe.service.
97+
Created symlink /etc/systemd/system/multi-user.target.wants/usercrash.service
98+
→ /usr/lib/systemd/system/usercrash.service.
99+
*** Please reboot your system. ***
100+
101+
Follow the hints to reboot the system:
102+
103+
.. code-block:: none
104+
105+
$ sudo reboot
106+
107+
To disable this tool:
108+
109+
.. code-block:: none
110+
111+
$ sudo crashlogctl disable
112+
113+
Then it will show:
114+
115+
.. code-block:: console
116+
117+
Removed /etc/systemd/system/multi-user.target.wants/acrnprobe.service.
118+
Removed /etc/systemd/system/multi-user.target.wants/usercrash.service.
119+
Removed /etc/systemd/system/hprobe.timer.
120+
Removed /etc/systemd/system/telemd-update-trigger.service.
121+
Removed /etc/systemd/system/pstore-clean.service.
122+
Removed /etc/systemd/system/pstore-probe.service.
123+
Removed /etc/systemd/system/oops-probe.service.
124+
Removed /etc/systemd/system/klogscanner.service.
125+
Removed /etc/systemd/system/journal-probe.service.
126+
Removed /etc/systemd/system/bert-probe.service.
127+
removed '/etc/sysctl.d/80-coredump.conf'
128+
removed '/etc/systemd/system.conf.d/40-watchdog.conf'
129+
... Set server_delivery_enabled=true in /etc/telemetrics/telemetrics.conf
130+
... Set record_retention_enabled=false in /etc/telemetrics/telemetrics.conf
131+
*** Please reboot your system. ***
132+
133+
Follow the hints to reboot the system:
134+
135+
.. code-block:: none
136+
137+
$ sudo reboot
138+
139+
To check the status of this tool:
140+
141+
.. code-block:: none
142+
143+
$ sudo crashlogctl is-active
144+
145+
It will show the status of the related services like:
146+
147+
.. code-block:: console
148+
149+
telemprobd : active
150+
telempostd : active
151+
acrnprobe : inactive
152+
usercrash : inactive
153+
64154
Usage
65155
*****
66156

tools/acrn-crashlog/usercrash/README.rst

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,12 @@ The work flow diagram:
5353
Usage
5454
*****
5555

56-
- The server is launched automatically at boot, and the client is configured in
57-
``core_pattern`` or ``coredump-wrapper``. In ``prepare.service``, it will
58-
check the content of ``/proc/sys/kernel/core_pattern``. If there is
59-
``coredump-wrapper``, which means that ``core_pattern`` has been set in
60-
``systemd``, no need to do it again. Otherwise, the content should be
61-
changed by:
62-
63-
.. code-block:: none
64-
65-
$ echo "|/usr/bin/usercrash_c %p %e %s" > /proc/sys/kernel/core_pattern
66-
67-
That means client will be triggered once userspace crash occurs. Then the
68-
event will be sent to server from client.
56+
- The server is launched automatically at boot after this tool is enabled with
57+
instruction ``sudo crashlogctl enable``, and the client is configured in
58+
``usercrash-wrapper``, which is set as the app of ``core_pattern``. In
59+
``usercrash-wrapper``, it will collect and reorder the parameters of the
60+
client and default app. Once a crash occurs in user space, the client and
61+
default app will be invoked separately.
6962

7063
- The ``debugger`` is an independent tool to dump the debug information of the
7164
specific process, including backtrace, stack, opened files, registers value,

0 commit comments

Comments
 (0)