mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
Fix issue with 'Object.prototye' functions throwing errors during NetscriptJS RAM calculation. Fixed type with new Travel Confirmation setting loading to the correct initial value. Fixed Competition/Demand display for Products. Changed RAM for window/document access to be 100
This commit is contained in:
@@ -387,6 +387,34 @@ ls
|
||||
Returns an array with the filenames of all files on the specified server (as strings). The returned array
|
||||
is sorted in alphabetic order
|
||||
|
||||
ps
|
||||
^^
|
||||
|
||||
.. js:function:: ps(hostname/ip=current ip)
|
||||
|
||||
:param string ip: Hostname or IP address of the target server.
|
||||
If not specified, it will be the current server's IP by default
|
||||
|
||||
Returns an array with general information about all scripts running on the specified
|
||||
target server. The information for each server is given in an object with
|
||||
the following structure::
|
||||
|
||||
{
|
||||
filename: Script name,
|
||||
threads: Number of threads script is running with,
|
||||
args: Script's arguments
|
||||
}
|
||||
|
||||
Example usage (using :doc:`netscriptjs`)::
|
||||
|
||||
export async function main(ns) {
|
||||
const ps = ns.ps("home");
|
||||
for (const i in ps) {
|
||||
ns.tprint(ps[i].filename + ' ' + ps[i].threads);
|
||||
ns.tprint(ps[i].args);
|
||||
}
|
||||
}
|
||||
|
||||
hasRootAccess
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
|
||||
Reference in New Issue
Block a user