CHEN Gang
a9e36bdb4e
tools: acrn-crashlog: add service/config files and scripts
...
This patch adds the service files, config files and script
to run automatically at boot. And it adds install/uninstall
part in Makefile. Compatiblity code for libsystemd.so and
libsystemd-journal.so is added in Makefile also.
Signed-off-by: Jin Zhi <zhi.jin@intel.com >
Signed-off-by: CHEN Gang <gang.c.chen@intel.com >
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com >
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com >
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com >
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com >
Acked-by: Eddie Dong <Eddie.dong@intel.com >
2018-05-23 17:10:51 +08:00
CHEN Gang
d4b4c03cde
tools: acrn-crashlog: version control patch for binaries
...
This patch is the version control patch for the binaries
of acrn-crashlog.
Signed-off-by: CHEN Gang <gang.c.chen@intel.com >
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com >
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com >
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com >
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com >
Acked-by: Eddie Dong <Eddie.dong@intel.com >
2018-05-23 17:10:51 +08:00
Liu Xinwu
c1f2ba31b6
tools: acrn-crashlog: crash reclassify operations for acrnprobe
...
Reclassify an event according to its trigger file's content.
Signed-off-by: Liu Xinwu <xinwu.liu@intel.com >
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com >
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com >
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com >
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com >
Acked-by: Eddie Dong <Eddie.dong@intel.com >
2018-05-23 17:10:51 +08:00
Liu Xinwu
168d3ead00
tools: acrn-crashlog: add sender telemd for acrnprobe
...
Sender telemd is responsible for sending log records to the
telemetrics client.
Signed-off-by: Liu Xinwu <xinwu.liu@intel.com >
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com >
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com >
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com >
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com >
Acked-by: Eddie Dong <Eddie.dong@intel.com >
2018-05-23 17:10:51 +08:00
Liu Xinwu
f83bd81645
tools: acrn-crashlog: sender module for acrnprobe
...
The sender corresponds to an exit of event.
Crashlog is responsible for collecting logs and save them locally.
Signed-off-by: Liu Xinwu <xinwu.liu@intel.com >
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com >
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com >
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com >
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com >
Acked-by: Eddie Dong <Eddie.dong@intel.com >
2018-05-23 17:10:51 +08:00
Liu Xinwu
f4b2c24380
tools: acrn-crashlog: android events module for acrnprobe
...
Sync events detected by android crashlog.
In android system, android crashlog is a log collection mechanism,
it will generate a history_event file to record android system events.
Acrnprobe will detect these events by scanning android history_event file.
This module mainly contains two functions:
1. setup loop device for android.img.
2. detect new event occursing in android.
Signed-off-by: Liu Xinwu <xinwu.liu@intel.com >
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com >
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com >
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com >
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com >
Acked-by: Eddie Dong <Eddie.dong@intel.com >
2018-05-23 17:10:51 +08:00
Liu Xinwu
2cea6129eb
tools: acrn-crashlog: interfaces to control history_event in acrnprobe
...
"history_event" is the file to manage all evebts collected by
acrnprobe. This patch provides the operation APIs for this file in a
fixed format.
Signed-off-by: Liu Xinwu <xinwu.liu@intel.com >
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com >
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com >
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com >
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com >
Acked-by: Eddie Dong <Eddie.dong@intel.com >
2018-05-23 17:10:51 +08:00
Liu Xinwu
384c195faa
tools: acrn-crashlog: event handler thread for acrnprobe
...
Event handler is the thread to handle events detected by channel.
It's awakened by a enqueued event.
Signed-off-by: Liu Xinwu <xinwu.liu@intel.com >
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com >
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com >
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com >
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com >
Acked-by: Eddie Dong <Eddie.dong@intel.com >
2018-05-23 17:10:51 +08:00
Liu Xinwu
9caa5d72cf
tools: acrn-crashlog: channel module for acrnprobe
...
The channel represents a way of detecting the system's events.
So far, there are 3 channels:
1. oneshot, detect once while acrnprobe startup.
2. polling, run a detecting job with fixed time interval.
3. inotify, watch the change of file or dir.
Signed-off-by: Liu Xinwu <xinwu.liu@intel.com >
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com >
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com >
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com >
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com >
Acked-by: Eddie Dong <Eddie.dong@intel.com >
2018-05-23 17:10:51 +08:00
Liu Xinwu
95d6a57358
tools: acrn-crashlog: probe utils for acrnprobe
...
This patch provides some utils for acrnprobe.
Signed-off-by: Liu Xinwu <xinwu.liu@intel.com >
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com >
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com >
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com >
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com >
Acked-by: Eddie Dong <Eddie.dong@intel.com >
2018-05-23 17:10:51 +08:00
Liu Xinwu
50e62d900f
tools: acrn-crashlog: system properties for acrnprobe
...
Acrnprobe needs to know some HW/SW properties, such as board version,
build version. These properties APIs are provided in this file.
Signed-off-by: Liu Xinwu <xinwu.liu@intel.com >
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com >
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com >
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com >
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com >
Acked-by: Eddie Dong <Eddie.dong@intel.com >
2018-05-23 17:10:51 +08:00
Liu Xinwu
f1a557aeaa
tools: acrn-crashlog: get startup reason of system for acrnprobe
...
This file provides the functions to get system reboot reason from
kernel command line.
Signed-off-by: Liu Xinwu <xinwu.liu@intel.com >
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com >
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com >
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com >
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com >
Acked-by: Eddie Dong <Eddie.dong@intel.com >
2018-05-23 17:10:51 +08:00
Liu Xinwu
bc18f1d65f
tools: acrn-crashlog: event queue operations for acrnprobe
...
There is a global queue to receive all events detected. Genarally,
events are enqueued in channel, and dequeued in event handler.
Signed-off-by: Liu Xinwu <xinwu.liu@intel.com >
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com >
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com >
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com >
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com >
Acked-by: Eddie Dong <Eddie.dong@intel.com >
2018-05-23 17:10:51 +08:00
Liu Xinwu
a35ef1aa90
tools: acrn-crashlog: configuration module of acrnprobe
...
To show the relationship between configuration items more clearly,
acrnprobe chose xml as its configuration file format.
This file provides functions to parse configuration and load them
into global variable conf.
Signed-off-by: Liu Xinwu <xinwu.liu@intel.com >
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com >
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com >
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com >
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com >
Acked-by: Eddie Dong <Eddie.dong@intel.com >
2018-05-23 17:10:51 +08:00
Liu Xinwu
e86da09974
tools: acrn-crashlog: main thread of acrn-crashlog/acrnprobe
...
This patch implements the main thread of acrnprobe.
As a log collection mechanism to record critical events on the
platform, acrnprobe provides the following features:
1. detect event.
2. analyze event and determine the event type.
3. collect information for the detected events.
4. archive these information as logs, and generate records.
Signed-off-by: Liu Xinwu <xinwu.liu@intel.com >
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com >
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com >
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com >
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com >
Acked-by: Eddie Dong <Eddie.dong@intel.com >
2018-05-23 17:10:51 +08:00
Liu Xinwu
6f9dfa49bf
tools: acrn-crashlog: framework of acrn-crashlog
...
This is the first patch of acrn-crashlog.
This patch initializes the framework of acrn-crashlog: acrnprobe,
common, data, and usercrash. And it initializes the Makefile for
each part.
Signed-off-by: Liu Xinwu <xinwu.liu@intel.com >
Signed-off-by: CHEN Gang <gang.c.chen@intel.com >
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com >
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com >
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com >
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com >
Acked-by: Eddie Dong <Eddie.dong@intel.com >
2018-05-23 17:10:51 +08:00