mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 06:48:42 +02:00
Added getServerMaxRam and getServerUsedRam, deprecated getServerRam
This commit is contained in:
15
doc/source/netscript/basicfunctions/getServerMaxRam.rst
Normal file
15
doc/source/netscript/basicfunctions/getServerMaxRam.rst
Normal file
@@ -0,0 +1,15 @@
|
||||
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
|
||||
|
||||
maxRam = getServerMaxRam("helios"); // returns: 16
|
||||
print("helios has "+maxRam + "GB");
|
||||
@@ -3,6 +3,8 @@ getServerRam() Netscript Function
|
||||
|
||||
.. js:function:: getServerRam(hostname)
|
||||
|
||||
.. warning:: This function is deprecated.
|
||||
|
||||
: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
|
||||
|
||||
15
doc/source/netscript/basicfunctions/getServerUsedRam.rst
Normal file
15
doc/source/netscript/basicfunctions/getServerUsedRam.rst
Normal 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");
|
||||
@@ -54,7 +54,8 @@ This includes information such as function signatures, what they do, and their r
|
||||
getServerMinSecurityLevel() <basicfunctions/getServerMinSecurityLevel>
|
||||
getServerRequiredHackingLevel() <basicfunctions/getServerRequiredHackingLevel>
|
||||
getServerNumPortsRequired() <basicfunctions/getServerNumPortsRequired>
|
||||
getServerRam() <basicfunctions/getServerRam>
|
||||
getServerMaxRam() <basicfunctions/getServerMaxRam>
|
||||
getServerUsedRam() <basicfunctions/getServerUsedRam>
|
||||
serverExists() <basicfunctions/serverExists>
|
||||
fileExists() <basicfunctions/fileExists>
|
||||
isRunning() <basicfunctions/isRunning>
|
||||
@@ -90,3 +91,8 @@ This includes information such as function signatures, what they do, and their r
|
||||
wget() <basicfunctions/wget>
|
||||
getFavorToDonate() <basicfunctions/getFavorToDonate>
|
||||
flags() <basicfunctions/flags>
|
||||
|
||||
.. toctree::
|
||||
:caption: Deprecated:
|
||||
|
||||
getServerRam() <basicfunctions/getServerRam>
|
||||
Reference in New Issue
Block a user