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 ``` 415 $ hidumper -p 64949 416 417 -------------------------------[processes]------------------------------- 418 419 420 cmd is: ps -efT -p 64949 421 422 UID PID TID PPID TCNT STIME TTY TIME CMD 423 20020169 64949 64949 629 17 11:40:14 ? 00:00:00 com.example.jsleakwatcher 424 20020169 64949 733 629 17 11:40:28 ? 00:00:00 com.example.jsleakwatcher 425 ... 426 $ hidumper -p 427 428 -------------------------------[processes]------------------------------- 429 430 431 cmd is: ps -efT 432 433 UID PID TID PPID TCNT STIME TTY TIME CMD 434 root 1 1 0 1 10:46:59 ? 00:00:08 init --second-stage 2389791 435 root 2 2 0 127 10:46:59 ? 00:00:24 [sysmgr-main] 436 root 2 4 0 127 10:46:59 ? 00:00:00 [call_ebr] 437 ... 438 ``` 439 44013. 获取CPU使用率,根据进程和类别分类展示。 441 442 ``` 443 hidumper --cpuusage pid 444 hidumper --cpuusage 445 ``` 446 447 **使用样例:** 448 449 ``` 450 $ hidumper --cpuusage 1 451 452 -------------------------------[cpuusage]------------------------------- 453 454 Load average: 12.1 / 12.2 / 12.1; the cpu load average in 1 min, 5 min and 15 min 455 CPU usage from 2024-11-06 11:59:33 to 2024-11-06 11:59:35 456 Total: 3.80%; User Space: 1.45%; Kernel Space: 2.35%; iowait: 0.00%; irq: 0.14%; idle: 96.06% 457 Details of Processes: 458 PID Total Usage User Space Kernel Space Page Fault Minor Page Fault Major Name 459 1 0.00% 0.00% 0.00% 38368 1394 init 460 $ hidumper --cpuusage 461 462 -------------------------------[cpuusage]------------------------------- 463 464 Load average: 12.1 / 12.2 / 12.1; the cpu load average in 1 min, 5 min and 15 min 465 CPU usage from 2024-11-06 11:59:33 to 2024-11-06 11:59:38 466 Total: 6.38%; User Space: 2.57%; Kernel Space: 3.81%; iowait: 0.02%; irq: 0.14%; idle: 93.46% 467 Details of Processes: 468 PID Total Usage User Space Kernel Space Page Fault Minor Page Fault Major Name 469 105 109.01% 0.00% 109.01% 164 0 tppmgr.elf 470 2 0.89% 0.00% 0.89% 0 0 sysmgr-main 471 ... 472 ``` 473 47414. 获取CPU每个核的真实频率。 475 476 ``` 477 hidumper --cpufreq 478 ``` 479 480 **使用样例:** 481 482 ``` 483 $ hidumper --cpufreq 484 485 -------------------------------[cpufreq]------------------------------- 486 487 488 cmd is: cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq 489 490 1018000 491 492 cmd is: cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq 493 494 1530000 495 ... 496 ``` 497 49815. 获取设备中所有pid的内存信息。 499 500 ``` 501 hidumper --mem 502 ``` 503 504 **使用样例:** 505 506 ``` 507 $ hidumper --mem 508 -------------------------------[memory]------------------------------- 509 Total Memory Usage by PID: 510 PID Total Pss(xxx in SwapPss) Total Vss Total Rss Total Uss GL Graph Dma PurgSum PurgPin Name 511 1 4309(2216 in SwapPss) kB 2158196 kB 4180 kB 1760 kB 0 kB 0 kB 0 kB 0 kB 0 kB init 512 2 45613(0 in SwapPss) kB 17452952 kB 48352 kB 44088 kB 0 kB 0 kB 0 kB 0 kB 0 kB sysmgr-main 513 ... 514 ``` 515 516 获取设备中指定pid的内存信息。 517 518 ``` 519 hidumper --mem pid 520 ``` 521 522 **使用样例:** 523 524 ``` 525 $ hidumper --mem 1 526 527 -------------------------------[memory]------------------------------- 528 529 Pss Shared Shared Private Private Swap SwapPss Heap Heap Heap 530 Total Clean Dirty Clean Dirty Total Total Size Alloc Free 531 ( kB ) ( kB ) ( kB ) ( kB ) ( kB ) ( kB ) ( kB ) ( kB ) ( kB ) ( kB ) 532 -------------------------------------------------------------------------------------------------------------------------------------------- 533 GL 0 0 0 0 0 0 0 0 0 0 534 Graph 0 0 0 0 0 0 0 0 0 0 535 native heap 924 0 0 924 0 1948 1948 0 0 0 536 AnonPage other 84 16 0 84 0 52 52 0 0 0 537 stack 28 0 0 28 0 0 0 0 0 0 538 .so 413 1548 0 248 56 216 216 0 0 0 539 dev 190 0 856 0 0 0 0 0 0 0 540 FilePage other 420 0 0 404 16 0 0 0 0 0 541 ---------------------------------------------------------------------------------------------------------------------------------------------------------- 542 Total 4275 1564 856 1688 72 2216 2216 0 0 0 543 544 native heap: 545 jemalloc meta: 120 0 0 120 0 52 52 0 0 0 546 jemalloc heap: 776 0 0 776 0 1888 1888 0 0 0 547 brk heap: 20 0 0 20 0 8 8 0 0 0 548 musl heap: 8 0 0 8 0 0 0 0 0 0 549 550 Purgeable: 551 PurgSum:0 kB 552 PurgPin:0 kB 553 554 DMA: 555 Dma:0 kB 556 ``` 557 558 **Graph字段统计方式为:计算/proc/process_dmabuf_info节点下该进程使用的内存大小。** 559 56016. 保存命令输出到/data/log/hidumper下的压缩文件。 561 562 ``` 563 hidumper --zip 564 ``` 565 566 **使用样例:** 567 568 ``` 569 $ hidumper --zip 570 100%,[-],The result is:/data/log/hidumper/20241106-120444-166.zip 571 ``` 572 57317. 统计一段时间进程IPC信息,如果使用-a则统计所有进程IPC数据,指定pid则统计对应进程的IPC数据。--start-stat开始统计,--stat获取统计数据,--stop-stat结束统计。 574 575 ``` 576 hidumper --ipc pid --start-stat 577 hidumper --ipc pid --stat 578 hidumper --ipc pid --stop-stat 579 ``` 580 581 **使用样例:** 582 583 ``` 584 $ hidumper --ipc 1473 --start-stat 585 StartIpcStatistics pid:1473 success 586 $ hidumper --ipc 1473 --stat 587 ********************************GlobalStatisticsInfo******************************** 588 CurrentPid:1473 589 TotalCount:2 590 TotalTimeCost:2214 591 --------------------------------ProcessStatisticsInfo------------------------------- 592 CallingPid:625 593 CallingPidTotalCount:2 594 CallingPidTotalTimeCost:2214 595 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~InterfaceStatisticsInfo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 596 DescriptorCode:OHOS.ILocalAbilityManager_6 597 DescriptorCodeCount:2 598 DescriptorCodeTimeCost: 599 Total:2214 | Max:1444 | Min:770 | Avg:1107 600 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 601 ------------------------------------------------------------------------------------ 602 ************************************************************************************ 603 $ hidumper --ipc 1473 --stop-stat 604 StopIpcStatistics pid:1473 success 605 ``` 606 607 ``` 608 hidumper --ipc -a --start-stat 609 hidumper --ipc -a --stat 610 hidumper --ipc -a --stop-stat 611 ``` 612 613 **使用样例:** 614 615 ``` 616 $ hidumper --ipc -a --start-stat 617 StartIpcStatistics pid:1473 success 618 StartIpcStatistics pid:775 success 619 StartIpcStatistics pid:1472 success 620 ... 621 $ hidumper --ipc -a --stat 622 ********************************GlobalStatisticsInfo******************************** 623 CurrentPid:1473 624 TotalCount:3 625 TotalTimeCost:3783 626 --------------------------------ProcessStatisticsInfo------------------------------- 627 CallingPid:625 628 CallingPidTotalCount:3 629 ... 630 $ hidumper --ipc -a --stop-stat 631 StopIpcStatistics pid:1473 success 632 StopIpcStatistics pid:775 success 633 StopIpcStatistics pid:1472 success 634 ... 635 ``` 636 63718. 导出指定进程内存信息的详细使用情况。 638 639 ``` 640 hidumper --mem-smaps pid [-v] 641 ``` 642 643 > **注意** 644 > 645 > 该命令仅限debug版本使用,release版本不可用。 646 > 647 > 如何区分debug/release版本: 648 > 649 > 命令1:执行hdc shell "param get|grep const.debuggable"查看输出为0还是1。 650 > 651 > 命令2:执行hdc shell "param get|grep const.product.software.version"查看当前版本是否包含"log"字符串。 652 > 653 > release版本:命令1执行结果为0且命令2不包含"log"字符串 654 > 655 > debug版本:非release版本即为debug版本 656 657 **使用样例:** 658 659 ``` 660 $ hidumper --mem-smaps 1 661 usage: 662 -h |help text for the tool 663 -lc |a list of system information clusters 664 -ls |a list of system abilities 665 -c |all system information clusters 666 -c [base system] |system information clusters labeled "base" and "system" 667 -s |all system abilities 668 -s [SA0 SA1] |system abilities labeled "SA0" and "SA1" 669 -s [SA] -a ['-h'] |system ability labeled "SA" with arguments "-h" specified 670 -e |faultlogs of crash history 671 --net [pid] |dump network information; if pid is specified, dump traffic usage of specified pid 672 --storage [pid] |dump storage information; if pid is specified, dump /proc/pid/io 673 -p |processes information, include list and infromation of processes and threads 674 -p [pid] |dump threads under pid, includes smap, block channel, execute time, mountinfo 675 --cpufreq |dump real CPU frequency of each core 676 --mem [pid] |dump memory usage of total; dump memory usage of specified pid if pid was specified 677 --zip |compress output to /data/log/hidumper 678 --mem-smaps pid [-v] |display statistic in /proc/pid/smaps, use -v specify more details 679 --mem-jsheap pid [-T tid] [--gc] [--leakobj] |triggerGC, dumpHeapSnapshot and dumpLeakList under pid and tid 680 --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 681 --cpuusage [pid] |dump cpu usage by processes and category; if PID is specified, dump category usage of specified pid 682 683 $ hidumper --mem-smaps 1 -v 684 usage: 685 -h |help text for the tool 686 -lc |a list of system information clusters 687 -ls |a list of system abilities 688 -c |all system information clusters 689 -c [base system] |system information clusters labeled "base" and "system" 690 -s |all system abilities 691 -s [SA0 SA1] |system abilities labeled "SA0" and "SA1" 692 -s [SA] -a ['-h'] |system ability labeled "SA" with arguments "-h" specified 693 -e |faultlogs of crash history 694 --net [pid] |dump network information; if pid is specified, dump traffic usage of specified pid 695 --storage [pid] |dump storage information; if pid is specified, dump /proc/pid/io 696 -p |processes information, include list and infromation of processes and threads 697 -p [pid] |dump threads under pid, includes smap, block channel, execute time, mountinfo 698 --cpufreq |dump real CPU frequency of each core 699 --mem [pid] |dump memory usage of total; dump memory usage of specified pid if pid was specified 700 --zip |compress output to /data/log/hidumper 701 --mem-smaps pid [-v] |display statistic in /proc/pid/smaps, use -v specify more details 702 --mem-jsheap pid [-T tid] [--gc] [--leakobj] |triggerGC, dumpHeapSnapshot and dumpLeakList under pid and tid 703 --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 704 --cpuusage [pid] |dump cpu usage by processes and category; if PID is specified, dump category usage of specified pid 705 ``` 706 70718. 运行 **hidumper --mem-jsheap pid [-T tid] [--gc] [--leakobj]** pid 必选参数。命令触发所有线程gc和快照导出。如果指定线程的tid,只触发该线程gc和快照导出;如果指定--gc,只触发gc不做快照导出;如果指定--leakobj,则获取泄露对象的列表。(仅限debug版本使用) 708 709 ``` 710 hidumper --mem-jsheap pid [-T tid] [--gc] [--leakobj] 711 ``` 712 713 > **注意** 714 > 715 > 该命令在release版本只支持导出debug应用的快照信息。 716 > 717 > 如何区分debug和release版本:同上。 718 > 719 > 导出的jsheap文件一般位于/data/log/faultlog/temp或/data/log/reliability/resource_leak/memory_leak下 720 721 **使用样例:** 722 723 ``` 724 $ hidumper --mem-jsheap 64949 725 $ ls |grep hidumper 726 hidumper-jsheap-64949-64949-1730872962493 727 $ hidumper --mem-jsheap 64949 -T 64949 728 $ ls |grep hidumper 729 hidumper-jsheap-64949-64949-1730872962493 730 $ hidumper --mem-jsheap 64949 --gc 731 $ hidumper --mem-jsheap 64949 --leakobj 732 $ ls |grep hidumper 733 hidumper-jsheap-64949-64949-1730873174145 734 hidumper-leaklist-64949-1730873210483 735 ``` 736