path.basename()

path.basename(p[, ext]) Return the last portion of a path. Similar to the Unix basename command. Example: path.basename('/foo/bar/baz/asdf/quux.html') // returns 'quux.html' path.basename('/foo/bar/baz/asdf/quux.html', '.html') // returns 'quux'

os.uptime()

os.uptime() Returns the system uptime in seconds.

os.type()

os.type() Returns the operating system name. For example 'Linux' on Linux, 'Darwin' on OS X and 'Windows_NT' on Windows.

os.release()

os.release() Returns the operating system release.

os.tmpdir()

os.tmpdir() Returns the operating system's default directory for temporary files.

os.totalmem()

os.totalmem() Returns the total amount of system memory in bytes.

os.platform()

os.platform() Returns the operating system platform. Possible values are 'darwin', 'freebsd', 'linux', 'sunos' or 'win32'. Returns the value of process.platform.

os.loadavg()

os.loadavg() 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.networkInterfaces()

os.networkInterfaces() Get a list of network interfaces: { lo: [ { address: '127.0.0.1', netmask: '255.0.0.0', family: 'IPv4', mac: '00:00:00:00:00:00', internal: true }, { address: '::1', netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', family: 'IPv6', mac: '00:00:00:00:00:00', internal: true } ], eth0: [ { address: '192.168.1.108', netmask: '255.255.255.0', family: 'IPv4', mac: '01:02:03:0a:0b:0c',

os.hostname()

os.hostname() Returns the hostname of the operating system.