class Kernel
Kernel related information
1 | Methods |
1.1 | method arch |
1.2 | method archname |
1.3 | method bits |
1.4 | method cpu-cores |
1.5 | method cpu-usage |
1.6 | method free-memory |
1.7 | method total-memory |
1.8 | method endian |
1.9 | method hardware |
1.10 | method hostname |
1.11 | method release |
1.12 | method signal |
1.13 | method signals |
2 | Type Graph |
does Systemic
Built-in class for providing kernel related information. Usually accessed through the $*KERNEL
dynamic variable.
Methods
method arch
method arch
Instance method returning the "arch" (as in "architecture") information of the Kernel object. Dies if the "arch" could not be established.
method archname
method archname
Instance method returning the concatenation of hardware and name.
method bits
method bits
Instance method returning the number of bits used in the architecture of the processor. Usually 32 or 64.
method cpu-cores
method cpu-cores(--> Int)
Instance / Class method returning the number of CPU cores that are available.
say .cpu-cores; # OUTPUT: «8»
method cpu-usage
method cpu-usage(--> Int)
Instance / Class method returning the amount of CPU uses since the start of the program (in microseconds).
method free-memory
method free-memory(--> Int)
Instance / Class method returning the available memory on the system. When using the JVM, this returns the available memory to the JVM instead. This method is only available in release v2019.06 and later.
method total-memory
method total-memory(--> Int)
Instance / Class method returning the total memory available to the system. When using the JVM, this returns the total memory available to the JVM instead. This method is only available in release v2019.06 and later.
method endian
method endian(--> Endian)
Class method that returns the Endian object associated with the kernel architecture (either LittleEndian
or BigEndian
).
method hardware
Defined as
method hardware
Instance method returning the hardware information of the Kernel object. Dies if the hardware information could not be established.
say .hardware; # OUTPUT: «x86_64»
method hostname
method hostname
Instance method returning the hostname of the Kernel object.
method release
method release
Instance method returning the release information of the Kernel object. Dies if the release information could not be established.
method signal
Defined as:
multi method signal(Kernel: Str --> Int)multi method signal(Kernel: Signal \signal --> Int)multi method signal(Kernel: Int \signal --> Int)
Instance method returning the Signal
numeric code for a given name for the Kernel object.
say .signal("INT"); # OUTPUT: «2»
method signals
Instance method returning a list of Signal
s that are supported by the kernel represented by the Kernel object.