1# Resource Leak Event Overview 2 3HiAppEvent provides APIs for subscribing to system resource leak events of the system. 4 5- - [Subscribing to Resource Leak Events (ArkTS)](hiappevent-watcher-resourceleak-events-arkts.md) 6- - [Subscribing to Resource Leak Events (C/C++)](hiappevent-watcher-resourceleak-events-ndk.md) 7 8The **params** parameter in the event information is described as follows. 9 10**params** 11 12| Name | Type | Description | 13|----------------|-------|--------------------------------------------------------------------------| 14| time | number | Event triggering time, in ms. | 15| bundle_version | string | Application version. | 16| bundle_name | string | Application name. | 17| pid | number | Process ID of the application. | 18| uid | number | User ID of the application. | 19| resource_type | string | Resource type. For details, see **resource_type**. | 20| memory | object | Memory information (only available for **pss_memory** and **js_heap**). For details, see **memory**. | 21| fd | object | File descriptor information (only available for **fd**). For details, see **fd**. | 22| thread | object | Thread information (only available for **thread**). For details, see **thread**. | 23| external_log | string[] | Path of the error log file. If the directory files exceed the threshold (for details, see **log_over_limit**), new log files may fail to be written. Therefore, delete the log files immediately after they are processed.| 24| log_over_limit | Boolean | Whether the size of generated fault log files and existing log files exceeds the upper limit (2 GB). The value **true** indicates that the upper limit is exceeded and logs fail to be written. The value **false** indicates that the upper limit is not exceeded. | 25 26**resource_type** 27 28| Value | Description | 29| ------- | ------------------------- | 30| pss_memory | PSS memory leak.| 31| js_heap | JS memory leak.| 32| fd | FD resource leak.| 33| thread | Thread leak.| 34 35**memory** 36 37| Name | Type | Description | 38| ------- | ------ | ------------------------- | 39| rss | number | Size of the memory allocated for a process (only available for **pss_memory**), in KB.| 40| vss | number | Size of the virtual memory applied by a process from the system (only available for **pss_memory**), in KB.| 41| pss | number | Size of the physical memory actually used by a process (only available for **pss_memory**), in KB.| 42| sys_free_mem | number | Size of free memory (only available for **pss_memory**), in KB.| 43| sys_avail_mem | number | Size of available memory (only available for **pss_memory**), in KB.| 44| sys_total_mem | number | Total memory size (only available for **pss_memory**), in KB.| 45| limit_size | number | Limit of memory size (only available for **js_heap**), in KB.| 46| live_object_size | number | Size of the used memory (only available for **js_heap**), in KB.| 47 48**fd** 49 50| Name | Type | Description | 51| ----------- | ------ | ------------------- | 52| num | number | Total number of FDs. | 53| top_fd_type | string | FD with the largest number. | 54| top_fd_num | number | Number of **top_fd_type**.| 55 56**thread** 57 58| Name| Type | Description | 59| ---- | ------ | -------------- | 60| num | number | Total number of threads.| 61