Link to home
Start Free TrialLog in
Avatar of mbharanim
mbharanim

asked on

mysql open files

mysql> show status like 'open%';
+--------------------------+-------+
| Variable_name            | Value |
+--------------------------+-------+
| Open_files               | 2     |
| Open_streams             | 0     |
| Open_table_definitions   | 15    |
| Open_tables              | 1     |
| Opened_files             | 60    |
| Opened_table_definitions | 0     |
| Opened_tables            | 0     |
+--------------------------+-------+
7 rows in set (0.00 sec)



in mysql 5.0 when how to see what are the actual Opened_table_definitions ?

flush tables command doesnot reduce the "Opened_files" but only affects the open files.

how to reduce the opened files and see what are they ?
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

What version of MySQL do you have?  I have 5.0.51a and it only shows 4 of the seven items in your list.  The MySQL docs say that "Opened_files" is the number of files that Have been opened, not that are currently open.  Same with 'Opened_tables'.
Avatar of mbharanim
mbharanim

ASKER

The version of mysql i am using is :
Server version: 5.1.30-community MySQL Community Server (GPL)

Also Can I exactly see what are the actual files opened ?
you can use lsof but it has nothing to do with mysql.
Thanks for your quick reply !

Do you mean that the number of opened files listed by mysql are the files opened by the OS and not mysql ?

And if I want to see the opened files via mysql what should I do ?
to be more precise, under ubuntu as example, install lsof, then:

sudo lsof | grep mysql

here you are.

concerning reseting the count, you need to restart mysql.
If possible could you tell me how to do this on solaris ?
I mean does lsof work on solaris ?
ASKER CERTIFIED SOLUTION
Avatar of flytox06
flytox06
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Solved