Linux system information library
Project description
sysutil-lib
- Linux system information library
Data structures
ProcessorUsage
class ProcessorUsage:
total: float
user: float
nice: float
system: float
idle: float
iowait: float
interrupt: float
soft_interrupt: float
- data structure which encloses the different parameters relative to processor usage
CpuUsage
class CpuUsage:
average: ProcessorUsage
processors: [ProcessorUsage]
- contains the average CPU usage, and the specific usage for each processor
Cpu
class Cpu:
modelName: str
cores: int
threads: int
dies: int
governors: [str]
maxFrequencyMHz: float
clockBoost: bool
architecture: str
byteOrder: str
- contains base information relative to the CPU
SchedulerPolicy
class SchedulerPolicy:
name: str
scalingGovernor: str
scalingDriver: str
minimumScalingMHz: float
maximumScalingMHz: float
- contains scheduler information relative to a processor in your system
RamSize
class RamSize:
gb: float
gib: float
- contains total ram size, both in GB (1000^3 bytes) and GiB (1024^3 bytes)
NetworkRate
class NetworkRate:
download: float
upload: float
- contains total upload and download network rate (in bytes)
TemperatureSensor
class TemperatureSensor:
label: str
temperature: float
- contains sensor name (label) and the recorded temperature
Battery
class Battery:
capacity: int
status: str
- contains capacity and status of battery
Functions
Functions
def cpuUsage() -> CpuUsage
- returns the cpu usage, both average and processor-wise, all the values are percentage
def cpuFrequency() -> float
- returns CPU frequency in MHz
pub fn ramUsage() -> f32
- returns ram usage percentage
def networkRate() -> NetworkRate
- returns network rate (download and upload), expressed in bytes
def temperatureSensors() -> [TemperatureSensor]
- returns every temperature sensor in
TemperatureSensor
format
def cpuInfo() -> Cpu
- returns the cpu base information, enclosed in the
Cpu
data structure
def ramSize() -> RamSize
- returns ram size as specified in the
RamSize
data structure
def schedulerInfo() -> [SchedulerPolicy]
- returns scheduler information for each processor
def gpuUsage() -> float
- returns gpu usage percentage
- yet tested only on AMD 7000 series GPUs, returns
None
in case it's not capable to retrieve information
def batteryInfo() -> Battery
- returns battery status and capacity
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sysutil-lib-0.2.0.tar.gz
(16.4 kB
view hashes)
Built Distribution
Close
Hashes for sysutil_lib-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9ec42f6843d180a929bc368283ccf295beb3d0a55ce88b079d1875f1ffb0e78 |
|
MD5 | d63d52fe51ff01ca33fc909c4d75f82e |
|
BLAKE2b-256 | 352a6a8e74fb40d8b1f22922a67546cfa60230dec7b05a07c55ba55cf4b32fcd |