CPU usage: user,system,idle always add up to 100%? [closed]
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
https://www.opsdash.com/blog/cpu-usage-linux.html
COMPONENTS OF CPU USAGE
So what âÂÂtypes of tasksâ are there? The obvious ones are âÂÂuserâ and âÂÂsystemâÂÂ:
System: The CPU is running kernel code. This includes device drivers and kernel modules.
User: The CPU is running code in user-mode. This includes your application code. Note that if an application tries to read from disk or write to network, it actually goes to sleep while the kernel performs that work, and wakes up the application again.
Idle: And when there is really nothing the kernel can do, it just as to waste away this slice of time. Technically, when the runnable queue is empty and there are no I/O operations going on, the CPU usage is marked as idle.
Am I understanding correctly that user, system, and idle percentage would always add up to 100%?
linux
closed as off-topic by Ipor Sircer, DopeGhoti, Rui F Ribeiro, Julie Pelletier, Romeo Ninov Jun 15 at 5:42
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." â Ipor Sircer, DopeGhoti, Rui F Ribeiro, Julie Pelletier, Romeo Ninov
add a comment |Â
up vote
1
down vote
favorite
https://www.opsdash.com/blog/cpu-usage-linux.html
COMPONENTS OF CPU USAGE
So what âÂÂtypes of tasksâ are there? The obvious ones are âÂÂuserâ and âÂÂsystemâÂÂ:
System: The CPU is running kernel code. This includes device drivers and kernel modules.
User: The CPU is running code in user-mode. This includes your application code. Note that if an application tries to read from disk or write to network, it actually goes to sleep while the kernel performs that work, and wakes up the application again.
Idle: And when there is really nothing the kernel can do, it just as to waste away this slice of time. Technically, when the runnable queue is empty and there are no I/O operations going on, the CPU usage is marked as idle.
Am I understanding correctly that user, system, and idle percentage would always add up to 100%?
linux
closed as off-topic by Ipor Sircer, DopeGhoti, Rui F Ribeiro, Julie Pelletier, Romeo Ninov Jun 15 at 5:42
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." â Ipor Sircer, DopeGhoti, Rui F Ribeiro, Julie Pelletier, Romeo Ninov
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
https://www.opsdash.com/blog/cpu-usage-linux.html
COMPONENTS OF CPU USAGE
So what âÂÂtypes of tasksâ are there? The obvious ones are âÂÂuserâ and âÂÂsystemâÂÂ:
System: The CPU is running kernel code. This includes device drivers and kernel modules.
User: The CPU is running code in user-mode. This includes your application code. Note that if an application tries to read from disk or write to network, it actually goes to sleep while the kernel performs that work, and wakes up the application again.
Idle: And when there is really nothing the kernel can do, it just as to waste away this slice of time. Technically, when the runnable queue is empty and there are no I/O operations going on, the CPU usage is marked as idle.
Am I understanding correctly that user, system, and idle percentage would always add up to 100%?
linux
https://www.opsdash.com/blog/cpu-usage-linux.html
COMPONENTS OF CPU USAGE
So what âÂÂtypes of tasksâ are there? The obvious ones are âÂÂuserâ and âÂÂsystemâÂÂ:
System: The CPU is running kernel code. This includes device drivers and kernel modules.
User: The CPU is running code in user-mode. This includes your application code. Note that if an application tries to read from disk or write to network, it actually goes to sleep while the kernel performs that work, and wakes up the application again.
Idle: And when there is really nothing the kernel can do, it just as to waste away this slice of time. Technically, when the runnable queue is empty and there are no I/O operations going on, the CPU usage is marked as idle.
Am I understanding correctly that user, system, and idle percentage would always add up to 100%?
linux
edited Jun 14 at 16:53
Kusalananda
101k13199312
101k13199312
asked Jun 14 at 16:51
ealeon
1284
1284
closed as off-topic by Ipor Sircer, DopeGhoti, Rui F Ribeiro, Julie Pelletier, Romeo Ninov Jun 15 at 5:42
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." â Ipor Sircer, DopeGhoti, Rui F Ribeiro, Julie Pelletier, Romeo Ninov
closed as off-topic by Ipor Sircer, DopeGhoti, Rui F Ribeiro, Julie Pelletier, Romeo Ninov Jun 15 at 5:42
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." â Ipor Sircer, DopeGhoti, Rui F Ribeiro, Julie Pelletier, Romeo Ninov
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
The possible states depends on the OS (Linux or Unix, variants and releases).
All possible states values sum up to 100 % because they are computed that way.
In addition the the main states user, system and idle, a notable state which level can be significant is stolen, where the CPU is used by another VM running on the same hardware. Other states are the ones used to wait for some I/Os to complete (wait), and software and hardware interrupts.
"All possible states values sum up to 100 %" okay thats was my source of confusion. thank you
â ealeon
Jun 14 at 17:53
add a comment |Â
up vote
1
down vote
Actually, no. There are other types of CPU usage as well. If you execute sar -u ALL
you can see cpu usage
00:00:01 CPU %usr %nice %sys %iowait %steal %irq %soft %guest %idle
00:10:01 all 89.42 0.00 0.28 0.00 0.00 0.00 0.02 0.00 10.28
As the auther notes, there are other types of cpu usage, including User Space programs (%usr), niced process time (%usr) (not sure how this is calculated), kernel space programs (%sys), time spent waiting for I/O (disks) (%iowait), time spent stealing cycles from one cpu (%steal), and interrupt requests (%irq, %soft). If the cpu is doing none of these things, it is considered idle (%idle). The sum of these should always be 100%.
right, i didnt mention those types for the sake of simplicity of the question. So basically the summation of all CPU usage types will never be more than 100% but it can be less than 100%, correct?
â ealeon
Jun 14 at 17:52
1
@ealeon Their sum should always be exactly 100%.
â Timothy Pulliam
Jun 14 at 17:53
ah okay understood. thank you so much
â ealeon
Jun 14 at 17:54
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
The possible states depends on the OS (Linux or Unix, variants and releases).
All possible states values sum up to 100 % because they are computed that way.
In addition the the main states user, system and idle, a notable state which level can be significant is stolen, where the CPU is used by another VM running on the same hardware. Other states are the ones used to wait for some I/Os to complete (wait), and software and hardware interrupts.
"All possible states values sum up to 100 %" okay thats was my source of confusion. thank you
â ealeon
Jun 14 at 17:53
add a comment |Â
up vote
1
down vote
accepted
The possible states depends on the OS (Linux or Unix, variants and releases).
All possible states values sum up to 100 % because they are computed that way.
In addition the the main states user, system and idle, a notable state which level can be significant is stolen, where the CPU is used by another VM running on the same hardware. Other states are the ones used to wait for some I/Os to complete (wait), and software and hardware interrupts.
"All possible states values sum up to 100 %" okay thats was my source of confusion. thank you
â ealeon
Jun 14 at 17:53
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
The possible states depends on the OS (Linux or Unix, variants and releases).
All possible states values sum up to 100 % because they are computed that way.
In addition the the main states user, system and idle, a notable state which level can be significant is stolen, where the CPU is used by another VM running on the same hardware. Other states are the ones used to wait for some I/Os to complete (wait), and software and hardware interrupts.
The possible states depends on the OS (Linux or Unix, variants and releases).
All possible states values sum up to 100 % because they are computed that way.
In addition the the main states user, system and idle, a notable state which level can be significant is stolen, where the CPU is used by another VM running on the same hardware. Other states are the ones used to wait for some I/Os to complete (wait), and software and hardware interrupts.
answered Jun 14 at 17:47
jlliagre
44.5k578122
44.5k578122
"All possible states values sum up to 100 %" okay thats was my source of confusion. thank you
â ealeon
Jun 14 at 17:53
add a comment |Â
"All possible states values sum up to 100 %" okay thats was my source of confusion. thank you
â ealeon
Jun 14 at 17:53
"All possible states values sum up to 100 %" okay thats was my source of confusion. thank you
â ealeon
Jun 14 at 17:53
"All possible states values sum up to 100 %" okay thats was my source of confusion. thank you
â ealeon
Jun 14 at 17:53
add a comment |Â
up vote
1
down vote
Actually, no. There are other types of CPU usage as well. If you execute sar -u ALL
you can see cpu usage
00:00:01 CPU %usr %nice %sys %iowait %steal %irq %soft %guest %idle
00:10:01 all 89.42 0.00 0.28 0.00 0.00 0.00 0.02 0.00 10.28
As the auther notes, there are other types of cpu usage, including User Space programs (%usr), niced process time (%usr) (not sure how this is calculated), kernel space programs (%sys), time spent waiting for I/O (disks) (%iowait), time spent stealing cycles from one cpu (%steal), and interrupt requests (%irq, %soft). If the cpu is doing none of these things, it is considered idle (%idle). The sum of these should always be 100%.
right, i didnt mention those types for the sake of simplicity of the question. So basically the summation of all CPU usage types will never be more than 100% but it can be less than 100%, correct?
â ealeon
Jun 14 at 17:52
1
@ealeon Their sum should always be exactly 100%.
â Timothy Pulliam
Jun 14 at 17:53
ah okay understood. thank you so much
â ealeon
Jun 14 at 17:54
add a comment |Â
up vote
1
down vote
Actually, no. There are other types of CPU usage as well. If you execute sar -u ALL
you can see cpu usage
00:00:01 CPU %usr %nice %sys %iowait %steal %irq %soft %guest %idle
00:10:01 all 89.42 0.00 0.28 0.00 0.00 0.00 0.02 0.00 10.28
As the auther notes, there are other types of cpu usage, including User Space programs (%usr), niced process time (%usr) (not sure how this is calculated), kernel space programs (%sys), time spent waiting for I/O (disks) (%iowait), time spent stealing cycles from one cpu (%steal), and interrupt requests (%irq, %soft). If the cpu is doing none of these things, it is considered idle (%idle). The sum of these should always be 100%.
right, i didnt mention those types for the sake of simplicity of the question. So basically the summation of all CPU usage types will never be more than 100% but it can be less than 100%, correct?
â ealeon
Jun 14 at 17:52
1
@ealeon Their sum should always be exactly 100%.
â Timothy Pulliam
Jun 14 at 17:53
ah okay understood. thank you so much
â ealeon
Jun 14 at 17:54
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Actually, no. There are other types of CPU usage as well. If you execute sar -u ALL
you can see cpu usage
00:00:01 CPU %usr %nice %sys %iowait %steal %irq %soft %guest %idle
00:10:01 all 89.42 0.00 0.28 0.00 0.00 0.00 0.02 0.00 10.28
As the auther notes, there are other types of cpu usage, including User Space programs (%usr), niced process time (%usr) (not sure how this is calculated), kernel space programs (%sys), time spent waiting for I/O (disks) (%iowait), time spent stealing cycles from one cpu (%steal), and interrupt requests (%irq, %soft). If the cpu is doing none of these things, it is considered idle (%idle). The sum of these should always be 100%.
Actually, no. There are other types of CPU usage as well. If you execute sar -u ALL
you can see cpu usage
00:00:01 CPU %usr %nice %sys %iowait %steal %irq %soft %guest %idle
00:10:01 all 89.42 0.00 0.28 0.00 0.00 0.00 0.02 0.00 10.28
As the auther notes, there are other types of cpu usage, including User Space programs (%usr), niced process time (%usr) (not sure how this is calculated), kernel space programs (%sys), time spent waiting for I/O (disks) (%iowait), time spent stealing cycles from one cpu (%steal), and interrupt requests (%irq, %soft). If the cpu is doing none of these things, it is considered idle (%idle). The sum of these should always be 100%.
edited Jun 14 at 17:54
answered Jun 14 at 17:48
Timothy Pulliam
979515
979515
right, i didnt mention those types for the sake of simplicity of the question. So basically the summation of all CPU usage types will never be more than 100% but it can be less than 100%, correct?
â ealeon
Jun 14 at 17:52
1
@ealeon Their sum should always be exactly 100%.
â Timothy Pulliam
Jun 14 at 17:53
ah okay understood. thank you so much
â ealeon
Jun 14 at 17:54
add a comment |Â
right, i didnt mention those types for the sake of simplicity of the question. So basically the summation of all CPU usage types will never be more than 100% but it can be less than 100%, correct?
â ealeon
Jun 14 at 17:52
1
@ealeon Their sum should always be exactly 100%.
â Timothy Pulliam
Jun 14 at 17:53
ah okay understood. thank you so much
â ealeon
Jun 14 at 17:54
right, i didnt mention those types for the sake of simplicity of the question. So basically the summation of all CPU usage types will never be more than 100% but it can be less than 100%, correct?
â ealeon
Jun 14 at 17:52
right, i didnt mention those types for the sake of simplicity of the question. So basically the summation of all CPU usage types will never be more than 100% but it can be less than 100%, correct?
â ealeon
Jun 14 at 17:52
1
1
@ealeon Their sum should always be exactly 100%.
â Timothy Pulliam
Jun 14 at 17:53
@ealeon Their sum should always be exactly 100%.
â Timothy Pulliam
Jun 14 at 17:53
ah okay understood. thank you so much
â ealeon
Jun 14 at 17:54
ah okay understood. thank you so much
â ealeon
Jun 14 at 17:54
add a comment |Â