work to make documentation unified.

This commit is contained in:
Olivier Gagnon
2021-03-12 02:51:56 -05:00
parent a00c253dcb
commit 2ce6ff2041
176 changed files with 1325 additions and 916 deletions

View File

@@ -1,17 +1,21 @@
getServerRam() Netscript Function
=================================
.. js:function:: getServerRam(hostname/ip)
.. js:function:: getServerRam(hostname)
:param string hostname/ip: Hostname or IP of target server
:RAM cost: 0.1 GB
:param string hostname: Hostname of target server.
:returns: An array of 2 number, first number is the total RAM, second the
used RAM.
Returns an array with two elements that gives information about a server's memory (RAM). The first
element in the array is the amount of RAM that the server has total (in GB). The second element in
the array is the amount of RAM that is currently being used on the server (in GB).
Example::
Example:
res = getServerRam("helios");
.. code-block:: javascript
res = getServerRam("helios"); // returns: [5, 10]
totalRam = res[0];
ramUsed = res[1];