Код: Выделить всё
HOSTING# mysqladmin -u avgur -p processlist
Enter password:
+--------+---------+-----------+---------+----------------+------+--------------------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+--------+---------+-----------+---------+----------------+------+--------------------+------------------+
| 63452 | ppeople | localhost | ppeople | Sleep | 7217 | | |
| 63453 | ppeople | localhost | ppeople | Sleep | 7217 | | |
| 72579 | ppeople | localhost | ppeople | Sleep | 5842 | | |
| 73459 | ppeople | localhost | ppeople | Sleep | 5718 | | |
| 74425 | ppeople | localhost | ppeople | Sleep | 5575 | | |
| 86620 | ppeople | localhost | ppeople | Sleep | 3708 | | |
| 86708 | ppeople | localhost | ppeople | Sleep | 3695 | | |
| 87181 | ppeople | localhost | ppeople | Sleep | 3630 | | |
| 87193 | ppeople | localhost | ppeople | Sleep | 3628 | | |
| 87194 | ppeople | localhost | ppeople | Sleep | 3628 | | |
| 87195 | ppeople | localhost | ppeople | Sleep | 3628 | | |
| 87196 | ppeople | localhost | ppeople | Sleep | 3628 | | |
| 89492 | ppeople | localhost | ppeople | Sleep | 3240 | | |
| 89978 | ppeople | localhost | ppeople | Sleep | 3166 | | |
| 91454 | ppeople | localhost | ppeople | Sleep | 2915 | | |
| 92217 | ppeople | localhost | ppeople | Sleep | 2756 | | |
| 92440 | ppeople | localhost | ppeople | Sleep | 2719 | | |
| 92449 | ppeople | localhost | ppeople | Sleep | 2718 | | |
| 96485 | ppeople | localhost | ppeople | Sleep | 304 | | |
| 99949 | ppeople | localhost | ppeople | Sleep | 1529 | | |
...
| 109365 | avgur | localhost | | Query | 0 | | show processlist |
+--------+---------+-----------+---------+----------------+------+--------------------+------------------+
За основу была взята статья http://www.lissyara.su/?id=1144 немного переделана...вот кусок конфига отвечающего за коннект с муськой
Код: Выделить всё
## Fro MySQL
SQLLogFile /var/log/proftpd_sql.log
SQLConnectInfo ppeople@localhost:3306 логин пароль
SQLBackend mysql
SQLEngine log
SQLLog RETR,STOR log_story_transfer
SQLNamedQuery log_story_transfer FREEFORM "INSERT DELAYED INTO ftplog(hostname, filename, ftpdate, amount) VALUES ('%h', '%F', FROM_UNIXTIME(UNIX_TIMESTAMP()), '%b')"
## End