{ "type": "module", "source": "doc/api/os.md", "modules": [ { "textRaw": "OS", "name": "os", "introduced_in": "v0.10.0", "stability": 2, "stabilityText": "Stable", "desc": "

Source Code: lib/os.js

\n

The os module provides operating system-related utility methods and\nproperties. It can be accessed using:

\n
const os = require('os');\n
", "properties": [ { "textRaw": "`EOL` {string}", "type": "string", "name": "EOL", "meta": { "added": [ "v0.7.8" ], "changes": [] }, "desc": "

The operating system-specific end-of-line marker.

\n" }, { "textRaw": "`constants` {Object}", "type": "Object", "name": "constants", "meta": { "added": [ "v6.3.0" ], "changes": [] }, "desc": "

Contains commonly used operating system-specific constants for error codes,\nprocess signals, and so on. The specific constants defined are described in\nOS constants.

" } ], "methods": [ { "textRaw": "`os.arch()`", "type": "method", "name": "arch", "meta": { "added": [ "v0.5.0" ], "changes": [] }, "signatures": [ { "return": { "textRaw": "Returns: {string}", "name": "return", "type": "string" }, "params": [] } ], "desc": "

Returns the operating system CPU architecture for which the Node.js binary was\ncompiled. Possible values are 'arm', 'arm64', 'ia32', 'mips',\n'mipsel', 'ppc', 'ppc64', 's390', 's390x', 'x32', and 'x64'.

\n

The return value is equivalent to process.arch.

" }, { "textRaw": "`os.cpus()`", "type": "method", "name": "cpus", "meta": { "added": [ "v0.3.3" ], "changes": [] }, "signatures": [ { "return": { "textRaw": "Returns: {Object[]}", "name": "return", "type": "Object[]" }, "params": [] } ], "desc": "

Returns an array of objects containing information about each logical CPU core.

\n

The properties included on each object include:

\n\n\n
[\n  {\n    model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',\n    speed: 2926,\n    times: {\n      user: 252020,\n      nice: 0,\n      sys: 30340,\n      idle: 1070356870,\n      irq: 0\n    }\n  },\n  {\n    model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',\n    speed: 2926,\n    times: {\n      user: 306960,\n      nice: 0,\n      sys: 26980,\n      idle: 1071569080,\n      irq: 0\n    }\n  },\n  {\n    model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',\n    speed: 2926,\n    times: {\n      user: 248450,\n      nice: 0,\n      sys: 21750,\n      idle: 1070919370,\n      irq: 0\n    }\n  },\n  {\n    model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',\n    speed: 2926,\n    times: {\n      user: 256880,\n      nice: 0,\n      sys: 19430,\n      idle: 1070905480,\n      irq: 20\n    }\n  }\n]\n
\n

nice values are POSIX-only. On Windows, the nice values of all processors\nare always 0.

" }, { "textRaw": "`os.endianness()`", "type": "method", "name": "endianness", "meta": { "added": [ "v0.9.4" ], "changes": [] }, "signatures": [ { "return": { "textRaw": "Returns: {string}", "name": "return", "type": "string" }, "params": [] } ], "desc": "

Returns a string identifying the endianness of the CPU for which the Node.js\nbinary was compiled.

\n

Possible values are 'BE' for big endian and 'LE' for little endian.

" }, { "textRaw": "`os.freemem()`", "type": "method", "name": "freemem", "meta": { "added": [ "v0.3.3" ], "changes": [] }, "signatures": [ { "return": { "textRaw": "Returns: {integer}", "name": "return", "type": "integer" }, "params": [] } ], "desc": "

Returns the amount of free system memory in bytes as an integer.

" }, { "textRaw": "`os.getPriority([pid])`", "type": "method", "name": "getPriority", "meta": { "added": [ "v10.10.0" ], "changes": [] }, "signatures": [ { "return": { "textRaw": "Returns: {integer}", "name": "return", "type": "integer" }, "params": [ { "textRaw": "`pid` {integer} The process ID to retrieve scheduling priority for. **Default** `0`.", "name": "pid", "type": "integer", "desc": "The process ID to retrieve scheduling priority for. **Default** `0`." } ] } ], "desc": "

Returns the scheduling priority for the process specified by pid. If pid is\nnot provided or is 0, the priority of the current process is returned.

" }, { "textRaw": "`os.homedir()`", "type": "method", "name": "homedir", "meta": { "added": [ "v2.3.0" ], "changes": [] }, "signatures": [ { "return": { "textRaw": "Returns: {string}", "name": "return", "type": "string" }, "params": [] } ], "desc": "

Returns the string path of the current user's home directory.

\n

On POSIX, it uses the $HOME environment variable if defined. Otherwise it\nuses the effective UID to look up the user's home directory.

\n

On Windows, it uses the USERPROFILE environment variable if defined.\nOtherwise it uses the path to the profile directory of the current user.

" }, { "textRaw": "`os.hostname()`", "type": "method", "name": "hostname", "meta": { "added": [ "v0.3.3" ], "changes": [] }, "signatures": [ { "return": { "textRaw": "Returns: {string}", "name": "return", "type": "string" }, "params": [] } ], "desc": "

Returns the host name of the operating system as a string.

" }, { "textRaw": "`os.loadavg()`", "type": "method", "name": "loadavg", "meta": { "added": [ "v0.3.3" ], "changes": [] }, "signatures": [ { "return": { "textRaw": "Returns: {number[]}", "name": "return", "type": "number[]" }, "params": [] } ], "desc": "

Returns an array containing the 1, 5, and 15 minute load averages.

\n

The load average is a measure of system activity calculated by the operating\nsystem and expressed as a fractional number.

\n

The load average is a Unix-specific concept. On Windows, the return value is\nalways [0, 0, 0].

" }, { "textRaw": "`os.networkInterfaces()`", "type": "method", "name": "networkInterfaces", "meta": { "added": [ "v0.6.0" ], "changes": [] }, "signatures": [ { "return": { "textRaw": "Returns: {Object}", "name": "return", "type": "Object" }, "params": [] } ], "desc": "

Returns an object containing network interfaces that have been assigned a\nnetwork address.

\n

Each key on the returned object identifies a network interface. The associated\nvalue is an array of objects that each describe an assigned network address.

\n

The properties available on the assigned network address object include:

\n\n\n
{\n  lo: [\n    {\n      address: '127.0.0.1',\n      netmask: '255.0.0.0',\n      family: 'IPv4',\n      mac: '00:00:00:00:00:00',\n      internal: true,\n      cidr: '127.0.0.1/8'\n    },\n    {\n      address: '::1',\n      netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',\n      family: 'IPv6',\n      mac: '00:00:00:00:00:00',\n      scopeid: 0,\n      internal: true,\n      cidr: '::1/128'\n    }\n  ],\n  eth0: [\n    {\n      address: '192.168.1.108',\n      netmask: '255.255.255.0',\n      family: 'IPv4',\n      mac: '01:02:03:0a:0b:0c',\n      internal: false,\n      cidr: '192.168.1.108/24'\n    },\n    {\n      address: 'fe80::a00:27ff:fe4e:66a1',\n      netmask: 'ffff:ffff:ffff:ffff::',\n      family: 'IPv6',\n      mac: '01:02:03:0a:0b:0c',\n      scopeid: 1,\n      internal: false,\n      cidr: 'fe80::a00:27ff:fe4e:66a1/64'\n    }\n  ]\n}\n
" }, { "textRaw": "`os.platform()`", "type": "method", "name": "platform", "meta": { "added": [ "v0.5.0" ], "changes": [] }, "signatures": [ { "return": { "textRaw": "Returns: {string}", "name": "return", "type": "string" }, "params": [] } ], "desc": "

Returns a string identifying the operating system platform. The value is set\nat compile time. Possible values are 'aix', 'darwin', 'freebsd',\n'linux', 'openbsd', 'sunos', and 'win32'.

\n

The return value is equivalent to process.platform.

\n

The value 'android' may also be returned if Node.js is built on the Android\noperating system. Android support is experimental.

" }, { "textRaw": "`os.release()`", "type": "method", "name": "release", "meta": { "added": [ "v0.3.3" ], "changes": [] }, "signatures": [ { "return": { "textRaw": "Returns: {string}", "name": "return", "type": "string" }, "params": [] } ], "desc": "

Returns the operating system as a string.

\n

On POSIX systems, the operating system release is determined by calling\nuname(3). On Windows, GetVersionExW() is used. See\nhttps://en.wikipedia.org/wiki/Uname#Examples for more information.

" }, { "textRaw": "`os.setPriority([pid, ]priority)`", "type": "method", "name": "setPriority", "meta": { "added": [ "v10.10.0" ], "changes": [] }, "signatures": [ { "params": [ { "textRaw": "`pid` {integer} The process ID to set scheduling priority for. **Default** `0`.", "name": "pid", "type": "integer", "desc": "The process ID to set scheduling priority for. **Default** `0`." }, { "textRaw": "`priority` {integer} The scheduling priority to assign to the process.", "name": "priority", "type": "integer", "desc": "The scheduling priority to assign to the process." } ] } ], "desc": "

Attempts to set the scheduling priority for the process specified by pid. If\npid is not provided or is 0, the process ID of the current process is used.

\n

The priority input must be an integer between -20 (high priority) and 19\n(low priority). Due to differences between Unix priority levels and Windows\npriority classes, priority is mapped to one of six priority constants in\nos.constants.priority. When retrieving a process priority level, this range\nmapping may cause the return value to be slightly different on Windows. To avoid\nconfusion, set priority to one of the priority constants.

\n

On Windows, setting priority to PRIORITY_HIGHEST requires elevated user\nprivileges. Otherwise the set priority will be silently reduced to\nPRIORITY_HIGH.

" }, { "textRaw": "`os.tmpdir()`", "type": "method", "name": "tmpdir", "meta": { "added": [ "v0.9.9" ], "changes": [ { "version": "v2.0.0", "pr-url": "https://github.com/nodejs/node/pull/747", "description": "This function is now cross-platform consistent and no longer returns a path with a trailing slash on any platform" } ] }, "signatures": [ { "return": { "textRaw": "Returns: {string}", "name": "return", "type": "string" }, "params": [] } ], "desc": "

Returns the operating system's default directory for temporary files as a\nstring.

" }, { "textRaw": "`os.totalmem()`", "type": "method", "name": "totalmem", "meta": { "added": [ "v0.3.3" ], "changes": [] }, "signatures": [ { "return": { "textRaw": "Returns: {integer}", "name": "return", "type": "integer" }, "params": [] } ], "desc": "

Returns the total amount of system memory in bytes as an integer.

" }, { "textRaw": "`os.type()`", "type": "method", "name": "type", "meta": { "added": [ "v0.3.3" ], "changes": [] }, "signatures": [ { "return": { "textRaw": "Returns: {string}", "name": "return", "type": "string" }, "params": [] } ], "desc": "

Returns the operating system name as returned by uname(3). For example, it\nreturns 'Linux' on Linux, 'Darwin' on macOS, and 'Windows_NT' on Windows.

\n

See https://en.wikipedia.org/wiki/Uname#Examples for additional information\nabout the output of running uname(3) on various operating systems.

" }, { "textRaw": "`os.uptime()`", "type": "method", "name": "uptime", "meta": { "added": [ "v0.3.3" ], "changes": [ { "version": "v10.0.0", "pr-url": "https://github.com/nodejs/node/pull/20129", "description": "The result of this function no longer contains a fraction component on Windows." } ] }, "signatures": [ { "return": { "textRaw": "Returns: {integer}", "name": "return", "type": "integer" }, "params": [] } ], "desc": "

Returns the system uptime in number of seconds.

" }, { "textRaw": "`os.userInfo([options])`", "type": "method", "name": "userInfo", "meta": { "added": [ "v6.0.0" ], "changes": [] }, "signatures": [ { "return": { "textRaw": "Returns: {Object}", "name": "return", "type": "Object" }, "params": [ { "textRaw": "`options` {Object}", "name": "options", "type": "Object", "options": [ { "textRaw": "`encoding` {string} Character encoding used to interpret resulting strings. If `encoding` is set to `'buffer'`, the `username`, `shell`, and `homedir` values will be `Buffer` instances. **Default:** `'utf8'`.", "name": "encoding", "type": "string", "default": "`'utf8'`", "desc": "Character encoding used to interpret resulting strings. If `encoding` is set to `'buffer'`, the `username`, `shell`, and `homedir` values will be `Buffer` instances." } ] } ] } ], "desc": "

Returns information about the currently effective user. On POSIX platforms,\nthis is typically a subset of the password file. The returned object includes\nthe username, uid, gid, shell, and homedir. On Windows, the uid and\ngid fields are -1, and shell is null.

\n

The value of homedir returned by os.userInfo() is provided by the operating\nsystem. This differs from the result of os.homedir(), which queries\nenvironment variables for the home directory before falling back to the\noperating system response.

\n

Throws a SystemError if a user has no username or homedir.

" }, { "textRaw": "`os.version()`", "type": "method", "name": "version", "meta": { "added": [ "v13.11.0" ], "changes": [] }, "signatures": [ { "return": { "textRaw": "Returns {string}", "name": "return", "type": "string" }, "params": [] } ], "desc": "

Returns a string identifying the kernel version.

\n

On POSIX systems, the operating system release is determined by calling\nuname(3). On Windows, RtlGetVersion() is used, and if it is not available,\nGetVersionExW() will be used. See\nhttps://en.wikipedia.org/wiki/Uname#Examples for more information.

" } ], "modules": [ { "textRaw": "OS constants", "name": "os_constants", "desc": "

The following constants are exported by os.constants.

\n

Not all constants will be available on every operating system.

", "modules": [ { "textRaw": "Signal constants", "name": "signal_constants", "meta": { "changes": [ { "version": "v5.11.0", "pr-url": "https://github.com/nodejs/node/pull/6093", "description": "Added support for `SIGINFO`." } ] }, "desc": "

The following signal constants are exported by os.constants.signals.

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ConstantDescription
SIGHUPSent to indicate when a controlling terminal is closed or a parent\n process exits.
SIGINTSent to indicate when a user wishes to interrupt a process\n ((Ctrl+C)).
SIGQUITSent to indicate when a user wishes to terminate a process and perform a\n core dump.
SIGILLSent to a process to notify that it has attempted to perform an illegal,\n malformed, unknown, or privileged instruction.
SIGTRAPSent to a process when an exception has occurred.
SIGABRTSent to a process to request that it abort.
SIGIOTSynonym for SIGABRT
SIGBUSSent to a process to notify that it has caused a bus error.
SIGFPESent to a process to notify that it has performed an illegal arithmetic\n operation.
SIGKILLSent to a process to terminate it immediately.
SIGUSR1 SIGUSR2Sent to a process to identify user-defined conditions.
SIGSEGVSent to a process to notify of a segmentation fault.
SIGPIPESent to a process when it has attempted to write to a disconnected\n pipe.
SIGALRMSent to a process when a system timer elapses.
SIGTERMSent to a process to request termination.
SIGCHLDSent to a process when a child process terminates.
SIGSTKFLTSent to a process to indicate a stack fault on a coprocessor.
SIGCONTSent to instruct the operating system to continue a paused process.
SIGSTOPSent to instruct the operating system to halt a process.
SIGTSTPSent to a process to request it to stop.
SIGBREAKSent to indicate when a user wishes to interrupt a process.
SIGTTINSent to a process when it reads from the TTY while in the\n background.
SIGTTOUSent to a process when it writes to the TTY while in the\n background.
SIGURGSent to a process when a socket has urgent data to read.
SIGXCPUSent to a process when it has exceeded its limit on CPU usage.
SIGXFSZSent to a process when it grows a file larger than the maximum\n allowed.
SIGVTALRMSent to a process when a virtual timer has elapsed.
SIGPROFSent to a process when a system timer has elapsed.
SIGWINCHSent to a process when the controlling terminal has changed its\n size.
SIGIOSent to a process when I/O is available.
SIGPOLLSynonym for SIGIO
SIGLOSTSent to a process when a file lock has been lost.
SIGPWRSent to a process to notify of a power failure.
SIGINFOSynonym for SIGPWR
SIGSYSSent to a process to notify of a bad argument.
SIGUNUSEDSynonym for SIGSYS
", "type": "module", "displayName": "Signal constants" }, { "textRaw": "Error constants", "name": "error_constants", "desc": "

The following error constants are exported by os.constants.errno.

", "modules": [ { "textRaw": "POSIX error constants", "name": "posix_error_constants", "desc": "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ConstantDescription
E2BIGIndicates that the list of arguments is longer than expected.
EACCESIndicates that the operation did not have sufficient permissions.
EADDRINUSEIndicates that the network address is already in use.
EADDRNOTAVAILIndicates that the network address is currently unavailable for\n use.
EAFNOSUPPORTIndicates that the network address family is not supported.
EAGAINIndicates that there is no data available and to try the\n operation again later.
EALREADYIndicates that the socket already has a pending connection in\n progress.
EBADFIndicates that a file descriptor is not valid.
EBADMSGIndicates an invalid data message.
EBUSYIndicates that a device or resource is busy.
ECANCELEDIndicates that an operation was canceled.
ECHILDIndicates that there are no child processes.
ECONNABORTEDIndicates that the network connection has been aborted.
ECONNREFUSEDIndicates that the network connection has been refused.
ECONNRESETIndicates that the network connection has been reset.
EDEADLKIndicates that a resource deadlock has been avoided.
EDESTADDRREQIndicates that a destination address is required.
EDOMIndicates that an argument is out of the domain of the function.
EDQUOTIndicates that the disk quota has been exceeded.
EEXISTIndicates that the file already exists.
EFAULTIndicates an invalid pointer address.
EFBIGIndicates that the file is too large.
EHOSTUNREACHIndicates that the host is unreachable.
EIDRMIndicates that the identifier has been removed.
EILSEQIndicates an illegal byte sequence.
EINPROGRESSIndicates that an operation is already in progress.
EINTRIndicates that a function call was interrupted.
EINVALIndicates that an invalid argument was provided.
EIOIndicates an otherwise unspecified I/O error.
EISCONNIndicates that the socket is connected.
EISDIRIndicates that the path is a directory.
ELOOPIndicates too many levels of symbolic links in a path.
EMFILEIndicates that there are too many open files.
EMLINKIndicates that there are too many hard links to a file.
EMSGSIZEIndicates that the provided message is too long.
EMULTIHOPIndicates that a multihop was attempted.
ENAMETOOLONGIndicates that the filename is too long.
ENETDOWNIndicates that the network is down.
ENETRESETIndicates that the connection has been aborted by the network.
ENETUNREACHIndicates that the network is unreachable.
ENFILEIndicates too many open files in the system.
ENOBUFSIndicates that no buffer space is available.
ENODATAIndicates that no message is available on the stream head read\n queue.
ENODEVIndicates that there is no such device.
ENOENTIndicates that there is no such file or directory.
ENOEXECIndicates an exec format error.
ENOLCKIndicates that there are no locks available.
ENOLINKIndications that a link has been severed.
ENOMEMIndicates that there is not enough space.
ENOMSGIndicates that there is no message of the desired type.
ENOPROTOOPTIndicates that a given protocol is not available.
ENOSPCIndicates that there is no space available on the device.
ENOSRIndicates that there are no stream resources available.
ENOSTRIndicates that a given resource is not a stream.
ENOSYSIndicates that a function has not been implemented.
ENOTCONNIndicates that the socket is not connected.
ENOTDIRIndicates that the path is not a directory.
ENOTEMPTYIndicates that the directory is not empty.
ENOTSOCKIndicates that the given item is not a socket.
ENOTSUPIndicates that a given operation is not supported.
ENOTTYIndicates an inappropriate I/O control operation.
ENXIOIndicates no such device or address.
EOPNOTSUPPIndicates that an operation is not supported on the socket. Although\n ENOTSUP and EOPNOTSUPP have the same value\n on Linux, according to POSIX.1 these error values should be distinct.)
EOVERFLOWIndicates that a value is too large to be stored in a given data\n type.
EPERMIndicates that the operation is not permitted.
EPIPEIndicates a broken pipe.
EPROTOIndicates a protocol error.
EPROTONOSUPPORTIndicates that a protocol is not supported.
EPROTOTYPEIndicates the wrong type of protocol for a socket.
ERANGEIndicates that the results are too large.
EROFSIndicates that the file system is read only.
ESPIPEIndicates an invalid seek operation.
ESRCHIndicates that there is no such process.
ESTALEIndicates that the file handle is stale.
ETIMEIndicates an expired timer.
ETIMEDOUTIndicates that the connection timed out.
ETXTBSYIndicates that a text file is busy.
EWOULDBLOCKIndicates that the operation would block.
EXDEVIndicates an improper link.\n
", "type": "module", "displayName": "POSIX error constants" }, { "textRaw": "Windows-specific error constants", "name": "windows-specific_error_constants", "desc": "

The following error codes are specific to the Windows operating system.

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ConstantDescription
WSAEINTRIndicates an interrupted function call.
WSAEBADFIndicates an invalid file handle.
WSAEACCESIndicates insufficient permissions to complete the operation.
WSAEFAULTIndicates an invalid pointer address.
WSAEINVALIndicates that an invalid argument was passed.
WSAEMFILEIndicates that there are too many open files.
WSAEWOULDBLOCKIndicates that a resource is temporarily unavailable.
WSAEINPROGRESSIndicates that an operation is currently in progress.
WSAEALREADYIndicates that an operation is already in progress.
WSAENOTSOCKIndicates that the resource is not a socket.
WSAEDESTADDRREQIndicates that a destination address is required.
WSAEMSGSIZEIndicates that the message size is too long.
WSAEPROTOTYPEIndicates the wrong protocol type for the socket.
WSAENOPROTOOPTIndicates a bad protocol option.
WSAEPROTONOSUPPORTIndicates that the protocol is not supported.
WSAESOCKTNOSUPPORTIndicates that the socket type is not supported.
WSAEOPNOTSUPPIndicates that the operation is not supported.
WSAEPFNOSUPPORTIndicates that the protocol family is not supported.
WSAEAFNOSUPPORTIndicates that the address family is not supported.
WSAEADDRINUSEIndicates that the network address is already in use.
WSAEADDRNOTAVAILIndicates that the network address is not available.
WSAENETDOWNIndicates that the network is down.
WSAENETUNREACHIndicates that the network is unreachable.
WSAENETRESETIndicates that the network connection has been reset.
WSAECONNABORTEDIndicates that the connection has been aborted.
WSAECONNRESETIndicates that the connection has been reset by the peer.
WSAENOBUFSIndicates that there is no buffer space available.
WSAEISCONNIndicates that the socket is already connected.
WSAENOTCONNIndicates that the socket is not connected.
WSAESHUTDOWNIndicates that data cannot be sent after the socket has been\n shutdown.
WSAETOOMANYREFSIndicates that there are too many references.
WSAETIMEDOUTIndicates that the connection has timed out.
WSAECONNREFUSEDIndicates that the connection has been refused.
WSAELOOPIndicates that a name cannot be translated.
WSAENAMETOOLONGIndicates that a name was too long.
WSAEHOSTDOWNIndicates that a network host is down.
WSAEHOSTUNREACHIndicates that there is no route to a network host.
WSAENOTEMPTYIndicates that the directory is not empty.
WSAEPROCLIMIndicates that there are too many processes.
WSAEUSERSIndicates that the user quota has been exceeded.
WSAEDQUOTIndicates that the disk quota has been exceeded.
WSAESTALEIndicates a stale file handle reference.
WSAEREMOTEIndicates that the item is remote.
WSASYSNOTREADYIndicates that the network subsystem is not ready.
WSAVERNOTSUPPORTEDIndicates that the winsock.dll version is out of\n range.
WSANOTINITIALISEDIndicates that successful WSAStartup has not yet been performed.
WSAEDISCONIndicates that a graceful shutdown is in progress.
WSAENOMOREIndicates that there are no more results.
WSAECANCELLEDIndicates that an operation has been canceled.
WSAEINVALIDPROCTABLEIndicates that the procedure call table is invalid.
WSAEINVALIDPROVIDERIndicates an invalid service provider.
WSAEPROVIDERFAILEDINITIndicates that the service provider failed to initialized.
WSASYSCALLFAILUREIndicates a system call failure.
WSASERVICE_NOT_FOUNDIndicates that a service was not found.
WSATYPE_NOT_FOUNDIndicates that a class type was not found.
WSA_E_NO_MOREIndicates that there are no more results.
WSA_E_CANCELLEDIndicates that the call was canceled.
WSAEREFUSEDIndicates that a database query was refused.
", "type": "module", "displayName": "Windows-specific error constants" } ], "type": "module", "displayName": "Error constants" }, { "textRaw": "dlopen constants", "name": "dlopen_constants", "desc": "

If available on the operating system, the following constants\nare exported in os.constants.dlopen. See dlopen(3) for detailed\ninformation.

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ConstantDescription
RTLD_LAZYPerform lazy binding. Node.js sets this flag by default.
RTLD_NOWResolve all undefined symbols in the library before dlopen(3)\n returns.
RTLD_GLOBALSymbols defined by the library will be made available for symbol\n resolution of subsequently loaded libraries.
RTLD_LOCALThe converse of RTLD_GLOBAL. This is the default behavior\n if neither flag is specified.
RTLD_DEEPBINDMake a self-contained library use its own symbols in preference to\n symbols from previously loaded libraries.
", "type": "module", "displayName": "dlopen constants" }, { "textRaw": "Priority constants", "name": "priority_constants", "meta": { "added": [ "v10.10.0" ], "changes": [] }, "desc": "

The following process scheduling constants are exported by\nos.constants.priority.

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ConstantDescription
PRIORITY_LOWThe lowest process scheduling priority. This corresponds to\n IDLE_PRIORITY_CLASS on Windows, and a nice value of\n 19 on all other platforms.
PRIORITY_BELOW_NORMALThe process scheduling priority above PRIORITY_LOW and\n below PRIORITY_NORMAL. This corresponds to\n BELOW_NORMAL_PRIORITY_CLASS on Windows, and a nice value of\n 10 on all other platforms.
PRIORITY_NORMALThe default process scheduling priority. This corresponds to\n NORMAL_PRIORITY_CLASS on Windows, and a nice value of\n 0 on all other platforms.
PRIORITY_ABOVE_NORMALThe process scheduling priority above PRIORITY_NORMAL and\n below PRIORITY_HIGH. This corresponds to\n ABOVE_NORMAL_PRIORITY_CLASS on Windows, and a nice value of\n -7 on all other platforms.
PRIORITY_HIGHThe process scheduling priority above PRIORITY_ABOVE_NORMAL\n and below PRIORITY_HIGHEST. This corresponds to\n HIGH_PRIORITY_CLASS on Windows, and a nice value of\n -14 on all other platforms.
PRIORITY_HIGHESTThe highest process scheduling priority. This corresponds to\n REALTIME_PRIORITY_CLASS on Windows, and a nice value of\n -20 on all other platforms.
", "type": "module", "displayName": "Priority constants" }, { "textRaw": "libuv constants", "name": "libuv_constants", "desc": "\n \n \n \n \n \n \n \n \n
ConstantDescription
UV_UDP_REUSEADDR
", "type": "module", "displayName": "libuv constants" } ], "type": "module", "displayName": "OS constants" } ], "type": "module", "displayName": "OS" } ] }