Added getServerMaxRam and getServerUsedRam, deprecated getServerRam

This commit is contained in:
Olivier Gagnon
2021-05-03 01:07:46 -04:00
parent 9951c8b18f
commit 4d9439a007
8 changed files with 75 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
getServerUsedRam() Netscript Function
=====================================
.. js:function:: getServerUsedRam(hostname)
:RAM cost: 0.05 GB
:param string hostname: Hostname of target server.
:returns: Used ram on that server. In GB.
Example:
.. code-block:: javascript
usedRam = getServerUsedRam("harakiri-sushi"); // returns: 5.6
print("harakiri-sushi uses "+usedRam + "GB");