Skip to content

module System

Class methods

.cpu_count

Returns the number of logical processors available to the system.

System.cpu_count # => 4
View source

.hostname

Returns the hostname.

Note

Maximum of 253 characters are allowed, with 2 bytes reserved for storage. In practice, many platforms will disallow anything longer than 63 characters.

System.hostname # => "host.example.org"
View source