1# ProcessInfo
2
3The ProcessInfo module defines process information. You can use [getProcessInfo](js-apis-inner-app-context.md#contextgetprocessinfo7) to obtain information about the processes running on the current ability.
4
5> **NOTE**
6>
7> The initial APIs of this module are supported since API version 7. The APIs of this module can be used only in the FA model. Newly added APIs will be marked with a superscript to indicate their earliest API version.
8
9## Modules to Import
10
11```ts
12import featureAbility from '@ohos.ability.featureAbility';
13```
14
15## Attributes
16
17**System capability**: SystemCapability.Ability.AbilityRuntime.Core
18
19| Name | Type | Readable | Writable | Description |
20| -------- | -------- | -------- | -------- | -------- |
21| pid | number | Yes | No | Process ID. |
22| processName | string | Yes | No | Process name. |
23
24**Example**
25<!--code_no_check_fa-->
26```ts
27import featureAbility from '@ohos.ability.featureAbility';
28
29let context = featureAbility.getContext();
30context.getProcessInfo((error, data) => {
31    if (error && error.code !== 0) {
32        console.error(`getProcessInfo fail, error: ${JSON.stringify(error)}`);
33    } else {
34        console.log(`getProcessInfo success, data: ${JSON.stringify(data)}`);
35        let pid = data.pid;
36        let processName = data.processName;
37    }
38});
39```
40