A constant defining the appropriate End-of-line marker for the operating system.
A constant defining the appropriate End-of-line marker for the operating system.
os.EOL
Returns the operating system CPU architecture.
Returns the operating system CPU architecture. Possible values are 'x64', 'arm' and 'ia32'. Returns the value of process.arch.
os.arch()
Returns an object containing commonly used operating system specific constants for error codes, process signals, and so on.
Returns an object containing commonly used operating system specific constants for error codes, process signals, and so on. The specific constants currently defined are described in OS Constants.
https://nodejs.org/api/os.html#os_os_constants_1
Returns an array of objects containing information about each CPU/core installed: model, speed (in MHz), and times (an object containing the number of milliseconds the CPU/core spent in: user, nice, sys, idle, and irq).
Returns an array of objects containing information about each CPU/core installed: model, speed (in MHz), and times (an object containing the number of milliseconds the CPU/core spent in: user, nice, sys, idle, and irq).
os.cpus()
Returns the endianness of the CPU.
Returns the endianness of the CPU. Possible values are 'BE' for big endian or 'LE' for little endian.
os.endianness()
Returns the amount of free system memory in bytes.
Returns the amount of free system memory in bytes.
os.freemem()
Returns the home directory of the current user.
Returns the home directory of the current user.
os.homedir()
Returns the hostname of the operating system.
Returns the hostname of the operating system.
os.hostname()
Returns an array containing the 1, 5, and 15 minute load averages.
Returns an array containing the 1, 5, and 15 minute load averages.
The load average is a measure of system activity, calculated by the operating system and expressed as a fractional number. As a rule of thumb, the load average should ideally be less than the number of logical CPUs in the system.
The load average is a very UNIX-y concept; there is no real equivalent on Windows platforms. That is why this function always returns [0, 0, 0] on Windows.
os.loadavg()
Get a list of network interfaces
Get a list of network interfaces
os.networkInterfaces()
Returns the operating system platform.
Returns the operating system platform. Possible values are 'darwin', 'freebsd', 'linux', 'sunos' or 'win32'. Returns the value of process.platform.
os.platform()
Returns the operating system release.
Returns the operating system release.
os.release()
Returns the operating system's default directory for temporary files.
Returns the operating system's default directory for temporary files.
os.tmpdir()
Returns the total amount of system memory in bytes.
Returns the total amount of system memory in bytes.
os.totalmem()
Returns the operating system name.
Returns the operating system name. For example 'Linux' on Linux, 'Darwin' on OS X and 'Windows_NT' on Windows.
os.type()
Returns the system uptime in seconds.
Returns the system uptime in seconds.
os.uptime()
The os.userInfo() method returns information about the currently effective user -- on POSIX platforms, this is typically a subset of the password file.
The os.userInfo() method 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.
The value of homedir returned by os.userInfo() is provided by the operating system. This differs from the result of os.homedir(), which queries several environment variables for the home directory before falling back to the operating system response.
Operating System Singleton