How do I measure CPU usage and memory percentage versus time on linux? [closed]












-1















I would like to plot the CPU and memory usage of an application on linux vs time. What is the best way to do this?



Would greping these values out from top every 0.1s and writing them into some file work - or is there a better and easier way?










share|improve this question













closed as too broad by Andrey Tyukin, Red Cricket, jww, eyllanesc, Robert Columbia Jan 2 at 0:45


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.























    -1















    I would like to plot the CPU and memory usage of an application on linux vs time. What is the best way to do this?



    Would greping these values out from top every 0.1s and writing them into some file work - or is there a better and easier way?










    share|improve this question













    closed as too broad by Andrey Tyukin, Red Cricket, jww, eyllanesc, Robert Columbia Jan 2 at 0:45


    Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.





















      -1












      -1








      -1


      1






      I would like to plot the CPU and memory usage of an application on linux vs time. What is the best way to do this?



      Would greping these values out from top every 0.1s and writing them into some file work - or is there a better and easier way?










      share|improve this question














      I would like to plot the CPU and memory usage of an application on linux vs time. What is the best way to do this?



      Would greping these values out from top every 0.1s and writing them into some file work - or is there a better and easier way?







      linux






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 1 at 3:49









      avgnavgn

      462216




      462216




      closed as too broad by Andrey Tyukin, Red Cricket, jww, eyllanesc, Robert Columbia Jan 2 at 0:45


      Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









      closed as too broad by Andrey Tyukin, Red Cricket, jww, eyllanesc, Robert Columbia Jan 2 at 0:45


      Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


























          1 Answer
          1






          active

          oldest

          votes


















          2














          There is an easier way. All of the information displayed in top can be found in /proc/<pid>/, most of it in /proc/<pid>/stat. man proc describes the content of these files.






          share|improve this answer






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            There is an easier way. All of the information displayed in top can be found in /proc/<pid>/, most of it in /proc/<pid>/stat. man proc describes the content of these files.






            share|improve this answer




























              2














              There is an easier way. All of the information displayed in top can be found in /proc/<pid>/, most of it in /proc/<pid>/stat. man proc describes the content of these files.






              share|improve this answer


























                2












                2








                2







                There is an easier way. All of the information displayed in top can be found in /proc/<pid>/, most of it in /proc/<pid>/stat. man proc describes the content of these files.






                share|improve this answer













                There is an easier way. All of the information displayed in top can be found in /proc/<pid>/, most of it in /proc/<pid>/stat. man proc describes the content of these files.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 1 at 4:05









                SoapBoxSoapBox

                17.9k23981




                17.9k23981

















                    Popular posts from this blog

                    Monofisismo

                    Angular Downloading a file using contenturl with Basic Authentication

                    Olmecas