Home > bitburner > NS > getServer
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 };|
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.
RAM cost: 2 GB