1e41f4b71Sopenharmony_ci# ProcessInformation
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ciProcessInformation模块提供对进程运行信息进行查询的能力。
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ci> **说明:**
6e41f4b71Sopenharmony_ci> 
7e41f4b71Sopenharmony_ci> 本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci## 导入模块
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ci```ts
12e41f4b71Sopenharmony_ciimport { appManager } from '@kit.AbilityKit';
13e41f4b71Sopenharmony_ci```
14e41f4b71Sopenharmony_ci
15e41f4b71Sopenharmony_ci## 属性
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ci**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ci| 名称 | 类型 | 只读 | 可选 | 说明 |
20e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | -------- |
21e41f4b71Sopenharmony_ci| pid | number | 否 | 否 | 进程ID。<br>**原子化服务API:** 从API version 11开始,该接口支持在原子化服务中使用。 |
22e41f4b71Sopenharmony_ci| uid | number | 否 | 否 | 用户ID。<br>**原子化服务API:** 从API version 11开始,该接口支持在原子化服务中使用。 |
23e41f4b71Sopenharmony_ci| processName | string | 否 | 否 | 进程名称。<br>**原子化服务API:** 从API version 11开始,该接口支持在原子化服务中使用。 |
24e41f4b71Sopenharmony_ci| bundleNames | Array&lt;string&gt; | 否 | 否 | 进程中所有运行的Bundle名称。<br>**原子化服务API:** 从API version 11开始,该接口支持在原子化服务中使用。 |
25e41f4b71Sopenharmony_ci| state<sup>10+</sup> | [appManager.ProcessState](js-apis-app-ability-appManager.md#processstate10)| 否 | 否 | 当前进程运行状态。<br>**原子化服务API:** 从API version 11开始,该接口支持在原子化服务中使用。|
26e41f4b71Sopenharmony_ci| bundleType<sup>12+</sup> | [bundleManager.BundleType](js-apis-bundleManager.md#bundletype) | 否 | 否 | 当前进程运行的包类型。<br>**原子化服务API:** 从API version 12开始,该接口支持在原子化服务中使用。 |
27e41f4b71Sopenharmony_ci| appCloneIndex<sup>12+</sup> | number   | 否   | 是   | 分身应用索引。<br>**原子化服务API:** 从API version 12开始,该接口支持在原子化服务中使用。  |
28e41f4b71Sopenharmony_ci
29e41f4b71Sopenharmony_ci## 使用说明
30e41f4b71Sopenharmony_ci
31e41f4b71Sopenharmony_ci通过appManager的[getRunningProcessInformation](js-apis-app-ability-appManager.md#appmanagergetrunningprocessinformation)来获取。
32e41f4b71Sopenharmony_ci
33e41f4b71Sopenharmony_ci**示例:**
34e41f4b71Sopenharmony_ci
35e41f4b71Sopenharmony_ci```ts
36e41f4b71Sopenharmony_ciimport { appManager } from '@kit.AbilityKit';
37e41f4b71Sopenharmony_ci
38e41f4b71Sopenharmony_ciappManager.getRunningProcessInformation((error, data) => {
39e41f4b71Sopenharmony_ci  if (error) {
40e41f4b71Sopenharmony_ci    console.error(`getRunningProcessInformation fail, error: ${JSON.stringify(error)}`);
41e41f4b71Sopenharmony_ci  } else {
42e41f4b71Sopenharmony_ci    console.log(`getRunningProcessInformation success, data: ${JSON.stringify(data)}`);
43e41f4b71Sopenharmony_ci  }
44e41f4b71Sopenharmony_ci});
45e41f4b71Sopenharmony_ci```
46