Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

O.S.:Linux MYSQL server

we got a load spike last week.

how can I find the process that has created the load spike on my server last week.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

You cannot triage the process that is in past-tense provided if you have below setup in-place.

  1. Have a plugin to monitor your load avg/CPU/IO.
  2. If any one of them seems to be breaching you may trigger a script to gather details for mysql and server processes and save it to a log_file with timestamp name.
    • mysql > show full processlist \G
    • ps -ef details.

By this way you can collate details when your usage goes peak. And you may check when you are awake in the day time.

share|improve this answer

If you have the slow query log active, you might be able to identify a long running query during the timeframe of your load spike. This probably the only way to figure out the issue that has already occurred.

You can configure a script like pt-stalk to try to capture future issues, however.

Here's an example to trigger data collection if you have more than 10 connections from host '10.0.0.23' [src]:

pt-stalk --function processlist --variable Host\
 --match 10.0.0.23 --threshold 10 -- --defaults-file=./my.default.cnf
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.