OpenHarmony3.1Release系统信息导出工具hidumper 原创 精华
民之码农
发布于 2022-4-7 09:51
浏览
6收藏
@[toc](OpenHarmony 3.1 Release版本新组件功能
一、Hidumper简介
HiDumper是OpenHarmony中为开发、测试人员,IDE工具提供统一的系统信息获取工具,帮助使用者分析,定位问题。
二、Hidumper设计原理和架构图
三、Hidumper使用方法
# hidumper -h
usage:
-h |help text for the tool
-t [timeout] |timeout period in seconds (0 for no timeout)
-lc |a list of system information clusters
-ls |a list of system abilities
-c |all system information clusters
-c [base system] |system information clusters labeled "base" and "system"
-s |all system abilities
-s [SA0 SA1] |system abilities labeled "SA0" and "SA1"
-s [SA] -a ['-h'] |system ability labeled "SA" with arguments "-h" specified
-e |faultlogs of crash history
--net |dump network information
--storage |dump storage information
-p |processes information, include list and infromation of processes and threads
-p [pid] |dump threads under pid, includes smap, block channel, execute time, mountinfo
--cpuusage [pid] |dump cpu usage by processes and category; if PID is specified, dump category usage of specified pid
--cpufreq |dump real CPU frequency of each core
--mem [pid] |dump memory usage of total; dump memory usage of specified pid if pid was specified
--zip |compress output to /data/dumper
例如使用hidumper命令就可以将导出系统信息直接打印在终端,
执行如下命令:
# hidumper --zip
100%,[-],The result is:/data/dumper/20091020-063620-502.zip
将导出的所有信息数据压缩成zip包
四、hidumper使用示例
1.下载压缩包数据
hdc file recv /data/dumper/20091020-063620-502.zip %cd%
2.直接打开如下图
需要使用解压工具 使用提取功能
3.数据类型如下
每个核的cpu的频率
-------------------------------[cpufreq]-------------------------------
cmd is: cat /sys/devices/system/cpu/cpu5/cpufreq/cpuinfo_cur_freq
cpuusage:
-------------------------------[cpuusage]-------------------------------
Load average: 0.21 / 0.13 / 0.10; the cpu load average in 1 min, 5 min and 15 min
CPU usage from 2009-10-20 06:36:20 to 2009-10-20 06:36:21
Total: 11%; User Space: 0%; Kernel Space: 11%; iowait: 0%; irq: 0%; idle: 87%
Details of Processes:
PID Total Usage User Space Kernel Space Page Fault Minor Page Fault Major Name
181 13% 0% 13% 0 0 sugov:2
具体涉及到cpufreq、cpuusage、memory、storage、net、ability、base、system、processes、faultlog、kernel、hilog、stack
-------------------------------[cpufreq]-------------------------------
-------------------------------[cpuusage]-------------------------------
-------------------------------[memory]-------------------------------
-------------------------------[storage]-------------------------------
-------------------------------[net]-------------------------------
-------------------------------[ability]-------------------------------
-------------------------------[base]-------------------------------
-------------------------------[system]-------------------------------
-------------------------------[processes]-------------------------------
-------------------------------[faultlog]-------------------------------
-------------------------------[kernel]-------------------------------
-------------------------------[hilog]-------------------------------
-------------------------------[stack]-------------------------------
从如上的导出的信息可以看出可以分析定位系统的故障异常问题,但是信息量巨大,需要学习各种信息分析的能力。
©著作权归作者所有,如需转载,请注明出处,否则将追究法律责任
已于2022-4-7 11:56:15修改
赞
6
收藏 6
回复
相关推荐
感谢分享工具,OpenHarmony也是越来越壮大了
很清晰,感谢分享解析