RE: SQL realtime statistics

"Mikhail Berman" <[email protected]>
Newsgroups gmane.comp.db.mysql.windows
Message-ID <[email protected]>
Hi  Jangita,

Because you working with Lunix you can write a script using following
commands from /../../bin directory of MySQL installation:

I.
$bin> mysql -pYourPWD -e "status"
--------------
mysql  Ver 14.7 Distrib 4.1.10a, for sun-solaris2.9 (sparc)

Connection id:          462762
Current database:
Current user:           root@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         4.1.10a-standard-log
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    latin1
Conn.  characterset:    latin1
UNIX socket:            /tmp/mysql.sock
Uptime:                 30 days 15 hours 12 min 14 sec

Threads: 14  Questions: 109784023  Slow queries: 17492  Opens: 128396
Flush tables: 1  Open tables: 512  Queries per second avg: 41.479

And 

$ /bin/mysqladmin -pYourPWD processlist

The output from  "processlist" is long, so I am not posting it here.

II.

Put these to commands in a loop in the script file and have their output
to be redirected to a file on hard-drive of your server. Then you can
analize the output file.

================================================================
Here is a sample of what I have:

#!/bin/ksh


        while true
        do
                /bin/date >> db_access.report
                /../../../bin/mysqladmin -pxxxxxx processlist >>
/../../mikhail/db_access.report
                sleep 30
        done

Regards

Mikhail Berman

-----Original Message-----
From: Jangita [mailto:[email protected]] 
Sent: Friday, May 26, 2006 1:02 PM
To: Jonathan G. Lampe; [email protected]
Subject: Re: SQL realtime statistics

Sorry for posting a linux question in the windows forum... non-the-less;
any windows apps that can do that - would probably write one but dont
want to re-invent the wheel

Jonathan G. Lampe wrote:
> Well, this is the WINDOWS forum, but such a thing would probably take 
> about 30 minutes to write in Perl or VBS.  Of course, they next thing 
> you'd want is a log of that information so you can pull more 
> meaningful statistics later...
> 
> -jgl
> 
> At 11:52 AM 5/26/2006, Jangita wrote:
>> Hello everyone,
>>
>> Anyone has an idea where i can find an application that shows mysql 
>> statistics and refreshes maybe once every second on the linux
console?
>> stuff like connected users server load, queries per second; uptime 
>> etc etc etc?
>>
>> Thanks
>>
>> J
>>
>> --
>> MySQL Windows Mailing List
>> For list archives: http://lists.mysql.com/win32
>> To unsubscribe:
http://lists.mysql.com/[email protected]
> 
> - Jonathan Lampe
> - [email protected]
> 
> ******************* PLEASE NOTE ******************* This email and any

> files transmitted with it are confidential and intended solely for the

> use of the individual or entity to whom they are addressed.
> If you are not the named addressee you should not disseminate, 
> distribute or copy this e-mail. Please delete this e-mail from your 
> system. If you are not the intended recipient you are notified that 
> disclosing, copying, distributing or taking any action in reliance on 
> the contents of this information is strictly prohibited.
> 

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe:
http://lists.mysql.com/[email protected]


-- 
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.