2021-10-30 12:34:14 -04: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
2021-11-03 18:16:10 -04:00
Get the ram cost of a script.
2021-10-30 12:34:14 -04:00
< b > Signature:< / b >
```typescript
2021-10-30 15:46:34 -04:00
getScriptRam(script: string, host?: string): number;
2021-10-30 12:34:14 -04:00
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
2021-10-30 15:46:34 -04:00
| script | string | Filename of script. This is case-sensitive. |
2021-11-03 00:27:21 -04:00
| host | string | Host of target server the script is located on. This is optional, If it is not specified then the function will se the current server as the target server. |
2021-10-30 12:34:14 -04:00
< b > Returns:< / b >
number
2022-01-15 18:39:37 -05:00
Amount of RAM (in GB) required to run the specified script on the target server, and 0 if the script does not exist.
2021-10-30 12:34:14 -04:00
## Remarks
2021-10-30 15:46:34 -04:00
RAM cost: 0.1 GB
2021-10-30 12:34:14 -04:00
2021-11-03 18:16:10 -04:00
Returns the amount of RAM required to run the specified script on the target server. Returns 0 if the script does not exist.