1

I have a linux server which encounters high cpu usage which cause server not responding to any request even ssh login. After manual reboot the server comes back to normal. The server has many cron jobs running at different time interval. Checked the sar logs but could not get clear detail of the process causing the issue. Can anyone help with this if any tools available to record the periodic individual process, crontab script resources usage for troubleshooting the issue.

1 Answer 1

2

Read man top, especially about the -b Batch mode and -n Number of iterations. Redirect the top output to a file (I'd do one per top invocation, to facilitate comparison)

2
  • Usage: top -b > ~/top.log &
    – pa4080
    Aug 7, 2017 at 15:21
  • @pa4080 How do you stop that before it fills the disk? How do you compare this time period with the previous? Seriously, read man top.
    – waltinator
    Aug 7, 2017 at 19:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .