mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-14 11:43:50 +01:00
16 lines
416 B
ReStructuredText
16 lines
416 B
ReStructuredText
getServerMaxRam() Netscript Function
|
|
====================================
|
|
|
|
.. js:function:: getServerMaxRam(hostname)
|
|
|
|
:RAM cost: 0.05 GB
|
|
:param string hostname: Hostname of target server.
|
|
:returns: Total ram available on that server. In GB.
|
|
|
|
Example:
|
|
|
|
.. code-block:: javascript
|
|
|
|
const maxRam = ns.getServerMaxRam("helios"); // returns: 16
|
|
ns.print("helios has "+maxRam + "GB");
|