• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# ProcessRunningInfo
2
3The **ProcessRunningInfo** module defines the running information of a process.
4
5> **NOTE**
6> - The APIs provided by this module are deprecated since API version 9. You are advised to use [ProcessInformation<sup>9+</sup>](js-apis-inner-application-processInformation.md) instead.
7> - The initial APIs of this module are supported since API version 8.
8
9## Attributes
10
11**System capability**: SystemCapability.Ability.AbilityRuntime.Mission
12
13| Name| Type| Readable| Writable| Description|
14| -------- | -------- | -------- | -------- | -------- |
15| pid | number | Yes| No| Process ID.|
16| uid | number | Yes| No| User ID.|
17| processName | string | Yes| No| Process name.|
18| bundleNames | Array&lt;string&gt; | Yes| No| Names of all running bundles in the process.|
19
20## Usage
21
22The process running information is obtained by using [getProcessRunningInfos](js-apis-application-appManager.md#appmanagergetprocessrunninginfosdeprecated) in **appManager**.
23
24**Example**
25```ts
26import appManager from '@ohos.application.appManager';
27
28appManager.getProcessRunningInfos().then((data) => {
29    console.log('success:' + JSON.stringify(data));
30}).catch((error) => {
31    console.log('failed:' + JSON.stringify(error));
32});
33```
34