Overview
- top: Displays real-time system summary information and a list of processes or threads currently being managed by the Linux kernel.
- iotop: Monitors disk I/O usage information output by the Linux kernel.
- Apache process list: Monitors the processes of the Apache web server.
- MySQL process list: Monitors the processes of the MySQL database server.
- iostat: Reports CPU statistics and input/output statistics for devices and partitions.
Create a directory for MySQL logs:
Code: Select all
mkdir /root/mysql-logs
Code: Select all
wget -nv http://dl.myvestacp.com/vesta/see-mysql-processlist.sh -O /root/see-mysql-processlist.sh
Code: Select all
chmod u+x /root/see-mysql-processlist.sh
Code: Select all
wget -nv http://dl.myvestacp.com/vesta/see-apache-processlist.sh -O /root/see-apache-processlist.sh
Code: Select all
chmod u+x /root/see-apache-processlist.sh
Code: Select all
crontab -l | { cat; echo ‘* * * * * /root/see-mysql-processlist.sh > /root/mysql-logs/mysql-date +\%Y-\%m-\%d-\%H-\%M-\%S-cron.log 2>&1’; } | crontab -
Code: Select all
crontab -l | { cat; echo ‘* * * * * /root/see-apache-processlist.sh > /root/mysql-logs/apache-date +\%Y-\%m-\%d-\%H-\%M-\%S-cron.html 2>&1’; } | crontab -
Code: Select all
crontab -l | { cat; echo ‘5 4 * * * find /root/mysql-logs/ -mtime +1 -delete’; } | crontab -