• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# ProcessInformation
2
3The **ProcessInformation** module defines the running information of a process.
4
5> **NOTE**
6>
7> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
8
9## Modules to Import
10
11```ts
12import appManager from '@ohos.app.ability.appManager';
13```
14
15## How to Use
16
17The process information is obtained by calling [getRunningProcessInformation](js-apis-app-ability-appManager.md#appmanagergetrunningprocessinformation9) of the **appManager** module.
18
19```ts
20import appManager from '@ohos.app.ability.appManager';
21
22appManager.getRunningProcessInformation((error, data) => {
23    console.log('error: '  + error.code + ' data: ' + JSON.stringify(data));
24});
25```
26
27## Attributes
28
29**System capability**: SystemCapability.Ability.AbilityRuntime.Core
30
31| Name| Type| Readable| Writable| Description|
32| -------- | -------- | -------- | -------- | -------- |
33| pid | number | Yes| No| Process ID.|
34| uid | number | Yes| No| User ID.|
35| processName | string | Yes| No| Process name.|
36| bundleNames | Array<string> | Yes| No| Names of all running bundles in the process.|
37