bitburner-src/doc/source/netscript/basicfunctions/getServerMaxRam.rst

16 lines
416 B
ReStructuredText
Raw Normal View History

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
2023-01-06 13:43:09 +01:00
const maxRam = ns.getServerMaxRam("helios"); // returns: 16
ns.print("helios has "+maxRam + "GB");