1# hidumper
2
3HiDumper为开发、测试人员提供统一的系统信息获取工具,可帮助使用者分析,定位问题。
4
5## 环境要求
6
7- 根据hdc命令行工具指导,完成[环境准备](hdc.md#环境准备)。
8
9- 正常连接设备。
10
11## 命令行说明
12
13| 选项 | 说明 |
14| -------- | -------- |
15| -h  | 帮助命令。 |
16| -lc | 列出系统信息集群。 |
17| -ls | 列出系统能力。 |
18| -c | 获取系统信息集群详细信息。 |
19| -c [base system] | 获取"base"或者"system"信息集群详细信息。 |
20| -s | 获取所有系统能力详细信息。 |
21| -s [SA0 SA1] | 获取一个或多个系统能力详细信息。 |
22| -s [SA] -a ["option"] | 执行单个系统能力的特定选项。SA表示系统能力名称,option表示该系统能力支持的选项。可通过 -s [SA] -a ["-h"] 获取单个系统能力支持的所有选项。|
23| -e | 获取崩溃历史记录的故障日志。 |
24| --net [pid] | 获取网络信息。如果指定了进程的pid,则只输出该进程的网络流量使用信息。 |
25| --storage [pid] | 获取存储信息。如果指定了进程的pid,则只输出该进程的io信息。 |
26| -p [pid] | 获取进程信息,包括进程和线程的列表和信息。 |
27| --cpuusage [pid] | 获取CPU使用率,按进程和类别分类;如果指定pid,则获取指定pid的CPU使用信息。 |
28| --cpufreq | 获取CPU每个核的真实频率。 |
29| --mem [pid] | 获取总内存占用率;如果指定pid,则获取指定pid的内存占用率。 |
30| --zip | 保存命令输出到/data/log/hidumper下的压缩文件。 |
31| --ipc pid/-a --start-stat/stop-stat/stat | 统计一段时间进程IPC信息,如果使用-a则统计所有进程IPC数据,--start-stat开始统计,--stat获取统计数据,--stop-stat结束统计。 |
32| --mem-smaps pid [-v] | 获取pid内存统计信息,数据来源于/proc/pid/smaps,使用-v指定更多详细信息。 (仅限制debug版本使用) |
33| --mem-jsheap pid [-T tid] [--gc] [--leakobj] | pid 必选参数。命令触发所有线程gc和快照导出。如果指定线程的tid,只触发该线程gc和快照导出;如果指定--gc,只触发gc不做快照导出;如果指定--leakobj,则获取泄露对象的列表。 |
34
35## 常用命令
36
371. 查看帮助命令。
38
39    ```
40    hidumper -h
41    ```
42
43    **使用样例:**
44
45    ```
46    $ hidumper -h
47    usage:
48    -h                          |help text for the tool
49    -lc                         |a list of system information clusters
50    -ls                         |a list of system abilities
51    -c                          |all system information clusters
52    -c [base system]            |system information clusters labeled "base" and "system"
53    -s                          |all system abilities
54    -s [SA0 SA1]                |system abilities labeled "SA0" and "SA1"
55    -s [SA] -a ['-h']           |system ability labeled "SA" with arguments "-h" specified
56    -e                          |faultlogs of crash history
57    --net [pid]                 |dump network information; if pid is specified, dump traffic usage of specified pid
58    --storage [pid]             |dump storage information; if pid is specified, dump /proc/pid/io
59    -p                          |processes information, include list and infromation of processes and threads
60    -p [pid]                    |dump threads under pid, includes smap, block channel, execute time, mountinfo
61    --cpufreq                   |dump real CPU frequency of each core
62    --mem [pid]                 |dump memory usage of total; dump memory usage of specified pid if pid was specified
63    --zip                       |compress output to /data/log/hidumper
64    --mem-smaps pid [-v]        |display statistic in /proc/pid/smaps, use -v specify more details
65    --mem-jsheap pid [-T tid] [--gc] [--leakobj]  |triggerGC, dumpHeapSnapshot and dumpLeakList under pid and tid
66    --ipc pid ARG               |ipc load statistic; pid must be specified or set to -a dump all processes. ARG must be one of --start-stat | --stop-stat | --stat
67    --cpuusage [pid]            |dump cpu usage by processes and category; if PID is specified, dump category usage of specified pid
68    ```
69
702. 列出系统信息集群。
71
72    ```
73    hidumper -lc
74    ```
75
76    **使用样例:**
77
78    ```
79    $ hidumper -lc
80    System cluster list:
81    base                             system
82    ```
83
843. 列出系统能力。
85
86    ```
87    hidumper -ls
88    ```
89
90    **使用样例:**
91
92    ```
93    $ hidumper -ls
94    System ability list:
95    SystemAbilityManager             RenderService                    AbilityManagerService
96    DataObserverMgr                  AccountMgr                       AIEngine
97    BundleMgr                        FormMgr                          ApplicationManagerService
98    AccessibilityManagerService      UserIdmService                   UserAuthService
99    AuthExecutorMgrService           PinAuthService                   FaceAuthService
100    FingerprintAuthService           WifiDevice                       WifiHotspot
101    WifiP2p                          WifiScan                         1125
102    1126                             BluetoothHost                    NetConnManager
103    NetPolicyManager                 NetStatsManager                  NetTetheringManager
104    ...
105    ```
106
1074. 获取系统信息集群详细信息。
108
109    ```
110    hidumper -c
111    ```
112
113    **使用样例:**
114
115    ```
116    $ hidumper -c
117
118    -------------------------------[base]-------------------------------
119
120    BuildId: OpenHarmony 5.0.0.37
121    RleaseType: Canary1
122    ...
123    ```
124
1255. 获取"base"或者"system"信息集群详细信息。
126
127    ```
128    hidumper -c base
129    hidumper -c system
130    ```
131
132    **使用样例:**
133
134    ```
135    $ hidumper -c base
136
137    -------------------------------[base]-------------------------------
138
139    BuildId: OpenHarmony 5.0.0.37
140    RleaseType: Canary1
141    ...
142
143    $ hidumper -c system
144
145    -------------------------------[system]-------------------------------
146
147
148    cmd is: printenv
149
150    _=/system/bin/printenv
151    LANG=en_US.UTF-8
152    HOME=/root
153    PULSE_STATE_PATH=/data/data/.pulse_dir/state
154    ...
155    ```
156
1576. 获取所有系统能力详细信息,命令格式如下:
158
159    ```
160    hidumper -s
161    ```
162
163    **使用样例:**
164
165    ```
166    $ hidumper -s
167
168    -------------------------------[ability]-------------------------------
169
170
171    ----------------------------------SystemAbilityManager----------------------------------
172    The arguments are illegal and you can enter '-h' for help.
173
174    -------------------------------[ability]-------------------------------
175
176
177    ----------------------------------RenderService----------------------------------
178    ------Graphic2D--RenderSerice ------
179    Usage:
180    h                             |help text for the tool
181    ...
182    ```
183
1847. 获取一个或多个系统能力详细信息,命令格式如下:
185
186    ```
187    hidumper -s [SA0]
188    hidumper -s [SA0] [SA1]
189    ```
190
191    **使用样例:**
192
193    ```
194    $ hidumper -s 4606
195
196    -------------------------------[ability]-------------------------------
197
198
199    ----------------------------------WindowManagerService----------------------------------
200    Usage:
201    -h                             |help text for the tool
202    -a                             |dump all window information in the system
203    -w {window id} [ArkUI Option]  |dump specified window information
204    ------------------------------------[ArkUI Option]------------------------------------
205
206    $ hidumper -s 4606 10
207
208    -------------------------------[ability]-------------------------------
209
210
211    ----------------------------------WindowManagerService----------------------------------
212    Usage:
213    -h                             |help text for the tool
214    -a                             |dump all window information in the system
215    -w {window id} [ArkUI Option]  |dump specified window information
216    ------------------------------------[ArkUI Option]------------------------------------
217
218
219    -------------------------------[ability]-------------------------------
220
221
222    ----------------------------------RenderService----------------------------------
223    ------Graphic2D--RenderSerice ------
224    Usage:
225    h                             |help text for the tool
226    screen                         |dump all screen infomation in the system
227    surface                        |dump all surface information
228    composer fps                   |dump the fps info of composer
229    ...
230    ```
231
2328. 执行单个系统能力的特定选项。
233
234    获取RenderService的使用帮助,命令格式如下:
235
236    ```
237    hidumper -s RenderService -a "h"
238    ```
239
240    **使用样例:**
241
242    ```
243    $ hidumper -s RenderService -a "h"
244
245    -------------------------------[ability]-------------------------------
246
247
248    ----------------------------------RenderService----------------------------------
249    ------Graphic2D--RenderSerice ------
250    Usage:
251    h                             |help text for the tool
252    screen                         |dump all screen infomation in the system
253    surface                        |dump all surface information
254    composer fps                   |dump the fps info of composer
255    [surface name] fps             |dump the fps info of surface
256    composer fpsClear              |clear the fps info of composer
257    [windowname] fps               |dump the fps info of window
258    [windowname] hitchs            |dump the hitchs info of window
259    [surface name] fpsClear        |clear the fps info of surface
260    nodeNotOnTree                  |dump nodeNotOnTree info
261    allSurfacesMem                 |dump surface mem info
262    RSTree                         |dump RSTree info
263    EventParamList                 |dump EventParamList info
264    allInfo                        |dump all info
265    client                         |dump client ui node trees
266    client-server                  |dump client and server info
267    dumpMem                        |dump Cache
268    trimMem cpu/gpu/shader         |release Cache
269    surfacenode [id]               |dump node info
270    fpsCount                       |dump the refresh rate counts info
271    clearFpsCount                  |clear the refresh rate counts info
272    vktextureLimit                 |dump vk texture limit info
273    flushJankStatsRs|flush rs jank stats hisysevent
274    ```
275
276    获取对应surface的刷新帧率,可以使用以下命令,返回值为surface刷新帧对应的时间戳。
277
278    ```
279    hidumper -s RenderService -a "surface_name fps"
280    ```
281
282    **使用样例:**
283
284    ```
285    $ hidumper -s RenderService -a "surface_name fps"
286
287    -------------------------------[ability]-------------------------------
288
289
290    ----------------------------------RenderService----------------------------------
291
292    -- The recently fps records info of screens:
293    ```
294
295    为开发者提供使设备不自动息屏的能力。-t参数使设备不自动息屏,-f参数使设备恢复自动息屏,或者设备重启使设备恢复自动息屏。
296
297    ```
298    hidumper -s 3301 -a -t
299    hidumper -s 3301 -a -f
300    ```
301
302    **使用样例:**
303
304    ```
305    $ hidumper -s 3301 -a -t
306
307    -------------------------------[ability]-------------------------------
308
309
310    ----------------------------------PowerManagerService----------------------------------
311    $ hidumper -s 3301 -a -f
312
313    -------------------------------[ability]-------------------------------
314
315
316    ----------------------------------PowerManagerService----------------------------------
317    ```
318
3199. 获取Faultlog模块生成的崩溃历史信息。
320
321    ```
322    hidumper -e
323    ```
324
325    **使用样例:**
326
327    ```
328    $ hidumper -e
329
330    -------------------------------[faultlog]-------------------------------
331
332
333    /data/log/faultlog/faultlogger/syswarning-com.ohos.sceneboard-20020022-20241106104006
334
335    Generated by HiviewDFX@OpenHarmony
336    ...
337    ```
338
33910. 获取网络信息;如果指定了进程的pid,则只获取该进程的网络流量使用信息。
340
341    ```
342    hidumper --net pid
343    hidumper --net
344    ```
345
346    **使用样例:**
347
348    ```
349    $ hidumper --net 1
350
351    -------------------------------[net traffic]-------------------------------
352
353    Received Bytes:0
354    Sent Bytes:51885
355
356    $ hidumper --net
357
358    -------------------------------[net traffic]-------------------------------
359
360    Received Bytes:0
361    Sent Bytes:51885
362
363    -------------------------------[net]-------------------------------
364
365    cmd is: netstat -nW
366    ...
367
368    ```
369
370
37111. 获取存储信息。如果指定了进程的pid,则只输出该进程的io信息。
372
373    ```
374    hidumper --storage pid
375    hidumper --storage
376    ```
377
378    **使用样例:**
379
380    ```
381    $ hidumper --storage 1
382
383    -------------------------------[storage io]-------------------------------
384
385
386    /proc/1/io
387
388    rchar: 28848175
389    wchar: 4364169
390    syscr: 16886
391    syscw: 15866
392    read_bytes: 30617600
393    write_bytes: 10907648
394    cancelled_write_bytes: 7340032
395    $ hidumper --storage
396
397    -------------------------------[storage]-------------------------------
398
399
400    cmd is: storaged -u -p
401    ...
402    ```
403
404
40512. 获取进程信息,包括进程、线程的列表等信息。
406
407    ```
408    hidumper -p pid
409    hidumper -p
410    ```
411
412    > **注意**
413    >
414    > 该命令在release版本只支持导出debug应用的进程信息。
415    >
416    > 如何区分debug/release版本:
417    >
418    > 命令1:执行hdc shell "param get|grep const.debuggable"查看输出为0还是1。
419    >
420    > 命令2:执行hdc shell "param get|grep const.product.software.version"查看当前版本是否包含"log"字符串。
421    >
422    > release版本:命令1执行结果为0且命令2不包含"log"字符串
423    >
424    > debug版本:非release版本即为debug版本
425
426    **使用样例:**
427
428    ```
429    $ hidumper -p 64949
430
431    -------------------------------[processes]-------------------------------
432
433
434    cmd is: ps -efT -p 64949
435
436    UID            PID   TID  PPID TCNT STIME TTY          TIME CMD
437    20020169     64949 64949   629   17 11:40:14 ?     00:00:00 com.example.jsleakwatcher
438    20020169     64949   733   629   17 11:40:28 ?     00:00:00 com.example.jsleakwatcher
439    ...
440    $ hidumper -p
441
442    -------------------------------[processes]-------------------------------
443
444
445    cmd is: ps -efT
446
447    UID            PID   TID  PPID TCNT STIME TTY          TIME CMD
448    root             1     1     0    1 10:46:59 ?     00:00:08 init --second-stage 2389791
449    root             2     2     0  127 10:46:59 ?     00:00:24 [sysmgr-main]
450    root             2     4     0  127 10:46:59 ?     00:00:00 [call_ebr]
451    ...
452    ```
453
45413. 获取CPU使用率,根据进程和类别分类展示。
455
456    ```
457    hidumper --cpuusage pid
458    hidumper --cpuusage
459    ```
460
461    **使用样例:**
462
463    ```
464    $ hidumper --cpuusage 1
465
466    -------------------------------[cpuusage]-------------------------------
467
468    Load average: 12.1 / 12.2 / 12.1; the cpu load average in 1 min, 5 min and 15 min
469    CPU usage from 2024-11-06 11:59:33 to 2024-11-06 11:59:35
470    Total: 3.80%; User Space: 1.45%; Kernel Space: 2.35%; iowait: 0.00%; irq: 0.14%; idle: 96.06%
471    Details of Processes:
472        PID   Total Usage      User Space    Kernel Space    Page Fault Minor    Page Fault Major    Name
473        1          0.00%           0.00%          0.00%           38368                1394            init
474    $ hidumper --cpuusage
475
476    -------------------------------[cpuusage]-------------------------------
477
478    Load average: 12.1 / 12.2 / 12.1; the cpu load average in 1 min, 5 min and 15 min
479    CPU usage from 2024-11-06 11:59:33 to 2024-11-06 11:59:38
480    Total: 6.38%; User Space: 2.57%; Kernel Space: 3.81%; iowait: 0.02%; irq: 0.14%; idle: 93.46%
481    Details of Processes:
482        PID   Total Usage      User Space    Kernel Space    Page Fault Minor    Page Fault Major    Name
483        105      109.01%           0.00%        109.01%             164                   0            tppmgr.elf
484        2          0.89%           0.00%          0.89%               0                   0            sysmgr-main
485    ...
486    ```
487
48814. 获取CPU每个核的真实频率。
489
490    ```
491    hidumper --cpufreq
492    ```
493
494    **使用样例:**
495
496    ```
497    $ hidumper --cpufreq
498
499    -------------------------------[cpufreq]-------------------------------
500
501
502    cmd is: cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
503
504    1018000
505
506    cmd is: cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
507
508    1530000
509    ...
510    ```
511
51215. 获取设备中所有pid的内存信息。
513
514    ```
515    hidumper --mem
516    ```
517
518    **使用样例:**
519
520    ```
521    $ hidumper --mem
522    -------------------------------[memory]-------------------------------
523    Total Memory Usage by PID:
524    PID       Total Pss(xxx in SwapPss)   Total Vss   Total Rss   Total Uss          GL       Graph         Dma     PurgSum     PurgPin    Name
525    1          4309(2216 in SwapPss) kB  2158196 kB     4180 kB     1760 kB        0 kB        0 kB        0 kB        0 kB        0 kB    init
526    2            45613(0 in SwapPss) kB 17452952 kB    48352 kB    44088 kB        0 kB        0 kB        0 kB        0 kB        0 kB    sysmgr-main
527    ...
528    ```
529
530    获取设备中指定pid的内存信息。
531
532    ```
533    hidumper --mem pid
534    ```
535
536    **使用样例:**
537
538    ```
539    $ hidumper --mem 1
540
541    -------------------------------[memory]-------------------------------
542
543                            Pss        Shared        Shared       Private       Private          Swap       SwapPss          Heap          Heap          Heap
544                        Total         Clean         Dirty         Clean         Dirty         Total         Total          Size         Alloc          Free
545                        ( kB )        ( kB )        ( kB )        ( kB )        ( kB )        ( kB )        ( kB )        ( kB )        ( kB )        ( kB )
546                --------------------------------------------------------------------------------------------------------------------------------------------
547                GL             0             0             0             0             0             0             0             0             0             0
548            Graph             0             0             0             0             0             0             0             0             0             0
549    native heap           924             0             0           924             0          1948          1948             0             0             0
550    AnonPage other            84            16             0            84             0            52            52             0             0             0
551            stack            28             0             0            28             0             0             0             0             0             0
552            .so           413          1548             0           248            56           216           216             0             0             0
553            dev           190             0           856             0             0             0             0             0             0             0
554    FilePage other           420             0             0           404            16             0             0             0             0             0
555    ----------------------------------------------------------------------------------------------------------------------------------------------------------
556            Total          4275          1564           856          1688            72          2216          2216             0             0             0
557
558    native heap:
559    jemalloc meta:           120             0             0           120             0            52            52             0             0             0
560    jemalloc heap:           776             0             0           776             0          1888          1888             0             0             0
561        brk heap:            20             0             0            20             0             8             8             0             0             0
562        musl heap:             8             0             0             8             0             0             0             0             0             0
563
564    Purgeable:
565            PurgSum:0 kB
566            PurgPin:0 kB
567
568    DMA:
569                Dma:0 kB
570    ```
571
572    **Graph字段统计方式为:计算/proc/process_dmabuf_info节点下该进程使用的内存大小。**
573
57416. 保存命令输出到/data/log/hidumper下的压缩文件。
575
576    ```
577    hidumper --zip
578    ```
579
580    **使用样例:**
581
582    ```
583    $ hidumper --zip
584    100%,[-],The result is:/data/log/hidumper/20241106-120444-166.zip
585    ```
586
58717. 统计一段时间进程IPC信息,如果使用-a则统计所有进程IPC数据,指定pid则统计对应进程的IPC数据。--start-stat开始统计,--stat获取统计数据,--stop-stat结束统计。
588
589    ```
590    hidumper --ipc pid --start-stat
591    hidumper --ipc pid --stat
592    hidumper --ipc pid --stop-stat
593    ```
594
595    **使用样例:**
596
597    ```
598    $ hidumper --ipc 1473 --start-stat
599    StartIpcStatistics pid:1473 success
600    $ hidumper --ipc 1473 --stat
601    ********************************GlobalStatisticsInfo********************************
602    CurrentPid:1473
603    TotalCount:2
604    TotalTimeCost:2214
605    --------------------------------ProcessStatisticsInfo-------------------------------
606    CallingPid:625
607    CallingPidTotalCount:2
608    CallingPidTotalTimeCost:2214
609    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~InterfaceStatisticsInfo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
610    DescriptorCode:OHOS.ILocalAbilityManager_6
611    DescriptorCodeCount:2
612    DescriptorCodeTimeCost:
613    Total:2214 | Max:1444 | Min:770 | Avg:1107
614    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
615    ------------------------------------------------------------------------------------
616    ************************************************************************************
617    $ hidumper --ipc 1473 --stop-stat
618    StopIpcStatistics pid:1473 success
619    ```
620
621    ```
622    hidumper --ipc -a --start-stat
623    hidumper --ipc -a --stat
624    hidumper --ipc -a --stop-stat
625    ```
626
627    **使用样例:**
628
629    ```
630    $ hidumper --ipc -a --start-stat
631    StartIpcStatistics pid:1473 success
632    StartIpcStatistics pid:775 success
633    StartIpcStatistics pid:1472 success
634    ...
635    $ hidumper --ipc -a --stat
636    ********************************GlobalStatisticsInfo********************************
637    CurrentPid:1473
638    TotalCount:3
639    TotalTimeCost:3783
640    --------------------------------ProcessStatisticsInfo-------------------------------
641    CallingPid:625
642    CallingPidTotalCount:3
643    ...
644    $ hidumper --ipc -a --stop-stat
645    StopIpcStatistics pid:1473 success
646    StopIpcStatistics pid:775 success
647    StopIpcStatistics pid:1472 success
648    ...
649    ```
650
65118. 导出指定进程内存信息的详细使用情况。
652
653    ```
654    hidumper --mem-smaps pid [-v]
655    ```
656
657    > **注意**
658    >
659    > 该命令仅限debug版本使用,release版本不可用。
660    >
661    > 如何区分debug/release版本:请查看`hidumper -p`中说明。
662
663    **使用样例:**
664
665    ```
666    $ hidumper --mem-smaps 1
667    usage:
668    -h                          |help text for the tool
669    -lc                         |a list of system information clusters
670    -ls                         |a list of system abilities
671    -c                          |all system information clusters
672    -c [base system]            |system information clusters labeled "base" and "system"
673    -s                          |all system abilities
674    -s [SA0 SA1]                |system abilities labeled "SA0" and "SA1"
675    -s [SA] -a ['-h']           |system ability labeled "SA" with arguments "-h" specified
676    -e                          |faultlogs of crash history
677    --net [pid]                 |dump network information; if pid is specified, dump traffic usage of specified pid
678    --storage [pid]             |dump storage information; if pid is specified, dump /proc/pid/io
679    -p                          |processes information, include list and infromation of processes and threads
680    -p [pid]                    |dump threads under pid, includes smap, block channel, execute time, mountinfo
681    --cpufreq                   |dump real CPU frequency of each core
682    --mem [pid]                 |dump memory usage of total; dump memory usage of specified pid if pid was specified
683    --zip                       |compress output to /data/log/hidumper
684    --mem-smaps pid [-v]        |display statistic in /proc/pid/smaps, use -v specify more details
685    --mem-jsheap pid [-T tid] [--gc] [--leakobj]  |triggerGC, dumpHeapSnapshot and dumpLeakList under pid and tid
686    --ipc pid ARG               |ipc load statistic; pid must be specified or set to -a dump all processes. ARG must be one of --start-stat | --stop-stat | --stat
687    --cpuusage [pid]            |dump cpu usage by processes and category; if PID is specified, dump category usage of specified pid
688
689    $ hidumper --mem-smaps 1 -v
690    usage:
691    -h                          |help text for the tool
692    -lc                         |a list of system information clusters
693    -ls                         |a list of system abilities
694    -c                          |all system information clusters
695    -c [base system]            |system information clusters labeled "base" and "system"
696    -s                          |all system abilities
697    -s [SA0 SA1]                |system abilities labeled "SA0" and "SA1"
698    -s [SA] -a ['-h']           |system ability labeled "SA" with arguments "-h" specified
699    -e                          |faultlogs of crash history
700    --net [pid]                 |dump network information; if pid is specified, dump traffic usage of specified pid
701    --storage [pid]             |dump storage information; if pid is specified, dump /proc/pid/io
702    -p                          |processes information, include list and infromation of processes and threads
703    -p [pid]                    |dump threads under pid, includes smap, block channel, execute time, mountinfo
704    --cpufreq                   |dump real CPU frequency of each core
705    --mem [pid]                 |dump memory usage of total; dump memory usage of specified pid if pid was specified
706    --zip                       |compress output to /data/log/hidumper
707    --mem-smaps pid [-v]        |display statistic in /proc/pid/smaps, use -v specify more details
708    --mem-jsheap pid [-T tid] [--gc] [--leakobj]  |triggerGC, dumpHeapSnapshot and dumpLeakList under pid and tid
709    --ipc pid ARG               |ipc load statistic; pid must be specified or set to -a dump all processes. ARG must be one of --start-stat | --stop-stat | --stat
710    --cpuusage [pid]            |dump cpu usage by processes and category; if PID is specified, dump category usage of specified pid
711    ```
712
71318. 运行  **hidumper --mem-jsheap pid [-T tid] [--gc] [--leakobj]**  pid 必选参数。命令触发所有线程gc和快照导出。如果指定线程的tid,只触发该线程gc和快照导出;如果指定--gc,只触发gc不做快照导出;如果指定--leakobj,则获取泄露对象的列表。(仅限debug版本使用)
714
715    ```
716    hidumper --mem-jsheap pid [-T tid] [--gc] [--leakobj]
717    ```
718
719    > **注意**
720    >
721    > 该命令在release版本只支持导出debug应用的快照信息。
722    >
723    > 如何区分debug和release版本:请查看`hidumper -p`中说明。
724    >
725    > 导出的jsheap文件一般位于/data/log/faultlog/temp/data/log/reliability/resource_leak/memory_leak726
727    **使用样例:**
728
729    ```
730    $ hidumper --mem-jsheap 64949
731    $ ls |grep hidumper
732    hidumper-jsheap-64949-64949-1730872962493
733    $ hidumper --mem-jsheap 64949 -T 64949
734    $ ls |grep hidumper
735    hidumper-jsheap-64949-64949-1730872962493
736    $ hidumper --mem-jsheap 64949 --gc
737    $ hidumper --mem-jsheap 64949 --leakobj
738    $ ls |grep hidumper
739    hidumper-jsheap-64949-64949-1730873174145
740    hidumper-leaklist-64949-1730873210483
741    ```
742