mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-09 17:23:53 +01:00
974 B
974 B
NS.ps() method
List running scripts on a server.
Signature:
ps(host?: string): ProcessInfo[];
Parameters
Parameter | Type | Description |
---|---|---|
host | string | (Optional) Host address of the target server. If not specified, it will be the current server’s IP by default. |
Returns:
Array with general information about all scripts running on the specified target server.
Remarks
RAM cost: 0.2 GB
Returns an array with general information about all scripts running on the specified target server.
Example
const ps = ns.ps("home");
for (let script of ps) {
ns.tprint(`${script.filename} ${script.threads}`);
ns.tprint(script.args);
}