<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NS](./bitburner.ns.md) &gt; [ps](./bitburner.ns.ps.md)

## NS.ps() method

List running scripts on a server.

**Signature:**

```typescript
ps(host?: string): ProcessInfo[];
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

host


</td><td>

string


</td><td>

_(Optional)_ Hostname/IP of the target server. If not specified, it will be the current server’s IP by default.


</td></tr>
</tbody></table>

**Returns:**

[ProcessInfo](./bitburner.processinfo.md)<!-- -->\[\]

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


```js
const ps = ns.ps("home");
for (const script of ps) {
  ns.tprint(`${script.filename} ${script.threads}`);
  ns.tprint(script.args);
}
```

