LINUX common monitor commands & tools
I. Common Commands & Tools
1. PHP Performance debugger
Strace is good tool to debug PHP performance. Firstly, you need to install it via
CentOS
yum install strace
Ubuntu
apt-get install strace
For detect all PHP-FPM we can use following command
strace -c -f $(pgrep php-fpm | sed 's/\([0-9]*\)/\-p \1/g')
lstat + fstat + stat is system call into file information
2. IP Monitor
netstat -ant | grep -v LISTEN | awk '{print $5}' | cut -d":" -f1 | sort | uniq -c | sort -rn
3. Disk application I/O monitor
iotop
4. Process monitor tools
htop
atop
top