2022-10-21 17:16:00 +02:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home ](./index.md ) > [bitburner ](./bitburner.md ) > [NS ](./bitburner.ns.md ) > [getScriptRam ](./bitburner.ns.getscriptram.md )
## NS.getScriptRam() method
Get the ram cost of a script.
2023-02-11 19:18:50 +01:00
**Signature:**
2022-10-21 17:16:00 +02:00
```typescript
getScriptRam(script: string, host?: string): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| script | string | Filename of script. This is case-sensitive. |
2023-02-11 19:18:50 +01:00
| host | string | _(Optional)_ Hostname of target server the script is located on. This is optional. If it is not specified then the function will use the current server as the target server. |
2022-10-21 17:16:00 +02:00
2023-02-11 19:18:50 +01:00
**Returns:**
2022-10-21 17:16:00 +02:00
number
Amount of RAM (in GB) required to run the specified script on the target server, 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.