B
B
budyakov2010-12-23 20:34:38
linux
budyakov, 2010-12-23 20:34:38

How to find out what exactly loads the server?

There is a vps loaded by 10-15% usually. But recently the load has risen to 30-40%, although site traffic has not changed significantly. How to find out what exactly loads the server?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
P
pentarh, 2010-12-25
@pentarh

Specifically for Apache there is such a tambourine.
1. Open top, catch the highly loaded Apache pid
2. Go to server status, calculate this pid there and see what it does
Option 2:
1. the same
2. lsof -p PID - will show what resources pid is working with

K
krotish, 2010-12-23
@krotish

htop commands (install from packages if not available)
or top
are system monitors, they will show which processes are eating what and how much.

A
admin4eg, 2010-12-24
@admin4eg

install munin and connect it with the nginx apache and a bunch of other things, he will tell you everything about the system, and the arrival of bots and much more

A
amarao, 2010-12-24
@amarao

atop and watch the logs (atop keeps a log of the download and allows you to "flip through" it, watching the output of atop in 10-minute intervals).

I
Igor Fatkulin, 2013-01-10
@ingiboy

in the Apache logs, you can turn on the recording of the processing time of each request
, look at who this time is long, so calculate not only the site, but also the specific location of the site
LogFormat "%h %l %u %t \"%r\" %>s %bb % D" common
at the end - request processing time in microseconds

A
Alexander Kalinin, 2019-08-13
@kentovsky

You can run this directly in a terminal, or create a .sh executable and run the file
while true
do
sleep 5
top -b -n 1 | head -10 >> ~/process
done
next watch process file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question