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 ?
+-------------------------
| 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 ?
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'.
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 ?
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.
ASKER
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 ?
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.
sudo lsof | grep mysql
here you are.
concerning reseting the count, you need to restart mysql.
ASKER
If possible could you tell me how to do this on solaris ?
I mean does lsof work on solaris ?
I mean does lsof work on solaris ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Solved