1# HiDumper 2 3HiDumper is a command-line tool used to export essential system information for analyzing and locating issues. 4 5## Environment Setup 6 7- The [environment setup](hdc.md#environment-setup) is complete. 8 9- The devices are properly connected. 10 11## Command Description 12 13| Commands| Description| 14| -------- | -------- | 15| -h | Displays help information.| 16| -lc | Lists system information clusters.| 17| -ls | Lists system capabilities.| 18| -c | Obtains the detailed information about the system information cluster.| 19| -c [base system] | Obtains the detailed information about the base or system information cluster.| 20| -s | Obtains the detailed information about all system capabilities.| 21| -s [SA0 SA1] | Obtains the detailed information about one or more system capabilities.| 22| -s [SA] -a ["option"] | Executes a specific option of a system capability. **SA** indicates a system capability, and **option** indicates an option supported by the system capability. You can run **-s [SA] -a ["-h"]** to obtain all options supported by a system capability.| 23| -e | Obtains crash logs.| 24| --net [pid] | Obtains network information. If **pid** is specified, obtains only the network traffic usage of the specified process.| 25| --storage [pid] | Obtains storage information. If **pid** is specified, obtains the I/O information of the specified process.| 26| -p [pid] | Obtains all process and thread information.| 27| --cpuusage [pid] | Obtains the CPU usage by process and category. If **pid** is specified, obtains the CPU usage of the specified process.| 28| --cpufreq | Obtains the actual CPU frequency.| 29| --mem [pid] | Obtains the total memory usage. If **pid** is specified, obtains the memory usage of the specified process.| 30| --zip | Saves the exported compressed file to **/data/log/hidumper**.| 31| --ipc pid/-a --start-stat/stop-stat/stat | Collects the IPC statistics of a process in a period of time. **-a** is used to collect the IPC statistics of all processes, **--start-stat** is used to start collecting statistics, **--stat** is used to obtain statistics, and **--stop-stat** is used to stop collecting statistics.| 32| --mem-smaps pid [-v] | Obtains the memory usage of a specified process from **/proc/pid/smaps**. **-v** is used to specify more details about the process. This command is only available in the Debug version.| 33| --mem-jsheap pid [-T tid] [--gc] [--leakobj] | Triggers the Garbage Collection (GC) and exports the snapshot of all threads. **pid** is mandatory. If **tid** is specified, triggers the GC and exports the snapshot of the specified thread. If **--gc** is specified, triggers the GC but not exports the snapshot. If **--leakobj** is specified, obtains the list of leaked objects.| 34 35## Examples 36 371. Display help information. 38 39 ``` 40 hidumper -h 41 ``` 42 43 **Example** 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 information 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. Lists system information clusters. 71 72 ``` 73 hidumper -lc 74 ``` 75 76 **Example** 77 78 ``` 79 $ hidumper -lc 80 System cluster list: 81 base system 82 ``` 83 843. Lists system capabilities. 85 86 ``` 87 hidumper -ls 88 ``` 89 90 **Example** 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. Obtain the detailed information about the system information cluster. 108 109 ``` 110 hidumper -c 111 ``` 112 113 **Example** 114 115 ``` 116 $ hidumper -c 117 118 -------------------------------[base]------------------------------- 119 120 BuildId: OpenHarmony 5.0.0.37 121 RleaseType: Canary1 122 ... 123 ``` 124 1255. Obtain the detailed information about the base or system information cluster. 126 127 ``` 128 hidumper -c base 129 hidumper -c system 130 ``` 131 132 **Example** 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. Obtain the detailed information about all system capabilities. 158 159 ``` 160 hidumper -s 161 ``` 162 163 **Example** 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. Obtain the detailed information about one or more system capabilities. 185 186 ``` 187 hidumper -s [SA0] 188 hidumper -s [SA0] [SA1] 189 ``` 190 191 **Example** 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 information in the system 227 surface |dump all surface information 228 composer fps |dump the fps info of composer 229 ... 230 ``` 231 2328. Executes a specific option of a system capability. 233 234 Obtain the help information about **RenderService**. 235 236 ``` 237 hidumper -s RenderService -a "h" 238 ``` 239 240 **Example** 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 information 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 Obtain the refresh frame rate of a surface. 277 278 ``` 279 hidumper -s RenderService -a "surface_name fps" 280 ``` 281 282 **Example** 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 Use the **-t** parameter to disable the automatic screen-off function; use the **-f** parameter or restart the device to enable the automatic screen-off function. 296 297 ``` 298 hidumper -s 3301 -a -t 299 hidumper -s 3301 -a -f 300 ``` 301 302 **Example** 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. Obtain the crash information generated by the Faultlog module.. 320 321 ``` 322 hidumper -e 323 ``` 324 325 **Example** 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. Obtain network information. Specify **pid** to obtain the network traffic usage of the specified process. 340 341 ``` 342 hidumper --net pid 343 hidumper --net 344 ``` 345 346 **Example** 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. Obtains storage information. If **pid** is specified, obtains the I/O information of the specified process. 372 373 ``` 374 hidumper --storage pid 375 hidumper --storage 376 ``` 377 378 **Example** 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. Obtain all process and thread information. 406 407 ``` 408 hidumper -p pid 409 hidumper -p 410 ``` 411 412 **Example** 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. Obtain CPU usage, which is displayed by process and category. 441 442 ``` 443 hidumper --cpuusage pid 444 hidumper --cpuusage 445 ``` 446 447 **Example** 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. Obtain the actual CPU frequency. 475 476 ``` 477 hidumper --cpufreq 478 ``` 479 480 **Example** 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. Obtain memory usage of all processes. 499 500 ``` 501 hidumper --mem 502 ``` 503 504 **Example** 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 Obtain memory usage of the specified process on the device. 517 518 ``` 519 hidumper --mem pid 520 ``` 521 522 **Example** 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 The **Graph** field represents the memory size used by the process in the **/proc/process_dmabuf_info** node. 559 56016. Save the exported compressed file to **/data/log/hidumper**. 561 562 ``` 563 hidumper --zip 564 ``` 565 566 **Example** 567 568 ``` 569 $ hidumper --zip 570 100%,[-],The result is:/data/log/hidumper/20241106-120444-166.zip 571 ``` 572 57317. Collect IPC statistics of the process in a period. Use **-a** to collect the IPC statistics of all processes. Specify **pid** to collect the IPC statistics of the specified process. Use **--start-stat** to start collecting statistics, use **--stat:** to obtain statistics, and use **--stop-stat** to stop collecting statistics. 574 575 ``` 576 hidumper --ipc pid --start-stat 577 hidumper --ipc pid --stat 578 hidumper --ipc pid --stop-stat 579 ``` 580 581 **Example** 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 **Example** 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. Export the detailed memory usage of the specified process. 638 639 ``` 640 hidumper --mem-smaps pid [-v] 641 ``` 642 643 > **Note** 644 > 645 > This command is available only in the Debug version and is unavailable in the Release version. 646 > 647 > How to distinguish the Debug and Release versions: 648 > 649 > 1. Run the **hdc shell "param get|grep const.debuggable"** command to check whether the output is **0** or **1**. 650 > 651 > 2. Run the **hdc shell "param get|grep const.product.software.version"** command to check whether the current version contains the **log** string. 652 > 653 > The Release version outputs **0** and does not contain the **log** string. 654 > 655 > The Debug version outputs **1** and contain the **log** string. 656 657 **Example** 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 information 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 information 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. Run the **hidumper --mem-jsheap pid [-T tid] [--gc] [--leakobj]** command to trigger the GC and export snapshot of all threads. **pid** is mandatory. Specify **tid** to trigger GC and export snapshot of the specified thread. Specify **--gc** to trigger GC but not to export snapshot. Specify **--leakobj** to obtain the list of leaked objects. This command is only available in the Debug version. 708 709 ``` 710 hidumper --mem-jsheap pid [-T tid] [--gc] [--leakobj] 711 ``` 712 713 > **Note** 714 > 715 > In the Release version, this command can be used to export the snapshot information of the debugging applications. 716 > 717 > For details about how to distinguish the Debug and Release versions, see the last example. 718 > 719 > The path of the jsheap file: **/data/log/faultlog/temp or /data/log/reliability/resource_leak/memory_leak**. 720 721 **Example** 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