Struct procfs::CpuInfo [−][src]
Expand description
Represents the data from /proc/cpuinfo
.
The fields
field stores the fields that are common among all CPUs. The cpus
field stores
CPU-specific info.
For common fields, there are methods that will return the data, converted to a more appropriate
data type. These methods will all return None
if the field doesn’t exist, or is in some
unexpected format (in that case, you’ll have to access the string data directly).
Fields
fields: HashMap<String, String>
This stores fields that are common among all CPUs
cpus: Vec<HashMap<String, String>>
Implementations
Get CpuInfo from a custom Read instead of the default /proc/cpuinfo
.
Get the total number of cpu cores.
This is the number of entries in the /proc/cpuinfo
file.
Get info for a specific cpu.
This will merge the common fields with the cpu-specific fields.
Returns None if the requested cpu index is not found.
May not be available on some older 2.6 kernels
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for CpuInfo
impl UnwindSafe for CpuInfo
Blanket Implementations
Mutably borrows from an owned value. Read more