Files
bitburner-src/markdown/bitburner.ns.getserver.md
T

998 B

Home > bitburner > NS > getServer

NS.getServer() method

Returns data of a server.

If the server is a darknet server, it will also contain the "isOnline" field. If the darknet server has recently gone offline, the returned object will be a dummy server object with isOnline: false.

Signature:

getServer(host?: string): Server & { isOnline?: boolean };

Parameters

Parameter

Type

Description

host

string

(Optional) Optional. Hostname/IP of the server. Defaults to the hostname of the running script's server.

Returns:

Server & { isOnline?: boolean }

Data of the server.

Remarks

RAM cost: 2 GB