Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2001

    How to tell which script is using so many MySQL resources?


    I posted this a few days ago but my thread got hijacked.

    If I run "top" or "ps -ax" I can see there is huge amount of MySQL activity on my server.

    It looks like this -

    27936 ? D 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/ --skip-locking

    mytop will just tell me what user is using MySQL, which isn't really much use to me.

    Is there perhaps a MySQL log which shows which files are making the MySQL calls?

    Thank you.

  2. #2
    Join Date
    Jan 2006
    Somewhere in USA
    I posted this also in another thread.
    You can check mysql to see which user and which database is using resources on your server with this command:

    watch -n 1 "uptime; free -m; mysqladmin processlist "

    It will show also the time that the database is used, and the insert methods.

    It can be an idea to check the database, and after this repair it, because the issue with mysql can be because of some tables that got broken.

    Hope this will help you! - Reliable and secure vpn services

  3. #3
    Join Date
    Jun 2001
    Absolutely brilliant!

    Thank you!

    Much appreciated.

  4. #4
    Join Date
    Nov 2004
    Rails in DA - Ruby on Rails plugin for Directdmin | DA-Tomcat - Tomcat Manager plugin for Directdmin
    DA-PgSQL - PostgreSQL plugin for Directdmin | IP Deny Manager - IP Deny Manager plugin for Directdmin
    DeeperAdmin - Manager your DirectAdmin server "deeper"
    Order now at

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts