CPU usage: user,system,idle always add up to 100%? [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash 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%?







share|improve this question













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
If this question can be reworded to fit the rules in the help center, please edit the question.
















    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%?







    share|improve this question













    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
    If this question can be reworded to fit the rules in the help center, please edit the question.














      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%?







      share|improve this question













      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%?









      share|improve this question












      share|improve this question




      share|improve this question








      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
      If this question can be reworded to fit the rules in the help center, please edit the question.




      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
      If this question can be reworded to fit the rules in the help center, please edit the question.




















          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.






          share|improve this answer





















          • "All possible states values sum up to 100 %" okay thats was my source of confusion. thank you
            – ealeon
            Jun 14 at 17:53

















          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%.






          share|improve this answer























          • 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

















          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.






          share|improve this answer





















          • "All possible states values sum up to 100 %" okay thats was my source of confusion. thank you
            – ealeon
            Jun 14 at 17:53














          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.






          share|improve this answer





















          • "All possible states values sum up to 100 %" okay thats was my source of confusion. thank you
            – ealeon
            Jun 14 at 17:53












          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.






          share|improve this answer













          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.







          share|improve this answer













          share|improve this answer



          share|improve this answer











          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
















          • "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












          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%.






          share|improve this answer























          • 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














          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%.






          share|improve this answer























          • 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












          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%.






          share|improve this answer















          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%.







          share|improve this answer















          share|improve this answer



          share|improve this answer








          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
















          • 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


          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?