Libosinfo.Resources¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
CPU Architecture |
||
r/w |
CPU frequency in hertz (Hz) |
||
r/w |
Number of CPUs |
||
r/w |
Amount of Random Access Memory (RAM) in bytes |
||
r/w |
Amount of storage space in bytes |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Libosinfo.Resources(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(id, architecture)¶
- Parameters:
- Return type:
- get_architecture()¶
- Returns:
the hardware architecture.
- Return type:
Retrieves the target hardware architecture to which self applies. Some operating systems specify the same requirements and recommendations for all architectures. In such cases, the string returned by this call will be
Libosinfo.ARCHITECTURE_ALL
.
- get_cpu()¶
- Returns:
the CPU frequency, or -1.
- Return type:
Retrieves the CPU frequency in hertz (Hz). Divide the value by
Libosinfo.MEGAHERTZ
if you need this value in megahertz (MHz).
- get_ram()¶
- Returns:
the amount of RAM, or -1.
- Return type:
Retrieves the amount of Random Access Memory (RAM) in bytes. Divide the value by
Libosinfo.MEBIBYTES
if you need this value in mebibytes.
- get_storage()¶
- Returns:
the amount of storage, or -1.
- Return type:
Retrieves the amount of storage space in bytes. Divide the value by
Libosinfo.GIBIBYTES
if you need this value in gibibytes.
Property Details¶
- Libosinfo.Resources.props.architecture¶
- Name:
architecture
- Type:
- Default Value:
- Flags:
The target hardware architecture to which these resources applies.
- Libosinfo.Resources.props.cpu¶
-
The CPU frequency in hertz (Hz).
- Libosinfo.Resources.props.n_cpus¶
-
The number of CPUs.
- Libosinfo.Resources.props.ram¶
-
The amount of Random Access Memory (RAM) in bytes.