How To Check Who Is Using MySQL

Jan 29, 2007

I have a problem where mysqld is using 95 - 97% CPU usage all the time.

How can I see what user is causing this ? I have installed mytop but when I use it I get

Quote:

[root@server1 ~]# mytop
Cannot connect to MySQL server. Please check the:

* database you specified "test" (default is "test")
* username you specified "root" (default is "root")
* password you specified "" (default is "")
* hostname you specified "localhost" (default is "localhost")
* port you specified "3306" (default is 3306)
* socket you specified "" (default is "")

The options my be specified on the command-line or in a ~/.mytop
config file. See the manual (perldoc mytop) for details.

Here's the exact error from DBI. It might help you debug:

Access denied for user 'root'@'localhost' (using password: NO)

I really need to track down the culprit!

View 12 Replies


ADVERTISEMENT

Check My Mysql Config - Optimize Or Upgrade

Mar 17, 2008

we've currently got a 2 server setup, apache+mysql

Mysql server is a Xeon 3.2Ghz with 2Gb ram, scsi 73gb raid1 disks

Server has been running a while, steadily increasing in traffic. whilst 90% of the time it's running ok (load around 0.5 - 1.0, cpu around 25-50% busy mainly mysql, disk i/o around 3% busy) during heavy traffic times everything slows right down

At the moment the mysql box is only running mysql so we've allocated about 1.5gb out of the 2gb to mysql.

At present, when we get busy the apache server is queing up requests as it waits for the mysql server. Query log shows most queries are <1sec, any other's are being optimised but due to the nature of our website there are a few pesky queries (only occasionally being slow though).

question is, can this config be tuned any more or is it time for an upgrade - mainly ram to add more innodb buffers?

Here's the result of tuning-primer.sh

Code:
SLOW QUERIES
The slow query log is enabled.
Current long_query_time = 2 sec.
You have 9 out of 159346 that take longer than 2 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is enabled
The expire_logs_days is not set.
The mysqld will retain the entire binary log until RESET MASTER or PURGE MASTER LOGS commands are run manually
Setting expire_log_days will allow you to remove old binary logs automatically
See http://dev.mysql.com/doc/refman/4.1/en/purge-master-logs.html

WORKER THREADS
Current thread_cache_size = 384
Current threads_cached = 15
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 150
Current threads_connected = 4
Historic max_used_connections = 18
The number of used connections is 12% of the configured maximum.
Your max_connections variable seems to be fine.

MEMORY USAGE
Max Memory Ever Allocated : 1 G
Configured Max Per-thread Buffers : 5 G
Configured Max Global Buffers : 803 M
Configured Max Memory Limit : 6 G
Physical Memory : 1.99 G

Max memory limit exceeds 90% of physical memory

KEY BUFFER
Current MyISAM index space = 82 K
Current key_buffer_size = 5 M
Key cache miss rate is 1 : 1862
Key buffer fill ratio = 100.00 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is supported but not enabled
Perhaps you should set the query_cache_size

SORT OPERATIONS
Current sort_buffer_size = 16 M
Current read_rnd_buffer_size = 7 M
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 4.00 M
You have had 0 queries where a join could not use an index properly
Your joins seem to be using indexes properly
join_buffer_size >= 4 M
This is not advised

OPEN FILES LIMIT
Current open_files_limit = 11095 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
Your open_files_limit value seems to be fine

TABLE CACHE
Current table_cache value = 5467 tables
You have a total of 732 tables
You have 155 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 255 M
Current tmp_table_size = 256 M
Of 21109 temp tables, 35% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Perhaps you should increase your tmp_table_size and/or max_heap_table_size
to reduce the number of disk-based temporary tables
Note! BLOB and TEXT columns are not allow in memory tables.
If you are using these columns raising these values might not impact your
ratio of on disk temp tables.

TABLE SCANS
Current read_buffer_size = 7 M
Current table scan ratio = 929 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 117
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
Server is mainly Innodb due to previous row-locking issues.

View 4 Replies View Related

Check Which Mysql Thread Waste A Lot Of Resource

Nov 13, 2007

sometimes some forum use a lot of resource of cpu and memory,

my friend want to check which mysql thread waste a lot of resource,

he want to improve his program,

when i ssh the server,

what command can help me check and resource it?

View 8 Replies View Related

How To Check Which Mysql Databases Cause Server Load

Jul 30, 2007

How can i check (using SSH) which databases/users cause server load to mysql ?

I've tried "mysqladmin proc stat" but it shows just the current. How can i get stats of the last 24 hours for example ?

I've also seen slow connections stats. What is the command to check more detailed report of the slow connections; which databases caused it etc', in the last 24 hours for example as well.

View 4 Replies View Related

How To Automatically Check And Repair Mysql Databases And Tables

Jul 16, 2009

I have cPanle shared account.

Is there a way to automatically check and repair mysql databases and tables, that can be scheduled as cron job?

View 9 Replies View Related

How To Check Load Via Ssh And Check Files Causing Load

Jul 1, 2009

I would like to know how to check load via ssh and check files causing load?

I want the ssh codes for 2 different set of control panels, one with cpanel+whm and other with kloxo+hypervm

and I would also know how to check the files causing the load, such as some files could have been interrupted while processing, so they could be causing load some times, so I want to stop such processes if any are running on the vps on my friends accounts

View 5 Replies View Related

I Moved Mysql From /var To /backup/mysql, Mysql Is No Longer Working

May 8, 2009

Since my /var partition is full, so I moved /var/lib/mysql to /backup/mysql/.

Seems all the files are copied and I changed my.cnf reboot mysql, but all the web sites using db is not working anymore..

View 4 Replies View Related

Installed MySQL In /usr/local/mysql But Error In /var/lib/mysql

Jan 21, 2007

I installed the MySQL binary packages in /usr/local/mysql/ after removing the MySQL RPM package. MySQL is functioning when I executed /usr/local/mysql/bin/safe_mysqld. I reinstalled MySQL before I installed PHP. When I used a PHP script to access a MySQL database, it outputs an error:

Code:
Warning: mysqli::mysqli() [function.mysqli-mysqli]: (HY000/2002): can't connect to local mysql server through socket /var/lib/mysql/mysql.sock in index.php on line 2
However, I installed MySQL in /usr/local/mysql, not in /var/lib/mysql. How do I fix MySQL?

View 1 Replies View Related

How To Check VPS Os

Apr 10, 2008

i recently purchased a VPS from internetvps.com, but im not sure what OS of linux it is. How can you check the OS of the server?

View 10 Replies View Related

How To Check Ram

Jun 7, 2007

Let's say I have a VPS with 512 MBs of RAM.

How do I check in shell that this is indeed the case?

I read in some places that "top" and "free -m" and such can help.

But these gave me way more than 512.

Here is the output from my "free -m". Total shows here 3886 MBs of MEM??? That is almost 4 Gigs. Please someone explain this.

total used free shared buffers cached
Mem: 3886 3721 164 0 17 542
-/+ buffers/cache: 3161 724
Swap: 6142 2020 4121

View 4 Replies View Related

Nobody Check

Mar 20, 2007

Quote:

Nobody Check 1.0.3 Current on cPanel

Tue Mar 20 16:00:02 SGT 2007 on blue.mydomain.com
Server Load: 16:00:02 up 21 days, 14:02, 0 users, load average: 2.73, 2.20, 2.08
Warning: Malicious Nobody Process Found
=========================================
Options: kill bad proc=1 logging lvl=1

SCAN SUMMARY
========================================

Clean Processes: 57
DETECTED Malicious Processes: 1

DETECTION DETAILS
========================================

DETECTION: Process 4221 with name php and path /usr/bin/php

Process ID: 4221 has been killed
Restuls for PID: 4221
total 0
dr-xr-xr-x 3 easyzz easyzz 0 Mar 20 16:00 .
dr-xr-xr-x 291 root root 0 Feb 27 10:01 ..
dr-xr-xr-x 2 easyzz easyzz 0 Mar 20 16:00 attr
-r-------- 1 easyzz easyzz 0 Mar 20 16:00 auxv
-r--r--r-- 1 easyzz easyzz 0 Mar 20 16:00 cmdline
lrwxrwxrwx 1 easyzz easyzz 0 Mar 20 16:00 cwd -> /home/easyzz/public_html
-r-------- 1 easyzz easyzz 0 Mar 20 16:00 environ
lrwxrwxrwx 1 easyzz easyzz 0 Mar 20 16:00 exe -> /usr/bin/php
dr-x------ 2 easyzz easyzz 0 Mar 20 16:00 fd
-rw-r--r-- 1 easyzz easyzz 0 Mar 20 16:00 loginuid
-r-------- 1 easyzz easyzz 0 Mar 20 16:00 maps
-rw------- 1 easyzz easyzz 0 Mar 20 16:00 mem
-r--r--r-- 1 easyzz easyzz 0 Mar 20 16:00 mounts
lrwxrwxrwx 1 easyzz easyzz 0 Mar 20 16:00 root -> /
-r--r--r-- 1 easyzz easyzz 0 Mar 20 16:00 stat
-r--r--r-- 1 easyzz easyzz 0 Mar 20 16:00 statm
-r--r--r-- 1 easyzz easyzz 0 Mar 20 16:00 status
dr-xr-xr-x 3 easyzz easyzz 0 Mar 20 16:00 task
-r--r--r-- 1 easyzz easyzz 0 Mar 20 16:00 wchan

Netstat:

Environ:

Hello, I got this notification from the 'Nobody Check'.

Is there anything I need to be aware of? ..

View 3 Replies View Related

Mem Check

May 22, 2007

confirm this is only 1gig of ram?

Mem: 1034096 985128 48968 0 157944 559136
-/+ buffers/cache: 268048 766048
Swap: 2040212 160 2040052
Total: 3074308 985288 2089020

View 3 Replies View Related

CSF Security Check

Apr 20, 2009

I'm running CSF on a Cpanel server and have questions about new features in CSF

Apache Check

Check Apache weak SSL/TLS Ciphers (SSLCipherSuite)

Results

Cipher list []. Due to weaknesses in the SSLv2 cipher you should disable SSLv2 in WHM > Apache Configuration > Global Configuration > SSLCipherSuite > Add -SSLv2 to SSLCipherSuite and/or remove +SSLv2. Do not forget to Save AND then Rebuild Configuration and Restart Apache, otherwise the changes will not take effect in httpd.conf

Can someone explain this in laymen terms? I know this is new in Cpanel. I'm already running Apache 2.2, PHP 5.2.9 with suPHP enabled and mod_security as well (these rules: [url]

Also, what exactly are these CSF checks?

Check csf PT_SKIP_HTTP option
This option disables checking of processes running under apache and can limit false-positives but may then miss running exploits

Check csf SAFECHAINUPDATE option
This option closes a window of opportunity that opens when dynamic chain updates occur

View 3 Replies View Related

How To Check If The HD Is SSD Drive

Jun 11, 2009

how to check using SSH if the HD is SSD drive in a linux box?

View 1 Replies View Related

How Can Check Ddos

Jul 18, 2009

How can we be sure that we are facing ddos attacks any good command which will make me 100 percent sure that there is ddos attacks on server ?

View 12 Replies View Related

Possible To Run A Hardware Check On My VPS?

Feb 26, 2009

Is it possible to run a hardware check on my VPS?

For instance DFT (Drive Fitness Test) or Memtest?

I'm running HyperVM and WHM.

View 3 Replies View Related

How To Check IP If It Can See My Server

Apr 10, 2009

I have one client who cannot see my server and all domains on it. I;ve checked if his IP is block or not and I didn't see his IP on the apf deny host file. How to you check IP if it can see my server? I just want to make sure before calling the ISP.

View 3 Replies View Related

How To Check Flv/encoders

Jul 22, 2008

I used this script
[url]

Now, via command line how can I check that ALL these work and are enabled for example? I'm not talking about visually seeing the files there, I mean actually enabled.

View 1 Replies View Related

Unsubscore Check

Apr 11, 2008

I recently added ubl.unsubscore.com to my email server. I only have that one and the SpamHaus (Zen) activated.

I am able to see the SpamHaus listed on DNSStuff and on SpamHaus website that the person trying to email me is not listed.

So I have to think that it is ubl.unsubscore.com list. But what domain name can I enter into the browser to check this list? www.unsubscore.com does not work. A little searching led me to lashback, but the IP is not listed there either.

View 2 Replies View Related

BGP4 Check

Aug 6, 2008

You know, maybe, how to check if my provider has bgp4?

Via unix command or somnething...

View 0 Replies View Related

How Can I Check Logs

Apr 9, 2008

How can I check the logs to see if there are any errors? Can I check this via WHM?

View 6 Replies View Related

CPU Usage Check

Nov 25, 2008

Few days ago I had a problem with my httpd. I finally nailed it down and came on a conclusion that my MaxClients were set too low so I had to set it to high number and it seems like that the proble of "Network Timeout" had been resolved but now the problem is still continued. Here is what I think is wrong

Cpu(s): 1.5%us, 0.4%sy, 0.0%ni, 96.7%id, 0.3%wa, 0.3%hi, 0.8%si, 0.0%st
The 96.7%id always stays above 90% is that bad and how do i fix it?

View 3 Replies View Related

How To Check Logfile

Jan 8, 2007

i just don't remember what was the command to check logfile in linux to see what was going on in my server, since i think someone hacked in to my server and i was ddos last couple days.

View 8 Replies View Related

Where To Check Name Servers And Do Who Is

May 15, 2007

Where to check name servers and do who is as dnsstuff.com
is a paid service now.

View 5 Replies View Related

Check Limits In A Vps

Nov 29, 2007

as a vps customer, how can i check processor, memory and each others resource limits in my vps which allocated for me?

View 5 Replies View Related

Root Kit Check On Vps

May 6, 2007

Am am running through a checklist of to-do's on a new VPS I just received. I haven't used it in a production environment yet.

While doing a root kit check I got these lines back that perturb me.

Checking `bindshell'... INFECTED (PORTS: 465)
Checking `lkm'... You have 103 process hidden for readdir command
chkproc: Warning: Possible LKM Trojan installed

how serious the implications are of those lines? And should I expect this on a machine that has no traffic and is a fresh install?

View 12 Replies View Related

Ports Check

Mar 7, 2007

Which command can I verify if a port is opened?

View 3 Replies View Related

How To Check Security In My VPS

Jul 11, 2007

I have 1 VPS from vpsland

Plesk 8.1 , how to check my VPS security?

View 1 Replies View Related

How To Check If An IP Is Blocked

Jul 15, 2007

One of my hosted user complained that he can't access his website nor he can ping the website. When I asked him to access my 2nd server (same datacenter), it went fine. I could be thinking that my server is blocking his IP.

How do I check if his IP is blocked?

I am using APF+BFD Iptables firewall (i don't know but i hope this make sense)

View 8 Replies View Related

Virtuozzo Check Resources

Mar 27, 2009

Is there a way on a Virtuozzo server (via. SSH) to check how much CPU or load/cpu-resources each container is using? Or some other way?

View 2 Replies View Related

How Do You Check Your Hosting Speed

Jun 3, 2009

Is there a quick way to check out how fast you are from the web host your buying..

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved