Find the answer to your Linux question:
Results 1 to 4 of 4
Hi there, I use debian vps. I want to cpu logging When my cpu is busy.Example: when cpu usage is > 50%.I want logging time. Thanks in advance.. my english ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2014
    Posts
    2

    Logging When cpu is intensive


    Hi there,
    I use debian vps. I want to cpu logging When my cpu is busy.Example: when cpu usage is > 50%.I want logging time.

    Thanks in advance..
    my english is bad,sorry

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,391
    Hi and welcome

    If it is only one machine then atop might be useful for you.
    atop can not only show current metrics but can also record these metrics for later review if started as a daemon.

    Recorded metrics can be seen with e.g.
    Code:
    atop -r /var/log/atop.log.1
    You can jump forward and backwards in time.
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Aug 2014
    Posts
    2
    Quote Originally Posted by Irithori View Post
    Hi and welcome

    If it is only one machine then atop might be useful for you.
    atop can not only show current metrics but can also record these metrics for later review if started as a daemon.

    Recorded metrics can be seen with e.g.
    Code:
    atop -r /var/log/atop.log.1
    You can jump forward and backwards in time.
    hi, tank you for your answer
    i get error Ads?z.jpg

  4. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,391
    Please use code tags for showing commands and their output.

    Other than that, the atop -r line was just an example.
    -r tells atop to read an already existing history file.
    So the atop daemon needs to run for a few days and these files will be generated.

    You can see if there are files already with
    Code:
    ls -la /var/log/atop*
    btw, atop is installed, right?
    Code:
    dpkg -l |grep atop
    You must always face the curtain with a bow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •