S
S
svlytkin2014-02-19 19:13:19
Task Schedulers
svlytkin, 2014-02-19 19:13:19

How to determine which process is loading vds?

Can you please tell me if there is a tool to determine which cron process is loading memory?
I used top and ps -ef, but it does not show exactly which process.
Put munin, but there are only graphs for monitoring.
I have vds on digitalocean, 4 cron processes that synchronize data between mailing service, website and crm.
At a certain point, the site stops loading because of them (in digitalocean support they wrote that the server kills the process of launching the site due to the load), but it is impossible to determine exactly which processes cause this.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
RPG, 2014-02-19
@RPG

Oprofile can monitor the performance of the entire system without noticeable slowdown. Everything is recorded in a log, from which you can then generate a report - the culprit must also be caught.

N
nekipelov, 2014-02-19
@nekipelov

top displays everything perfectly (in the %CPU column, the percentage of use, in the COMMAND column, the name of the process), you can use the more convenient htop.
You can run programs in cron after time, then after execution a report like this will be sent to the email:
real 1m1.694s
user 0m3.360s
sys 0m5.516s
from which it is clear how much CPU time the program spent and in what mode.
Can be run with cron every minute command

ps h -eo pcpu,comm | sort -n  | tail -n1 >>/home/user/cpu-usage-stat
and after receiving the next complaint, look at what process occurs most often. If I faced such a task, I would display the 5 most CPU-hungry processes in the same way, save them to the database, and then look.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question