Server : Apache System : Linux profile 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64 User : apache ( 48) PHP Version : 8.0.28 Disable Function : NONE Directory : /lib/node_modules/pm2/node_modules/ps-list/ |
declare namespace psList {
interface Options {
/**
Include other users' processes as well as your own.
On Windows this has no effect and will always be the users' own processes.
@default true
*/
readonly all?: boolean;
}
interface ProcessDescriptor {
readonly pid: number;
readonly name: string;
readonly ppid: number;
/**
Not supported on Windows.
*/
readonly cmd?: string;
/**
Not supported on Windows.
*/
readonly cpu?: number;
/**
Not supported on Windows.
*/
readonly memory?: number;
/**
Not supported on Windows.
*/
readonly uid?: number;
}
}
declare const psList: {
/**
Get running processes.
@returns List of running processes.
@example
```
import psList = require('ps-list');
(async () => {
console.log(await psList());
//=> [{pid: 3213, name: 'node', cmd: 'node test.js', ppid: 1, uid: 501, cpu: 0.1, memory: 1.5}, …]
})();
```
*/
(options?: psList.Options): Promise<psList.ProcessDescriptor[]>;
// TODO: remove this in the next major version, refactor the whole definition to:
// declare function psList(options?: psList.Options): Promise<psList.ProcessDescriptor[]>;
// export = psList;
default: typeof psList;
};
export = psList;