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
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)
-
-
@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
. Aug 7, 2017 at 19:34