|
Tizen Native API
10.0
|
runtime_cpu_usage_s Struct Reference
Public Attributes | |
| double | user |
| double | system |
| double | nice |
| double | iowait |
Detailed Description
Structure for CPU usage.
- Since :
- 2.4
This structure provides CPU usage distribution across different states. The values are percentages calculated since system boot and represent the time CPU spent in each state. The information is collected from /proc/stat.
Each field is calculated as a percentage using the formula: percentage = (field_value / total_uptime) × 100 where total_uptime = user + nice + system + idle + iowait + irq + softirq (values collected from /proc/stat cpu line fields 1-7 in clock ticks)
CPU usage metrics:
user:Percentage of time spent running user-mode processes (applications), calculated as (user_value / total_uptime) × 100, where user_value is collected from /proc/stat field 1 (user mode time in clock ticks)system:Percentage of time spent running kernel-mode processes (system calls, drivers), calculated as (system_value / total_uptime) × 100, where system_value is collected from /proc/stat field 3 (system mode time in clock ticks)nice:Percentage of time spent running user-mode processes with lowered priority, calculated as (nice_value / total_uptime) × 100, where nice_value is collected from /proc/stat field 2 (nice priority user mode time in clock ticks)iowait:Percentage of time spent waiting for I/O operations to complete (disk, network), calculated as (iowait_value / total_uptime) × 100, where iowait_value is collected from /proc/stat field 5 (I/O wait time in clock ticks)
Member Data Documentation
| double runtime_cpu_usage_s::iowait |
Time waiting for I/O completion (Percent)
| double runtime_cpu_usage_s::nice |
Time running niced user processes (Percent)
| double runtime_cpu_usage_s::system |
Time running kernel processes (Percent)
| double runtime_cpu_usage_s::user |
Time running un-niced user processes (Percent)