<!-- 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; [getScriptRam](./bitburner.ns.getscriptram.md)

## NS.getScriptRam() method

Get the ram cost of a script.

**Signature:**

```typescript
getScriptRam(script: string, host?: string): number;
```

## Parameters

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

Parameter


</th><th>

Type


</th><th>

Description


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

script


</td><td>

string


</td><td>

Filename of script. This is case-sensitive.


</td></tr>
<tr><td>

host


</td><td>

string


</td><td>

_(Optional)_ Hostname/IP of the server the target script is located on. Optional. Defaults to the server the calling script is running on.


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

**Returns:**

number

Amount of RAM (in GB) required to run the specified script, and 0 if the script does not exist.

## Remarks

RAM cost: 0.1 GB

Returns the amount of RAM required to run the specified script on the target server. Returns 0 if the script does not exist.

