O
O
Oleg2018-07-23 17:42:48
PHP
Oleg, 2018-07-23 17:42:48

How to track which script/method is currently using memory in CentOs?

I am using CentOs 7 and ispManager.
How can I keep track of which file/script or method is currently in use and how much memory it is using.
For example, at one moment the memory consumption can rise to the maximum, I want to know which function did it.
I know there is top, but it shows processes there. And I can’t figure out how to see what exactly the memory eats

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
DevMan, 2018-07-23
@bysobi

P-profiling.
Take any puff profiler you like and see.

P
Puma Thailand, 2018-07-23
@opium

install xdebug and start profiling if you have php

Z
Znardi, 2018-07-26
@Znardi

for example, the address 192.168.1.1 is pinged from file 1.bh.
in htop you can find the file. press F5 for tree structure
press l (small L, lsof)
as root

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question