鸿蒙OpenHarmony开发中的知识: DFX工具—HiDumper

简介

HiDumper是OpenHarmony中为开发、测试人员,IDE工具提供统一的系统信息获取工具,帮助使用者分析,定位问题。

HiDumper主要包括以下几个主要模块:

  • hidumper:可执行程序,工具入口,在板上可通过hidumper执行对应命令
  • hidumperclient:动态库,提供framework层接口
  • lib_dump_usage:动态库,提供framework层功能实现
  • hidumperservice:动态库,sa服务,提供service层功能实现

结构分析

.
├── BUILD.gn
├── bundle.json
├── client
│   └── native
│       ├── dump_client_main.cpp	
│       └── main.cpp				//可执行文件入口
├── figures
├── frameworks						//框架实现
│   └── native
│       ├── BUILD.gn
│       ├── common.h
│       ├── dump_controller.h
│       ├── dump_utils.cpp
│       ├── dump_utils.h
│       ├── include
│       └── src
├── hidumper.gni
├── interfaces
│   ├── innerkits
│   │   ├── BUILD.gn
│   │   ├── dump_usage.cpp
│   │   └── include
│   └── native
│       └── innerkits
├── LICENSE
├── OAT.xml
├── README.md
├── README_zh.md
├── sa_profile
├── services						//服务实现
│   ├── BUILD.gn
│   ├── hidumper.map
│   ├── native
│   │   ├── etc
│   │   ├── include
│   │   └── src
│   └── zidl
│       ├── include
│       └── src
├── test
└── utils
  • usage
        "usage:\n"
        "  -h                          |help text for the tool\n"
        "  -lc                         |a list of system information clusters\n"
        "  -ls                         |a list of system abilities\n"
        "  -c                          |all system information clusters\n"
        "  -c [base system]            |system information clusters labeled \"base\" and \"system\"\n"
        "  -s                          |all system abilities\n"
        "  -s [SA0 SA1]                |system abilities labeled \"SA0\" and \"SA1\"\n"
        "  -s [SA] -a ['-h']           |system ability labeled \"SA\" with arguments \"-h\" specified\n"
        "  -e                          |faultlogs of crash history\n"
        "  --net                       |dump network information\n"
        "  --storage                   |dump storage information\n"
        "  -p                          |processes information, include list and infromation of processes"
        " and threads\n"
        "  -p [pid]                    |dump threads under pid, includes smap, block channel,"
        " execute time, mountinfo\n"
        "  --cpuusage [pid]            |dump cpu usage by processes and category; if PID is specified,"
        " dump category usage of specified pid\n"
        "  --cpufreq                   |dump real CPU frequency of each core\n"
        "  --mem [pid]                 |dump memory usage of total; dump memory usage of specified"
        " pid if pid was specified\n"
        "  --zip                       |compress output to /data/log/hidumper\n";

如上,我们可以看出hidumper能查看几乎OpenHarmony里内的所有信息,比如:

  • 查看系统ability信息,其中也包括HiDumperService
# hidumper -ls
System ability list:
RenderService                    AbilityManagerService            DataObserverMgr
UriPermissionMgr                 AccountMgr                       BundleMgr
FormMgr                          ApplicationManagerService        Installd
AccessibilityManagerService      UserIdmService                   UserAuthService
AuthExecutorMgrService           PinAuthService                   FaceAuthService
WifiDev
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值