1e41f4b71Sopenharmony_ci# ProcessInfo 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ciThe 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. 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci> **NOTE** 6e41f4b71Sopenharmony_ci> 7e41f4b71Sopenharmony_ci> 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. 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ci## Modules to Import 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_ci```ts 12e41f4b71Sopenharmony_ciimport featureAbility from '@ohos.ability.featureAbility'; 13e41f4b71Sopenharmony_ci``` 14e41f4b71Sopenharmony_ci 15e41f4b71Sopenharmony_ci## Attributes 16e41f4b71Sopenharmony_ci 17e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Ability.AbilityRuntime.Core 18e41f4b71Sopenharmony_ci 19e41f4b71Sopenharmony_ci| Name | Type | Readable | Writable | Description | 20e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | -------- | 21e41f4b71Sopenharmony_ci| pid | number | Yes | No | Process ID. | 22e41f4b71Sopenharmony_ci| processName | string | Yes | No | Process name. | 23e41f4b71Sopenharmony_ci 24e41f4b71Sopenharmony_ci**Example** 25e41f4b71Sopenharmony_ci<!--code_no_check_fa--> 26e41f4b71Sopenharmony_ci```ts 27e41f4b71Sopenharmony_ciimport featureAbility from '@ohos.ability.featureAbility'; 28e41f4b71Sopenharmony_ci 29e41f4b71Sopenharmony_cilet context = featureAbility.getContext(); 30e41f4b71Sopenharmony_cicontext.getProcessInfo((error, data) => { 31e41f4b71Sopenharmony_ci if (error && error.code !== 0) { 32e41f4b71Sopenharmony_ci console.error(`getProcessInfo fail, error: ${JSON.stringify(error)}`); 33e41f4b71Sopenharmony_ci } else { 34e41f4b71Sopenharmony_ci console.log(`getProcessInfo success, data: ${JSON.stringify(data)}`); 35e41f4b71Sopenharmony_ci let pid = data.pid; 36e41f4b71Sopenharmony_ci let processName = data.processName; 37e41f4b71Sopenharmony_ci } 38e41f4b71Sopenharmony_ci}); 39e41f4b71Sopenharmony_ci``` 40