{"$schema":"https://doc-kit.nodejs.org/schemas/api-doc/1.0.0.json","id":"os","path":"/os","type":"module","module":"os","title":"OS","introducedIn":"v0.10.0","sourceLink":{"path":"lib/os.js","url":"https://github.com/nodejs/node/blob/HEAD/lib/os.js"},"stability":{"index":"2","description":"Stable"},"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"The `node:os` module provides operating system-related utility methods and\nproperties. It can be accessed using:\n\n```mjs\nimport os from 'node:os';\n```\n\n```cjs\nconst os = require('node:os');\n```","summary":"The `node:os` module provides operating system-related utility methods and properties. It can be accessed using:","examples":[{"language":"mjs","displayName":null,"code":"import os from 'node:os';"},{"language":"cjs","displayName":null,"code":"const os = require('node:os');"}],"children":[{"kind":"property","id":"oseol","name":"EOL","title":"`os.EOL`","scope":"module","overloadOf":null,"stability":null,"added":["v0.7.8"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"The operating system-specific end-of-line marker.\n\n* `\\n` on POSIX\n* `\\r\\n` on Windows","summary":"The operating system-specific end-of-line marker.","examples":[],"children":[]},{"kind":"method","id":"osavailableparallelism","name":"availableParallelism","title":"`os.availableParallelism()`","scope":"module","overloadOf":null,"stability":null,"added":["v19.4.0","v18.14.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[],"returns":{"type":{"text":"integer","links":[{"name":"integer","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":7}]},"description":""}},"description":"Returns an estimate of the default amount of parallelism a program should use.\nAlways returns a value greater than zero.\n\nThis function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism).","summary":"Returns an estimate of the default amount of parallelism a program should use. Always returns a value greater than zero.","examples":[],"children":[]},{"kind":"method","id":"osarch","name":"arch","title":"`os.arch()`","scope":"module","overloadOf":null,"stability":null,"added":["v0.5.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[],"returns":{"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":""}},"description":"Returns the operating system CPU architecture for which the Node.js binary was\ncompiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`,\n`'mips'`, `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`.\n\nThe return value is equivalent to [`process.arch`](process.html#processarch).","summary":"Returns the operating system CPU architecture for which the Node.js binary was compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`.","examples":[],"children":[]},{"kind":"property","id":"osconstants","name":"constants","title":"`os.constants`","scope":"module","overloadOf":null,"stability":null,"added":["v6.3.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"Object","links":[{"name":"Object","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object","start":0,"end":6}]},"default":null,"description":"Contains commonly used operating system-specific constants for error codes,\nprocess signals, and so on. The specific constants defined are described in\n[OS constants](#os-constants).","summary":"Contains commonly used operating system-specific constants for error codes, process signals, and so on. The specific constants defined are described in OS constants.","examples":[],"children":[]},{"kind":"method","id":"oscpus","name":"cpus","title":"`os.cpus()`","scope":"module","overloadOf":null,"stability":null,"added":["v0.3.3"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[],"returns":{"type":{"text":"Object[]","links":[{"name":"Object","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object","start":0,"end":6}]},"description":""}},"description":"Returns an array of objects containing information about each logical CPU core.\nThe array will be empty if no CPU information is available, such as if the\n`/proc` file system is unavailable.\n\nThe properties included on each object include:\n\n* `model` {string}\n* `speed` {number} (in MHz)\n* `times` {Object}\n  * `user` {number} The number of milliseconds the CPU has spent in user mode.\n  * `nice` {number} The number of milliseconds the CPU has spent in nice mode.\n  * `sys` {number} The number of milliseconds the CPU has spent in sys mode.\n  * `idle` {number} The number of milliseconds the CPU has spent in idle mode.\n  * `irq` {number} The number of milliseconds the CPU has spent in irq mode.\n\n```js\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\n`nice` values are POSIX-only. On Windows, the `nice` values of all processors\nare always 0.\n\n`os.cpus().length` should not be used to calculate the amount of parallelism\navailable to an application. Use\n[`os.availableParallelism()`](#osavailableparallelism) for this purpose.","summary":"Returns an array of objects containing information about each logical CPU core. The array will be empty if no CPU information is available, such as if the `/proc` file system is unavailable.","examples":[{"language":"js","displayName":null,"code":"[\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];"}],"children":[]},{"kind":"property","id":"osdevnull","name":"devNull","title":"`os.devNull`","scope":"module","overloadOf":null,"stability":null,"added":["v16.3.0","v14.18.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"default":null,"description":"The platform-specific file path of the null device.\n\n* `\\\\.\\nul` on Windows\n* `/dev/null` on POSIX","summary":"The platform-specific file path of the null device.","examples":[],"children":[]},{"kind":"method","id":"osendianness","name":"endianness","title":"`os.endianness()`","scope":"module","overloadOf":null,"stability":null,"added":["v0.9.4"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[],"returns":{"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":""}},"description":"Returns a string identifying the endianness of the CPU for which the Node.js\nbinary was compiled.\n\nPossible values are `'BE'` for big endian and `'LE'` for little endian.","summary":"Returns a string identifying the endianness of the CPU for which the Node.js binary was compiled.","examples":[],"children":[]},{"kind":"method","id":"osfreemem","name":"freemem","title":"`os.freemem()`","scope":"module","overloadOf":null,"stability":null,"added":["v0.3.3"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[],"returns":{"type":{"text":"integer","links":[{"name":"integer","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":7}]},"description":""}},"description":"Returns the amount of free system memory in bytes as an integer.","summary":"Returns the amount of free system memory in bytes as an integer.","examples":[],"children":[]},{"kind":"method","id":"osgetprioritypid","name":"getPriority","title":"`os.getPriority([pid])`","scope":"module","overloadOf":null,"stability":null,"added":["v10.10.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[{"name":"pid","type":{"text":"integer","links":[{"name":"integer","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":7}]},"description":"The process ID to retrieve scheduling priority for.","default":"0","optional":true,"rest":false,"properties":[]}],"returns":{"type":{"text":"integer","links":[{"name":"integer","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":7}]},"description":""}},"description":"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.","summary":"Returns the scheduling priority for the process specified by `pid`. If `pid` is not provided or is `0`, the priority of the current process is returned.","examples":[],"children":[]},{"kind":"method","id":"oshomedir","name":"homedir","title":"`os.homedir()`","scope":"module","overloadOf":null,"stability":null,"added":["v2.3.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[],"returns":{"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":""}},"description":"Returns the string path of the current user's home directory.\n\nOn POSIX, it uses the `$HOME` environment variable if defined. Otherwise it\nuses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory.\n\nOn Windows, it uses the `USERPROFILE` environment variable if defined.\nOtherwise it uses the path to the profile directory of the current user.","summary":"Returns the string path of the current user's home directory.","examples":[],"children":[]},{"kind":"method","id":"oshostname","name":"hostname","title":"`os.hostname()`","scope":"module","overloadOf":null,"stability":null,"added":["v0.3.3"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[],"returns":{"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":""}},"description":"Returns the host name of the operating system as a string.","summary":"Returns the host name of the operating system as a string.","examples":[],"children":[]},{"kind":"method","id":"osloadavg","name":"loadavg","title":"`os.loadavg()`","scope":"module","overloadOf":null,"stability":null,"added":["v0.3.3"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[],"returns":{"type":{"text":"number[]","links":[{"name":"number","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":6}]},"description":""}},"description":"Returns an array containing the 1, 5, and 15 minute load averages.\n\nThe load average is a measure of system activity calculated by the operating\nsystem and expressed as a fractional number.\n\nThe load average is a Unix-specific concept. On Windows, the return value is\nalways `[0, 0, 0]`.","summary":"Returns an array containing the 1, 5, and 15 minute load averages.","examples":[],"children":[]},{"kind":"method","id":"osmachine","name":"machine","title":"`os.machine()`","scope":"module","overloadOf":null,"stability":null,"added":["v18.9.0","v16.18.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[],"returns":{"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":""}},"description":"Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`,\n`mips`, `mips64`, `ppc64`, `ppc64le`, `s390x`, `i386`, `i686`, `x86_64`.\n\nOn POSIX systems, the machine type is determined by calling\n[`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not\navailable, `GetVersionExW()` will be used. See\n<https://en.wikipedia.org/wiki/Uname#Examples> for more information.","summary":"Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`, `mips`, `mips64`, `ppc64`, `ppc64le`, `s390x`, `i386`, `i686`, `x86_64`.","examples":[],"children":[]},{"kind":"method","id":"osnetworkinterfaces","name":"networkInterfaces","title":"`os.networkInterfaces()`","scope":"module","overloadOf":null,"stability":null,"added":["v0.6.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v18.4.0"],"prUrl":"https://github.com/nodejs/node/pull/43054","commit":null,"description":"The `family` property now returns a string instead of a number."},{"versions":["v18.0.0"],"prUrl":"https://github.com/nodejs/node/pull/41431","commit":null,"description":"The `family` property now returns a number instead of a string."}],"signature":{"parameters":[],"returns":{"type":{"text":"Object","links":[{"name":"Object","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object","start":0,"end":6}]},"description":""}},"description":"Returns an object containing network interfaces that have been assigned a\nnetwork address.\n\nEach 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\nThe properties available on the assigned network address object include:\n\n* `address` {string} The assigned IPv4 or IPv6 address\n* `netmask` {string} The IPv4 or IPv6 network mask\n* `family` {string} Either `IPv4` or `IPv6`\n* `mac` {string} The MAC address of the network interface\n* `internal` {boolean} `true` if the network interface is a loopback or\n  similar interface that is not remotely accessible; otherwise `false`\n* `scopeid` {number} The numeric IPv6 scope ID (only specified when `family`\n  is `IPv6`)\n* `cidr` {string} The assigned IPv4 or IPv6 address with the routing prefix\n  in CIDR notation. If the `netmask` is invalid, this property is set\n  to `null`.\n\n```json\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```","summary":"Returns an object containing network interfaces that have been assigned a network address.","examples":[{"language":"json","displayName":null,"code":"{\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}"}],"children":[]},{"kind":"method","id":"osplatform","name":"platform","title":"`os.platform()`","scope":"module","overloadOf":null,"stability":null,"added":["v0.5.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[],"returns":{"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":""}},"description":"Returns a string identifying the operating system platform for which\nthe Node.js binary was compiled. The value is set at compile time.\nPossible values are `'aix'`, `'darwin'`, `'freebsd'`,`'linux'`,\n`'openbsd'`, `'sunos'`, and `'win32'`.\n\nThe return value is equivalent to [`process.platform`](process.html#processplatform).\n\nThe value `'android'` may also be returned if Node.js is built on the Android\noperating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#android).","summary":"Returns a string identifying the operating system platform for which the Node.js binary was compiled. The value is set at compile time. Possible values are `'aix'`, `'darwin'`, `'freebsd'`,`'linux'`, `'openbsd'`, `'sunos'`, and `'win32'`.","examples":[],"children":[]},{"kind":"method","id":"osrelease","name":"release","title":"`os.release()`","scope":"module","overloadOf":null,"stability":null,"added":["v0.3.3"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[],"returns":{"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":""}},"description":"Returns the operating system as a string.\n\nOn POSIX systems, the operating system release is determined by calling\n[`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See\n<https://en.wikipedia.org/wiki/Uname#Examples> for more information.","summary":"Returns the operating system as a string.","examples":[],"children":[]},{"kind":"method","id":"ossetprioritypid-priority","name":"setPriority","title":"`os.setPriority([pid, ]priority)`","scope":"module","overloadOf":null,"stability":null,"added":["v10.10.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[{"name":"pid","type":{"text":"integer","links":[{"name":"integer","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":7}]},"description":"The process ID to set scheduling priority for.","default":"0","optional":true,"rest":false,"properties":[]},{"name":"priority","type":{"text":"integer","links":[{"name":"integer","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":7}]},"description":"The scheduling priority to assign to the process.","default":null,"optional":false,"rest":false,"properties":[]}],"returns":null},"description":"Attempts to set the scheduling priority for the process specified by `pid`. If\n`pid` is not provided or is `0`, the process ID of the current process is used.\n\nThe `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\n`os.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\nOn Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user\nprivileges. Otherwise the set priority will be silently reduced to\n`PRIORITY_HIGH`.","summary":"Attempts to set the scheduling priority for the process specified by `pid`. If `pid` is not provided or is `0`, the process ID of the current process is used.","examples":[],"children":[]},{"kind":"method","id":"ostmpdir","name":"tmpdir","title":"`os.tmpdir()`","scope":"module","overloadOf":null,"stability":null,"added":["v0.9.9"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v2.0.0"],"prUrl":"https://github.com/nodejs/node/pull/747","commit":null,"description":"This function is now cross-platform consistent and no longer returns a path with a trailing slash on any platform."}],"signature":{"parameters":[],"returns":{"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":""}},"description":"Returns the operating system's default directory for temporary files as a\nstring.\n\nOn Windows, the result can be overridden by `TEMP` and `TMP` environment variables, and\n`TEMP` takes precedence over `TMP`. If neither is set, it defaults to `%SystemRoot%\\temp`\nor `%windir%\\temp`.\n\nOn non-Windows platforms, `TMPDIR`, `TMP` and `TEMP` environment variables will be checked\nto override the result of this method, in the described order. If none of them is set, it\ndefaults to `/tmp`.\n\nSome operating system distributions would either configure `TMPDIR` (non-Windows) or\n`TEMP` and `TMP` (Windows) by default without additional configurations by the system\nadministrators. The result of `os.tmpdir()` typically reflects the system preference\nunless it's explicitly overridden by the users.","summary":"Returns the operating system's default directory for temporary files as a string.","examples":[],"children":[]},{"kind":"method","id":"ostotalmem","name":"totalmem","title":"`os.totalmem()`","scope":"module","overloadOf":null,"stability":null,"added":["v0.3.3"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[],"returns":{"type":{"text":"integer","links":[{"name":"integer","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":7}]},"description":""}},"description":"Returns the total amount of system memory in bytes as an integer.","summary":"Returns the total amount of system memory in bytes as an integer.","examples":[],"children":[]},{"kind":"method","id":"ostype","name":"type","title":"`os.type()`","scope":"module","overloadOf":null,"stability":null,"added":["v0.3.3"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[],"returns":{"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":""}},"description":"Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it\nreturns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows.\n\nSee <https://en.wikipedia.org/wiki/Uname#Examples> for additional information\nabout the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems.","summary":"Returns the operating system name as returned by `uname(3)`. For example, it returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows.","examples":[],"children":[]},{"kind":"method","id":"osuptime","name":"uptime","title":"`os.uptime()`","scope":"module","overloadOf":null,"stability":null,"added":["v0.3.3"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v10.0.0"],"prUrl":"https://github.com/nodejs/node/pull/20129","commit":null,"description":"The result of this function no longer contains a fraction component on Windows."}],"signature":{"parameters":[],"returns":{"type":{"text":"integer","links":[{"name":"integer","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type","start":0,"end":7}]},"description":""}},"description":"Returns the system uptime in number of seconds.","summary":"Returns the system uptime in number of seconds.","examples":[],"children":[]},{"kind":"method","id":"osuserinfooptions","name":"userInfo","title":"`os.userInfo([options])`","scope":"module","overloadOf":null,"stability":null,"added":["v6.0.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[{"name":"options","type":{"text":"Object","links":[{"name":"Object","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object","start":0,"end":6}]},"description":"","default":null,"optional":true,"rest":false,"properties":[{"name":"encoding","type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":"Character encoding used to interpret resulting strings.\nIf `encoding` is set to `'buffer'`, the `username`, `shell`, and `homedir`\nvalues will be `Buffer` instances.","default":"'utf8'","optional":true,"rest":false,"properties":[]}]}],"returns":{"type":{"text":"Object","links":[{"name":"Object","href":"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object","start":0,"end":6}]},"description":""}},"description":"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\n`gid` fields are `-1`, and `shell` is `null`.\n\nThe 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\nThrows a [`SystemError`](errors.html#class-systemerror) if a user has no `username` or `homedir`.","summary":"Returns information about the currently effective user. On POSIX platforms, this is typically a subset of the password file. The returned object includes the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and `gid` fields are `-1`, and `shell` is `null`.","examples":[],"children":[]},{"kind":"method","id":"osversion","name":"version","title":"`os.version()`","scope":"module","overloadOf":null,"stability":null,"added":["v13.11.0","v12.17.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"signature":{"parameters":[],"returns":{"type":{"text":"string","links":[{"name":"string","href":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type","start":0,"end":6}]},"description":""}},"description":"Returns a string identifying the kernel version.\n\nOn POSIX systems, the operating system release is determined by calling\n[`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not\navailable, `GetVersionExW()` will be used. See\n<https://en.wikipedia.org/wiki/Uname#Examples> for more information.","summary":"Returns a string identifying the kernel version.","examples":[],"children":[]},{"kind":"section","id":"os-constants","name":"OS constants","title":"OS constants","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"The following constants are exported by `os.constants`.\n\nNot all constants will be available on every operating system.","summary":"The following constants are exported by `os.constants`.","examples":[],"children":[{"kind":"section","id":"signal-constants","name":"Signal constants","title":"Signal constants","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[{"versions":["v5.11.0"],"prUrl":"https://github.com/nodejs/node/pull/6093","commit":null,"description":"Added support for `SIGINFO`."}],"description":"The following signal constants are exported by `os.constants.signals`.\n\n<table>\n  <tr>\n    <th>Constant</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td><code>SIGHUP</code></td>\n    <td>Sent to indicate when a controlling terminal is closed or a parent\n    process exits.</td>\n  </tr>\n  <tr>\n    <td><code>SIGINT</code></td>\n    <td>Sent to indicate when a user wishes to interrupt a process\n    (<kbd>Ctrl</kbd>+<kbd>C</kbd>).</td>\n  </tr>\n  <tr>\n    <td><code>SIGQUIT</code></td>\n    <td>Sent to indicate when a user wishes to terminate a process and perform a\n    core dump.</td>\n  </tr>\n  <tr>\n    <td><code>SIGILL</code></td>\n    <td>Sent to a process to notify that it has attempted to perform an illegal,\n    malformed, unknown, or privileged instruction.</td>\n  </tr>\n  <tr>\n    <td><code>SIGTRAP</code></td>\n    <td>Sent to a process when an exception has occurred.</td>\n  </tr>\n  <tr>\n    <td><code>SIGABRT</code></td>\n    <td>Sent to a process to request that it abort.</td>\n  </tr>\n  <tr>\n    <td><code>SIGIOT</code></td>\n    <td>Synonym for <code>SIGABRT</code></td>\n  </tr>\n  <tr>\n    <td><code>SIGBUS</code></td>\n    <td>Sent to a process to notify that it has caused a bus error.</td>\n  </tr>\n  <tr>\n    <td><code>SIGFPE</code></td>\n    <td>Sent to a process to notify that it has performed an illegal arithmetic\n    operation.</td>\n  </tr>\n  <tr>\n    <td><code>SIGKILL</code></td>\n    <td>Sent to a process to terminate it immediately.</td>\n  </tr>\n  <tr>\n    <td><code>SIGUSR1</code> <code>SIGUSR2</code></td>\n    <td>Sent to a process to identify user-defined conditions.</td>\n  </tr>\n  <tr>\n    <td><code>SIGSEGV</code></td>\n    <td>Sent to a process to notify of a segmentation fault.</td>\n  </tr>\n  <tr>\n    <td><code>SIGPIPE</code></td>\n    <td>Sent to a process when it has attempted to write to a disconnected\n    pipe.</td>\n  </tr>\n  <tr>\n    <td><code>SIGALRM</code></td>\n    <td>Sent to a process when a system timer elapses.</td>\n  </tr>\n  <tr>\n    <td><code>SIGTERM</code></td>\n    <td>Sent to a process to request termination.</td>\n  </tr>\n  <tr>\n    <td><code>SIGCHLD</code></td>\n    <td>Sent to a process when a child process terminates.</td>\n  </tr>\n  <tr>\n    <td><code>SIGSTKFLT</code></td>\n    <td>Sent to a process to indicate a stack fault on a coprocessor.</td>\n  </tr>\n  <tr>\n    <td><code>SIGCONT</code></td>\n    <td>Sent to instruct the operating system to continue a paused process.</td>\n  </tr>\n  <tr>\n    <td><code>SIGSTOP</code></td>\n    <td>Sent to instruct the operating system to halt a process.</td>\n  </tr>\n  <tr>\n    <td><code>SIGTSTP</code></td>\n    <td>Sent to a process to request it to stop.</td>\n  </tr>\n  <tr>\n    <td><code>SIGBREAK</code></td>\n    <td>Sent to indicate when a user wishes to interrupt a process.</td>\n  </tr>\n  <tr>\n    <td><code>SIGTTIN</code></td>\n    <td>Sent to a process when it reads from the TTY while in the\n    background.</td>\n  </tr>\n  <tr>\n    <td><code>SIGTTOU</code></td>\n    <td>Sent to a process when it writes to the TTY while in the\n    background.</td>\n  </tr>\n  <tr>\n    <td><code>SIGURG</code></td>\n    <td>Sent to a process when a socket has urgent data to read.</td>\n  </tr>\n  <tr>\n    <td><code>SIGXCPU</code></td>\n    <td>Sent to a process when it has exceeded its limit on CPU usage.</td>\n  </tr>\n  <tr>\n    <td><code>SIGXFSZ</code></td>\n    <td>Sent to a process when it grows a file larger than the maximum\n    allowed.</td>\n  </tr>\n  <tr>\n    <td><code>SIGVTALRM</code></td>\n    <td>Sent to a process when a virtual timer has elapsed.</td>\n  </tr>\n  <tr>\n    <td><code>SIGPROF</code></td>\n    <td>Sent to a process when a system timer has elapsed.</td>\n  </tr>\n  <tr>\n    <td><code>SIGWINCH</code></td>\n    <td>Sent to a process when the controlling terminal has changed its\n    size.</td>\n  </tr>\n  <tr>\n    <td><code>SIGIO</code></td>\n    <td>Sent to a process when I/O is available.</td>\n  </tr>\n  <tr>\n    <td><code>SIGPOLL</code></td>\n    <td>Synonym for <code>SIGIO</code></td>\n  </tr>\n  <tr>\n    <td><code>SIGLOST</code></td>\n    <td>Sent to a process when a file lock has been lost.</td>\n  </tr>\n  <tr>\n    <td><code>SIGPWR</code></td>\n    <td>Sent to a process to notify of a power failure.</td>\n  </tr>\n  <tr>\n    <td><code>SIGINFO</code></td>\n    <td>Synonym for <code>SIGPWR</code></td>\n  </tr>\n  <tr>\n    <td><code>SIGSYS</code></td>\n    <td>Sent to a process to notify of a bad argument.</td>\n  </tr>\n  <tr>\n    <td><code>SIGUNUSED</code></td>\n    <td>Synonym for <code>SIGSYS</code></td>\n  </tr>\n</table>","summary":"The following signal constants are exported by `os.constants.signals`.","examples":[],"children":[]},{"kind":"section","id":"error-constants","name":"Error constants","title":"Error constants","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"The following error constants are exported by `os.constants.errno`.","summary":"The following error constants are exported by `os.constants.errno`.","examples":[],"children":[{"kind":"section","id":"posix-error-constants","name":"POSIX error constants","title":"POSIX error constants","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"<table>\n  <tr>\n    <th>Constant</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td><code>E2BIG</code></td>\n    <td>Indicates that the list of arguments is longer than expected.</td>\n  </tr>\n  <tr>\n    <td><code>EACCES</code></td>\n    <td>Indicates that the operation did not have sufficient permissions.</td>\n  </tr>\n  <tr>\n    <td><code>EADDRINUSE</code></td>\n    <td>Indicates that the network address is already in use.</td>\n  </tr>\n  <tr>\n    <td><code>EADDRNOTAVAIL</code></td>\n    <td>Indicates that the network address is currently unavailable for\n    use.</td>\n  </tr>\n  <tr>\n    <td><code>EAFNOSUPPORT</code></td>\n    <td>Indicates that the network address family is not supported.</td>\n  </tr>\n  <tr>\n    <td><code>EAGAIN</code></td>\n    <td>Indicates that there is no data available and to try the\n    operation again later.</td>\n  </tr>\n  <tr>\n    <td><code>EALREADY</code></td>\n    <td>Indicates that the socket already has a pending connection in\n    progress.</td>\n  </tr>\n  <tr>\n    <td><code>EBADF</code></td>\n    <td>Indicates that a file descriptor is not valid.</td>\n  </tr>\n  <tr>\n    <td><code>EBADMSG</code></td>\n    <td>Indicates an invalid data message.</td>\n  </tr>\n  <tr>\n    <td><code>EBUSY</code></td>\n    <td>Indicates that a device or resource is busy.</td>\n  </tr>\n  <tr>\n    <td><code>ECANCELED</code></td>\n    <td>Indicates that an operation was canceled.</td>\n  </tr>\n  <tr>\n    <td><code>ECHILD</code></td>\n    <td>Indicates that there are no child processes.</td>\n  </tr>\n  <tr>\n    <td><code>ECONNABORTED</code></td>\n    <td>Indicates that the network connection has been aborted.</td>\n  </tr>\n  <tr>\n    <td><code>ECONNREFUSED</code></td>\n    <td>Indicates that the network connection has been refused.</td>\n  </tr>\n  <tr>\n    <td><code>ECONNRESET</code></td>\n    <td>Indicates that the network connection has been reset.</td>\n  </tr>\n  <tr>\n    <td><code>EDEADLK</code></td>\n    <td>Indicates that a resource deadlock has been avoided.</td>\n  </tr>\n  <tr>\n    <td><code>EDESTADDRREQ</code></td>\n    <td>Indicates that a destination address is required.</td>\n  </tr>\n  <tr>\n    <td><code>EDOM</code></td>\n    <td>Indicates that an argument is out of the domain of the function.</td>\n  </tr>\n  <tr>\n    <td><code>EDQUOT</code></td>\n    <td>Indicates that the disk quota has been exceeded.</td>\n  </tr>\n  <tr>\n    <td><code>EEXIST</code></td>\n    <td>Indicates that the file already exists.</td>\n  </tr>\n  <tr>\n    <td><code>EFAULT</code></td>\n    <td>Indicates an invalid pointer address.</td>\n  </tr>\n  <tr>\n    <td><code>EFBIG</code></td>\n    <td>Indicates that the file is too large.</td>\n  </tr>\n  <tr>\n    <td><code>EHOSTUNREACH</code></td>\n    <td>Indicates that the host is unreachable.</td>\n  </tr>\n  <tr>\n    <td><code>EIDRM</code></td>\n    <td>Indicates that the identifier has been removed.</td>\n  </tr>\n  <tr>\n    <td><code>EILSEQ</code></td>\n    <td>Indicates an illegal byte sequence.</td>\n  </tr>\n  <tr>\n    <td><code>EINPROGRESS</code></td>\n    <td>Indicates that an operation is already in progress.</td>\n  </tr>\n  <tr>\n    <td><code>EINTR</code></td>\n    <td>Indicates that a function call was interrupted.</td>\n  </tr>\n  <tr>\n    <td><code>EINVAL</code></td>\n    <td>Indicates that an invalid argument was provided.</td>\n  </tr>\n  <tr>\n    <td><code>EIO</code></td>\n    <td>Indicates an otherwise unspecified I/O error.</td>\n  </tr>\n  <tr>\n    <td><code>EISCONN</code></td>\n    <td>Indicates that the socket is connected.</td>\n  </tr>\n  <tr>\n    <td><code>EISDIR</code></td>\n    <td>Indicates that the path is a directory.</td>\n  </tr>\n  <tr>\n    <td><code>ELOOP</code></td>\n    <td>Indicates too many levels of symbolic links in a path.</td>\n  </tr>\n  <tr>\n    <td><code>EMFILE</code></td>\n    <td>Indicates that there are too many open files.</td>\n  </tr>\n  <tr>\n    <td><code>EMLINK</code></td>\n    <td>Indicates that there are too many hard links to a file.</td>\n  </tr>\n  <tr>\n    <td><code>EMSGSIZE</code></td>\n    <td>Indicates that the provided message is too long.</td>\n  </tr>\n  <tr>\n    <td><code>EMULTIHOP</code></td>\n    <td>Indicates that a multihop was attempted.</td>\n  </tr>\n  <tr>\n    <td><code>ENAMETOOLONG</code></td>\n    <td>Indicates that the filename is too long.</td>\n  </tr>\n  <tr>\n    <td><code>ENETDOWN</code></td>\n    <td>Indicates that the network is down.</td>\n  </tr>\n  <tr>\n    <td><code>ENETRESET</code></td>\n    <td>Indicates that the connection has been aborted by the network.</td>\n  </tr>\n  <tr>\n    <td><code>ENETUNREACH</code></td>\n    <td>Indicates that the network is unreachable.</td>\n  </tr>\n  <tr>\n    <td><code>ENFILE</code></td>\n    <td>Indicates too many open files in the system.</td>\n  </tr>\n  <tr>\n    <td><code>ENOBUFS</code></td>\n    <td>Indicates that no buffer space is available.</td>\n  </tr>\n  <tr>\n    <td><code>ENODATA</code></td>\n    <td>Indicates that no message is available on the stream head read\n    queue.</td>\n  </tr>\n  <tr>\n    <td><code>ENODEV</code></td>\n    <td>Indicates that there is no such device.</td>\n  </tr>\n  <tr>\n    <td><code>ENOENT</code></td>\n    <td>Indicates that there is no such file or directory.</td>\n  </tr>\n  <tr>\n    <td><code>ENOEXEC</code></td>\n    <td>Indicates an exec format error.</td>\n  </tr>\n  <tr>\n    <td><code>ENOLCK</code></td>\n    <td>Indicates that there are no locks available.</td>\n  </tr>\n  <tr>\n    <td><code>ENOLINK</code></td>\n    <td>Indications that a link has been severed.</td>\n  </tr>\n  <tr>\n    <td><code>ENOMEM</code></td>\n    <td>Indicates that there is not enough space.</td>\n  </tr>\n  <tr>\n    <td><code>ENOMSG</code></td>\n    <td>Indicates that there is no message of the desired type.</td>\n  </tr>\n  <tr>\n    <td><code>ENOPROTOOPT</code></td>\n    <td>Indicates that a given protocol is not available.</td>\n  </tr>\n  <tr>\n    <td><code>ENOSPC</code></td>\n    <td>Indicates that there is no space available on the device.</td>\n  </tr>\n  <tr>\n    <td><code>ENOSR</code></td>\n    <td>Indicates that there are no stream resources available.</td>\n  </tr>\n  <tr>\n    <td><code>ENOSTR</code></td>\n    <td>Indicates that a given resource is not a stream.</td>\n  </tr>\n  <tr>\n    <td><code>ENOSYS</code></td>\n    <td>Indicates that a function has not been implemented.</td>\n  </tr>\n  <tr>\n    <td><code>ENOTCONN</code></td>\n    <td>Indicates that the socket is not connected.</td>\n  </tr>\n  <tr>\n    <td><code>ENOTDIR</code></td>\n    <td>Indicates that the path is not a directory.</td>\n  </tr>\n  <tr>\n    <td><code>ENOTEMPTY</code></td>\n    <td>Indicates that the directory is not empty.</td>\n  </tr>\n  <tr>\n    <td><code>ENOTSOCK</code></td>\n    <td>Indicates that the given item is not a socket.</td>\n  </tr>\n  <tr>\n    <td><code>ENOTSUP</code></td>\n    <td>Indicates that a given operation is not supported.</td>\n  </tr>\n  <tr>\n    <td><code>ENOTTY</code></td>\n    <td>Indicates an inappropriate I/O control operation.</td>\n  </tr>\n  <tr>\n    <td><code>ENXIO</code></td>\n    <td>Indicates no such device or address.</td>\n  </tr>\n  <tr>\n    <td><code>EOPNOTSUPP</code></td>\n    <td>Indicates that an operation is not supported on the socket. Although\n    <code>ENOTSUP</code> and <code>EOPNOTSUPP</code> have the same value\n    on Linux, according to POSIX.1 these error values should be distinct.)</td>\n  </tr>\n  <tr>\n    <td><code>EOVERFLOW</code></td>\n    <td>Indicates that a value is too large to be stored in a given data\n    type.</td>\n  </tr>\n  <tr>\n    <td><code>EPERM</code></td>\n    <td>Indicates that the operation is not permitted.</td>\n  </tr>\n  <tr>\n    <td><code>EPIPE</code></td>\n    <td>Indicates a broken pipe.</td>\n  </tr>\n  <tr>\n    <td><code>EPROTO</code></td>\n    <td>Indicates a protocol error.</td>\n  </tr>\n  <tr>\n    <td><code>EPROTONOSUPPORT</code></td>\n    <td>Indicates that a protocol is not supported.</td>\n  </tr>\n  <tr>\n    <td><code>EPROTOTYPE</code></td>\n    <td>Indicates the wrong type of protocol for a socket.</td>\n  </tr>\n  <tr>\n    <td><code>ERANGE</code></td>\n    <td>Indicates that the results are too large.</td>\n  </tr>\n  <tr>\n    <td><code>EROFS</code></td>\n    <td>Indicates that the file system is read only.</td>\n  </tr>\n  <tr>\n    <td><code>ESPIPE</code></td>\n    <td>Indicates an invalid seek operation.</td>\n  </tr>\n  <tr>\n    <td><code>ESRCH</code></td>\n    <td>Indicates that there is no such process.</td>\n  </tr>\n  <tr>\n    <td><code>ESTALE</code></td>\n    <td>Indicates that the file handle is stale.</td>\n  </tr>\n  <tr>\n    <td><code>ETIME</code></td>\n    <td>Indicates an expired timer.</td>\n  </tr>\n  <tr>\n    <td><code>ETIMEDOUT</code></td>\n    <td>Indicates that the connection timed out.</td>\n  </tr>\n  <tr>\n    <td><code>ETXTBSY</code></td>\n    <td>Indicates that a text file is busy.</td>\n  </tr>\n  <tr>\n    <td><code>EWOULDBLOCK</code></td>\n    <td>Indicates that the operation would block.</td>\n  </tr>\n  <tr>\n    <td><code>EXDEV</code></td>\n    <td>Indicates an improper link.</td>\n  </tr>\n</table>","summary":"","examples":[],"children":[]},{"kind":"section","id":"windows-specific-error-constants","name":"Windows-specific error constants","title":"Windows-specific error constants","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"The following error codes are specific to the Windows operating system.\n\n<table>\n  <tr>\n    <th>Constant</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td><code>WSAEINTR</code></td>\n    <td>Indicates an interrupted function call.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEBADF</code></td>\n    <td>Indicates an invalid file handle.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEACCES</code></td>\n    <td>Indicates insufficient permissions to complete the operation.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEFAULT</code></td>\n    <td>Indicates an invalid pointer address.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEINVAL</code></td>\n    <td>Indicates that an invalid argument was passed.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEMFILE</code></td>\n    <td>Indicates that there are too many open files.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEWOULDBLOCK</code></td>\n    <td>Indicates that a resource is temporarily unavailable.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEINPROGRESS</code></td>\n    <td>Indicates that an operation is currently in progress.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEALREADY</code></td>\n    <td>Indicates that an operation is already in progress.</td>\n  </tr>\n  <tr>\n    <td><code>WSAENOTSOCK</code></td>\n    <td>Indicates that the resource is not a socket.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEDESTADDRREQ</code></td>\n    <td>Indicates that a destination address is required.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEMSGSIZE</code></td>\n    <td>Indicates that the message size is too long.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEPROTOTYPE</code></td>\n    <td>Indicates the wrong protocol type for the socket.</td>\n  </tr>\n  <tr>\n    <td><code>WSAENOPROTOOPT</code></td>\n    <td>Indicates a bad protocol option.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEPROTONOSUPPORT</code></td>\n    <td>Indicates that the protocol is not supported.</td>\n  </tr>\n  <tr>\n    <td><code>WSAESOCKTNOSUPPORT</code></td>\n    <td>Indicates that the socket type is not supported.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEOPNOTSUPP</code></td>\n    <td>Indicates that the operation is not supported.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEPFNOSUPPORT</code></td>\n    <td>Indicates that the protocol family is not supported.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEAFNOSUPPORT</code></td>\n    <td>Indicates that the address family is not supported.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEADDRINUSE</code></td>\n    <td>Indicates that the network address is already in use.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEADDRNOTAVAIL</code></td>\n    <td>Indicates that the network address is not available.</td>\n  </tr>\n  <tr>\n    <td><code>WSAENETDOWN</code></td>\n    <td>Indicates that the network is down.</td>\n  </tr>\n  <tr>\n    <td><code>WSAENETUNREACH</code></td>\n    <td>Indicates that the network is unreachable.</td>\n  </tr>\n  <tr>\n    <td><code>WSAENETRESET</code></td>\n    <td>Indicates that the network connection has been reset.</td>\n  </tr>\n  <tr>\n    <td><code>WSAECONNABORTED</code></td>\n    <td>Indicates that the connection has been aborted.</td>\n  </tr>\n  <tr>\n    <td><code>WSAECONNRESET</code></td>\n    <td>Indicates that the connection has been reset by the peer.</td>\n  </tr>\n  <tr>\n    <td><code>WSAENOBUFS</code></td>\n    <td>Indicates that there is no buffer space available.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEISCONN</code></td>\n    <td>Indicates that the socket is already connected.</td>\n  </tr>\n  <tr>\n    <td><code>WSAENOTCONN</code></td>\n    <td>Indicates that the socket is not connected.</td>\n  </tr>\n  <tr>\n    <td><code>WSAESHUTDOWN</code></td>\n    <td>Indicates that data cannot be sent after the socket has been\n    shutdown.</td>\n  </tr>\n  <tr>\n    <td><code>WSAETOOMANYREFS</code></td>\n    <td>Indicates that there are too many references.</td>\n  </tr>\n  <tr>\n    <td><code>WSAETIMEDOUT</code></td>\n    <td>Indicates that the connection has timed out.</td>\n  </tr>\n  <tr>\n    <td><code>WSAECONNREFUSED</code></td>\n    <td>Indicates that the connection has been refused.</td>\n  </tr>\n  <tr>\n    <td><code>WSAELOOP</code></td>\n    <td>Indicates that a name cannot be translated.</td>\n  </tr>\n  <tr>\n    <td><code>WSAENAMETOOLONG</code></td>\n    <td>Indicates that a name was too long.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEHOSTDOWN</code></td>\n    <td>Indicates that a network host is down.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEHOSTUNREACH</code></td>\n    <td>Indicates that there is no route to a network host.</td>\n  </tr>\n  <tr>\n    <td><code>WSAENOTEMPTY</code></td>\n    <td>Indicates that the directory is not empty.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEPROCLIM</code></td>\n    <td>Indicates that there are too many processes.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEUSERS</code></td>\n    <td>Indicates that the user quota has been exceeded.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEDQUOT</code></td>\n    <td>Indicates that the disk quota has been exceeded.</td>\n  </tr>\n  <tr>\n    <td><code>WSAESTALE</code></td>\n    <td>Indicates a stale file handle reference.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEREMOTE</code></td>\n    <td>Indicates that the item is remote.</td>\n  </tr>\n  <tr>\n    <td><code>WSASYSNOTREADY</code></td>\n    <td>Indicates that the network subsystem is not ready.</td>\n  </tr>\n  <tr>\n    <td><code>WSAVERNOTSUPPORTED</code></td>\n    <td>Indicates that the <code>winsock.dll</code> version is out of\n    range.</td>\n  </tr>\n  <tr>\n    <td><code>WSANOTINITIALISED</code></td>\n    <td>Indicates that successful WSAStartup has not yet been performed.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEDISCON</code></td>\n    <td>Indicates that a graceful shutdown is in progress.</td>\n  </tr>\n  <tr>\n    <td><code>WSAENOMORE</code></td>\n    <td>Indicates that there are no more results.</td>\n  </tr>\n  <tr>\n    <td><code>WSAECANCELLED</code></td>\n    <td>Indicates that an operation has been canceled.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEINVALIDPROCTABLE</code></td>\n    <td>Indicates that the procedure call table is invalid.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEINVALIDPROVIDER</code></td>\n    <td>Indicates an invalid service provider.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEPROVIDERFAILEDINIT</code></td>\n    <td>Indicates that the service provider failed to initialized.</td>\n  </tr>\n  <tr>\n    <td><code>WSASYSCALLFAILURE</code></td>\n    <td>Indicates a system call failure.</td>\n  </tr>\n  <tr>\n    <td><code>WSASERVICE_NOT_FOUND</code></td>\n    <td>Indicates that a service was not found.</td>\n  </tr>\n  <tr>\n    <td><code>WSATYPE_NOT_FOUND</code></td>\n    <td>Indicates that a class type was not found.</td>\n  </tr>\n  <tr>\n    <td><code>WSA_E_NO_MORE</code></td>\n    <td>Indicates that there are no more results.</td>\n  </tr>\n  <tr>\n    <td><code>WSA_E_CANCELLED</code></td>\n    <td>Indicates that the call was canceled.</td>\n  </tr>\n  <tr>\n    <td><code>WSAEREFUSED</code></td>\n    <td>Indicates that a database query was refused.</td>\n  </tr>\n</table>","summary":"The following error codes are specific to the Windows operating system.","examples":[],"children":[]}]},{"kind":"section","id":"dlopen-constants","name":"dlopen constants","title":"dlopen constants","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"If available on the operating system, the following constants\nare exported in `os.constants.dlopen`. See [`dlopen(3)`](http://man7.org/linux/man-pages/man3/dlopen.3.html) for detailed\ninformation.\n\n<table>\n  <tr>\n    <th>Constant</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td><code>RTLD_LAZY</code></td>\n    <td>Perform lazy binding. Node.js sets this flag by default.</td>\n  </tr>\n  <tr>\n    <td><code>RTLD_NOW</code></td>\n    <td>Resolve all undefined symbols in the library before dlopen(3)\n    returns.</td>\n  </tr>\n  <tr>\n    <td><code>RTLD_GLOBAL</code></td>\n    <td>Symbols defined by the library will be made available for symbol\n    resolution of subsequently loaded libraries.</td>\n  </tr>\n  <tr>\n    <td><code>RTLD_LOCAL</code></td>\n    <td>The converse of <code>RTLD_GLOBAL</code>. This is the default behavior\n    if neither flag is specified.</td>\n  </tr>\n  <tr>\n    <td><code>RTLD_DEEPBIND</code></td>\n    <td>Make a self-contained library use its own symbols in preference to\n    symbols from previously loaded libraries.</td>\n  </tr>\n</table>","summary":"If available on the operating system, the following constants are exported in `os.constants.dlopen`. See `dlopen(3)` for detailed information.","examples":[],"children":[]},{"kind":"section","id":"priority-constants","name":"Priority constants","title":"Priority constants","scope":"module","overloadOf":null,"stability":null,"added":["v10.10.0"],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"The following process scheduling constants are exported by\n`os.constants.priority`.\n\n<table>\n  <tr>\n    <th>Constant</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td><code>PRIORITY_LOW</code></td>\n    <td>The lowest process scheduling priority. This corresponds to\n    <code>IDLE_PRIORITY_CLASS</code> on Windows, and a nice value of\n    <code>19</code> on all other platforms.</td>\n  </tr>\n  <tr>\n    <td><code>PRIORITY_BELOW_NORMAL</code></td>\n    <td>The process scheduling priority above <code>PRIORITY_LOW</code> and\n    below <code>PRIORITY_NORMAL</code>. This corresponds to\n    <code>BELOW_NORMAL_PRIORITY_CLASS</code> on Windows, and a nice value of\n    <code>10</code> on all other platforms.</td>\n  </tr>\n  <tr>\n    <td><code>PRIORITY_NORMAL</code></td>\n    <td>The default process scheduling priority. This corresponds to\n    <code>NORMAL_PRIORITY_CLASS</code> on Windows, and a nice value of\n    <code>0</code> on all other platforms.</td>\n  </tr>\n  <tr>\n    <td><code>PRIORITY_ABOVE_NORMAL</code></td>\n    <td>The process scheduling priority above <code>PRIORITY_NORMAL</code> and\n    below <code>PRIORITY_HIGH</code>. This corresponds to\n    <code>ABOVE_NORMAL_PRIORITY_CLASS</code> on Windows, and a nice value of\n    <code>-7</code> on all other platforms.</td>\n  </tr>\n  <tr>\n    <td><code>PRIORITY_HIGH</code></td>\n    <td>The process scheduling priority above <code>PRIORITY_ABOVE_NORMAL</code>\n    and below <code>PRIORITY_HIGHEST</code>. This corresponds to\n    <code>HIGH_PRIORITY_CLASS</code> on Windows, and a nice value of\n    <code>-14</code> on all other platforms.</td>\n  </tr>\n  <tr>\n    <td><code>PRIORITY_HIGHEST</code></td>\n    <td>The highest process scheduling priority. This corresponds to\n    <code>REALTIME_PRIORITY_CLASS</code> on Windows, and a nice value of\n    <code>-20</code> on all other platforms.</td>\n  </tr>\n</table>","summary":"The following process scheduling constants are exported by `os.constants.priority`.","examples":[],"children":[]},{"kind":"section","id":"libuv-constants","name":"libuv constants","title":"libuv constants","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"<table>\n  <tr>\n    <th>Constant</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td><code>UV_UDP_REUSEADDR</code></td>\n    <td></td>\n  </tr>\n</table>","summary":"","examples":[],"children":[]}]}]}