os
Use to access this module.
Returns the operating system’s default directory for temp files.
os.endianness()
Returns the endianness of the CPU. Possible values are "BE"
or .
os.hostname()
Returns the hostname of the operating system.
os.type()
Returns the operating system name.
os.arch()
Returns the operating system CPU architecture. Possible values are "x64"
,
and "ia32"
.
os.release()
Returns the operating system release.
os.uptime()
Returns the system uptime in seconds.
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.
os.totalmem()
Returns the total amount of system memory in bytes.
os.freemem()
Returns the amount of free system memory in bytes.
os.cpus()
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).
Example inspection of os.cpus:
Get a list of network interfaces: