diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000000000000000000000000000000000000..48500355c41a185c303f3123795d78f255e27a92 --- /dev/null +++ b/README.en.md @@ -0,0 +1,69 @@ +# OpenHarmony DFX Component Documentation + +## Introduction +This project contains DFX (Development and Fault Experience) components used for development and fault diagnosis in the OpenHarmony system. These components provide functionalities such as system debugging, logging, and crash handling, helping developers better understand and optimize system behavior. + +## Component List + +### DumpCatcher +DumpCatcher is used to capture and analyze stack information when system crashes occur. It helps developers quickly locate the root cause of issues and supports the command-line tool `processdump` to obtain stack information for specific processes. + +#### Usage Example +```bash +ps -A | grep hiview +processdump -p 114 -t 114 +``` + +### HiChecker +HiChecker provides system checking functionality and supports multiple check items, such as memory usage and CPU utilization. + +### HiCollie +HiCollie is a thread monitoring tool that can detect thread deadlocks and timeouts. + +#### Usage Example +```cpp +#include "xcollie.h" + +// Create thread deadlock monitoring +void ThreadDeadlockMonitor() { + // Developer example code +} + +// Create timeout monitoring +void TimeoutMonitor() { + // Developer example code +} +``` + +### HiDumper +HiDumper provides the capability to dump system information and supports various command parameters to obtain different types of system information. + +#### Usage Example +```bash +hidumper -s 3008 +hidumper --cpuusage 452 +hidumper --mem 452 +``` + +### HiSysEvent +HiSysEvent provides functionalities for marking and subscribing to system events and supports configuring marking information through YAML files. + +#### Usage Example +```bash +hisysevent -r +hisysevent -r -d +``` + +### HiView +HiView is a system visualization tool that supports plugin extensions and can monitor system status in real time. + +## Documentation Resources +- [DumpCatcher Documentation](dfx/dumpcatcher.md) +- [HiChecker Documentation](dfx/hichecker.md) +- [HiCollie Documentation](dfx/hicollie.md) +- [HiDumper Documentation](dfx/hidumper.md) +- [HiSysEvent Documentation](dfx/hisysevent.md) +- [HiView Documentation](dfx/hiview.md) + +## License +This project is licensed under the [Apache 2.0 License](LICENSE). \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c37cc1ed405a0529585ab399bb01713ba984554d --- /dev/null +++ b/README.md @@ -0,0 +1,69 @@ +# OpenHarmony DFX 组件文档 + +## 简介 +本项目包含 OpenHarmony 系统中用于开发和故障诊断的 DFX(Development and Fault Experience)组件。这些组件提供了系统调试、日志记录、崩溃处理等功能,帮助开发者更好地理解和优化系统行为。 + +## 组件列表 + +### DumpCatcher +DumpCatcher 用于捕获和分析系统崩溃时的堆栈信息。它可以帮助开发者快速定位问题根源,支持命令行工具 `processdump` 来获取特定进程的堆栈信息。 + +#### 使用示例 +```bash +ps -A | grep hiview +processdump -p 114 -t 114 +``` + +### HiChecker +HiChecker 提供了系统检查功能,支持多种检查项,如内存使用情况、CPU 使用率等。 + +### HiCollie +HiCollie 是一个线程监控工具,可以检测线程卡死和超时情况。 + +#### 使用示例 +```cpp +#include "xcollie.h" + +// 创建线程卡死监控 +void ThreadDeadlockMonitor() { + // 开发实例代码 +} + +// 创建超时监控 +void TimeoutMonitor() { + // 开发实例代码 +} +``` + +### HiDumper +HiDumper 提供了系统信息的 dump 功能,支持多种命令参数来获取不同类型的系统信息。 + +#### 使用示例 +```bash +hidumper -s 3008 +hidumper --cpuusage 452 +hidumper --mem 452 +``` + +### HiSysEvent +HiSysEvent 提供了系统事件的打点和订阅功能,支持通过 YAML 文件配置打点信息。 + +#### 使用示例 +```bash +hisysevent -r +hisysevent -r -d +``` + +### HiView +HiView 是一个系统可视化工具,支持插件扩展,可以实时监控系统状态。 + +## 文档资源 +- [DumpCatcher 文档](dfx/dumpcatcher.md) +- [HiChecker 文档](dfx/hichecker.md) +- [HiCollie 文档](dfx/hicollie.md) +- [HiDumper 文档](dfx/hidumper.md) +- [HiSysEvent 文档](dfx/hisysevent.md) +- [HiView 文档](dfx/hiview.md) + +## 许可证 +本项目遵循 [Apache 2.0 许可证](LICENSE)。 \ No newline at end of file