CPU and memory usage for last 5 minutes

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












What is the command to get the cpu and memory usage for the last 5 minutes ?
I need to track the cpu and memory usage.







share|improve this question
























    up vote
    0
    down vote

    favorite












    What is the command to get the cpu and memory usage for the last 5 minutes ?
    I need to track the cpu and memory usage.







    share|improve this question






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      What is the command to get the cpu and memory usage for the last 5 minutes ?
      I need to track the cpu and memory usage.







      share|improve this question












      What is the command to get the cpu and memory usage for the last 5 minutes ?
      I need to track the cpu and memory usage.









      share|improve this question











      share|improve this question




      share|improve this question










      asked May 15 at 9:30









      kvmahesh

      1197




      1197




















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          The uptime command lists load average for the last 1, 5 and 15 minutes:



          $ uptime
          05:49:47 up 8:40, 1 user, load average: 3.38, 2.16, 1.87


          The load needs to be divided by number of CPUs. For example my system is a quad core (4 CPUs) Hyper threading (2 threads per CPU) so I need to divide by 8. The 5 minute load average of 2.16 is really .27 or about 27%.



          You can learn more here and here.






          share|improve this answer



























            up vote
            0
            down vote













            You might consider installing conky -- this is a highly configurable system monitoring app; among many-many other capabilities, it can display traveling bar graphs for CPU and RAM usage, which take several minutes to scroll the data off. For multiple cores, it can display the load on each core individually, or the whole CPU as an aggregate. Conky can also monitor system temperature sensors, hard disk and network traffic, uptime, and other things, and display the results in a staggering variety of text and graphic formats.



            Learning to configure Conky can be a challenge, but Google will find all sorts of Conky config files you can install and modify to shorten the learning curve.






            share|improve this answer



























              up vote
              0
              down vote













              mpstat - Report processors related statistics.



              Install with



              sudo apt install sysstat


              The following will report CPU statistics of the last 300s (5 minutes).



              mpstat 300 1


              The command will let you wait for 300s to collect the information. To always have instant statistics, you can make a small script to keep the command running.



              while true; do
              mpstat 300 1 > tmpstat
              cp tmpstat laststat
              done


              Then cat laststat will give you the information. (via)






              share|improve this answer






















                Your Answer







                StackExchange.ready(function()
                var channelOptions =
                tags: "".split(" "),
                id: "89"
                ;
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function()
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled)
                StackExchange.using("snippets", function()
                createEditor();
                );

                else
                createEditor();

                );

                function createEditor()
                StackExchange.prepareEditor(
                heartbeatType: 'answer',
                convertImagesToLinks: true,
                noModals: false,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: 10,
                bindNavPrevention: true,
                postfix: "",
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                );



                );








                 

                draft saved


                draft discarded


















                StackExchange.ready(
                function ()
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1036444%2fcpu-and-memory-usage-for-last-5-minutes%23new-answer', 'question_page');

                );

                Post as a guest






























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes








                up vote
                2
                down vote



                accepted










                The uptime command lists load average for the last 1, 5 and 15 minutes:



                $ uptime
                05:49:47 up 8:40, 1 user, load average: 3.38, 2.16, 1.87


                The load needs to be divided by number of CPUs. For example my system is a quad core (4 CPUs) Hyper threading (2 threads per CPU) so I need to divide by 8. The 5 minute load average of 2.16 is really .27 or about 27%.



                You can learn more here and here.






                share|improve this answer
























                  up vote
                  2
                  down vote



                  accepted










                  The uptime command lists load average for the last 1, 5 and 15 minutes:



                  $ uptime
                  05:49:47 up 8:40, 1 user, load average: 3.38, 2.16, 1.87


                  The load needs to be divided by number of CPUs. For example my system is a quad core (4 CPUs) Hyper threading (2 threads per CPU) so I need to divide by 8. The 5 minute load average of 2.16 is really .27 or about 27%.



                  You can learn more here and here.






                  share|improve this answer






















                    up vote
                    2
                    down vote



                    accepted







                    up vote
                    2
                    down vote



                    accepted






                    The uptime command lists load average for the last 1, 5 and 15 minutes:



                    $ uptime
                    05:49:47 up 8:40, 1 user, load average: 3.38, 2.16, 1.87


                    The load needs to be divided by number of CPUs. For example my system is a quad core (4 CPUs) Hyper threading (2 threads per CPU) so I need to divide by 8. The 5 minute load average of 2.16 is really .27 or about 27%.



                    You can learn more here and here.






                    share|improve this answer












                    The uptime command lists load average for the last 1, 5 and 15 minutes:



                    $ uptime
                    05:49:47 up 8:40, 1 user, load average: 3.38, 2.16, 1.87


                    The load needs to be divided by number of CPUs. For example my system is a quad core (4 CPUs) Hyper threading (2 threads per CPU) so I need to divide by 8. The 5 minute load average of 2.16 is really .27 or about 27%.



                    You can learn more here and here.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered May 15 at 11:52









                    WinEunuuchs2Unix

                    34.7k756131




                    34.7k756131






















                        up vote
                        0
                        down vote













                        You might consider installing conky -- this is a highly configurable system monitoring app; among many-many other capabilities, it can display traveling bar graphs for CPU and RAM usage, which take several minutes to scroll the data off. For multiple cores, it can display the load on each core individually, or the whole CPU as an aggregate. Conky can also monitor system temperature sensors, hard disk and network traffic, uptime, and other things, and display the results in a staggering variety of text and graphic formats.



                        Learning to configure Conky can be a challenge, but Google will find all sorts of Conky config files you can install and modify to shorten the learning curve.






                        share|improve this answer
























                          up vote
                          0
                          down vote













                          You might consider installing conky -- this is a highly configurable system monitoring app; among many-many other capabilities, it can display traveling bar graphs for CPU and RAM usage, which take several minutes to scroll the data off. For multiple cores, it can display the load on each core individually, or the whole CPU as an aggregate. Conky can also monitor system temperature sensors, hard disk and network traffic, uptime, and other things, and display the results in a staggering variety of text and graphic formats.



                          Learning to configure Conky can be a challenge, but Google will find all sorts of Conky config files you can install and modify to shorten the learning curve.






                          share|improve this answer






















                            up vote
                            0
                            down vote










                            up vote
                            0
                            down vote









                            You might consider installing conky -- this is a highly configurable system monitoring app; among many-many other capabilities, it can display traveling bar graphs for CPU and RAM usage, which take several minutes to scroll the data off. For multiple cores, it can display the load on each core individually, or the whole CPU as an aggregate. Conky can also monitor system temperature sensors, hard disk and network traffic, uptime, and other things, and display the results in a staggering variety of text and graphic formats.



                            Learning to configure Conky can be a challenge, but Google will find all sorts of Conky config files you can install and modify to shorten the learning curve.






                            share|improve this answer












                            You might consider installing conky -- this is a highly configurable system monitoring app; among many-many other capabilities, it can display traveling bar graphs for CPU and RAM usage, which take several minutes to scroll the data off. For multiple cores, it can display the load on each core individually, or the whole CPU as an aggregate. Conky can also monitor system temperature sensors, hard disk and network traffic, uptime, and other things, and display the results in a staggering variety of text and graphic formats.



                            Learning to configure Conky can be a challenge, but Google will find all sorts of Conky config files you can install and modify to shorten the learning curve.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered May 15 at 11:58









                            Zeiss Ikon

                            2,9131721




                            2,9131721




















                                up vote
                                0
                                down vote













                                mpstat - Report processors related statistics.



                                Install with



                                sudo apt install sysstat


                                The following will report CPU statistics of the last 300s (5 minutes).



                                mpstat 300 1


                                The command will let you wait for 300s to collect the information. To always have instant statistics, you can make a small script to keep the command running.



                                while true; do
                                mpstat 300 1 > tmpstat
                                cp tmpstat laststat
                                done


                                Then cat laststat will give you the information. (via)






                                share|improve this answer


























                                  up vote
                                  0
                                  down vote













                                  mpstat - Report processors related statistics.



                                  Install with



                                  sudo apt install sysstat


                                  The following will report CPU statistics of the last 300s (5 minutes).



                                  mpstat 300 1


                                  The command will let you wait for 300s to collect the information. To always have instant statistics, you can make a small script to keep the command running.



                                  while true; do
                                  mpstat 300 1 > tmpstat
                                  cp tmpstat laststat
                                  done


                                  Then cat laststat will give you the information. (via)






                                  share|improve this answer
























                                    up vote
                                    0
                                    down vote










                                    up vote
                                    0
                                    down vote









                                    mpstat - Report processors related statistics.



                                    Install with



                                    sudo apt install sysstat


                                    The following will report CPU statistics of the last 300s (5 minutes).



                                    mpstat 300 1


                                    The command will let you wait for 300s to collect the information. To always have instant statistics, you can make a small script to keep the command running.



                                    while true; do
                                    mpstat 300 1 > tmpstat
                                    cp tmpstat laststat
                                    done


                                    Then cat laststat will give you the information. (via)






                                    share|improve this answer














                                    mpstat - Report processors related statistics.



                                    Install with



                                    sudo apt install sysstat


                                    The following will report CPU statistics of the last 300s (5 minutes).



                                    mpstat 300 1


                                    The command will let you wait for 300s to collect the information. To always have instant statistics, you can make a small script to keep the command running.



                                    while true; do
                                    mpstat 300 1 > tmpstat
                                    cp tmpstat laststat
                                    done


                                    Then cat laststat will give you the information. (via)







                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited May 15 at 13:15

























                                    answered May 15 at 12:55









                                    RoVo

                                    4,865932




                                    4,865932






















                                         

                                        draft saved


                                        draft discarded


























                                         


                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function ()
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1036444%2fcpu-and-memory-usage-for-last-5-minutes%23new-answer', 'question_page');

                                        );

                                        Post as a guest













































































                                        Popular posts from this blog

                                        pylint3 and pip3 broken

                                        Missing snmpget and snmpwalk

                                        How to enroll fingerprints to Ubuntu 17.10 with VFS491