Oracle 5.0 Reference Manual page 2654

Table of Contents

Advertisement

| | | | | | info : Freeing memory of members
| | | | | | info : scheme=unix:///tmp/mysql.sock
| | | | | | >mysqlnd_error_list_pdtor
| | | | | | <mysqlnd_error_list_pdtor
| | | | | <mysqlnd_conn::free_contents
| | | | <mysqlnd_conn::connect
[...]
The trace log can also be used to verify correct behaviour of PECL/mysqlnd_ms itself, for example, to
check which server has been selected for query execution and why.
Example excerpt from the debug log (plugin decision):
[...]
>mysqlnd_ms::query
| info : query=DROP TABLE IF EXISTS test
| >_mysqlnd_plugin_get_plugin_connection_data
| | info : plugin_id=5
| <_mysqlnd_plugin_get_plugin_connection_data
| >mysqlnd_ms_pick_server_ex
| | info : conn_data=0x7fb6a7d3e5a0 *conn_data=0x7fb6a7d410d0
| | >mysqlnd_ms_select_servers_all
| | <mysqlnd_ms_select_servers_all
| | >mysqlnd_ms_choose_connection_rr
| | | >mysqlnd_ms_query_is_select
[...]
| | | <mysqlnd_ms_query_is_select
[...]
| | | info : Init the master context
| | | info : list(0x7fb6a7d3f598) has 1
| | | info : Using master connection
| | | >mysqlnd_ms_advanced_connect
| | | | >mysqlnd_conn::connect
| | | | | info : host=localhost user=root db=test port=3306 flags=131072 persistent=0 state=0
In this case the statement
statement string is shown in the log file. You may want to take measures to restrict access to the log for
security considerations.
The statement has been load balanced using round robin policy, as you can easily guess from
the functions name >mysqlnd_ms_choose_connection_rr. It has been sent to a master
server running on
persistent=0
20.7.6.6.8. Monitoring
Copyright 1997-2012 the PHP Documentation Group. [2230]
Plugin activity can be monitored using the mysqlnd trace log, mysqlnd statistics, mysqlnd_ms plugin
statistics and external PHP debugging tools. Use of the trace log should be limited to debugging. It is
recommended to use the plugins statistics for monitoring.
Writing a trace log is a slow operation. If using an external PHP debugging tool, please refer to the
vendors manual about its performance impact and the type of information collected. In many cases,
external debugging tools will provide call stacks. Often, a call stack or a trace log is more difficult to
interpret than the statistics provided by the plugin.
Plugin statistics tell how often which kind of cluster node has been used (slave or master), why the
node was used, if lazy connections have been used and if global transaction ID injection has been
performed. The monitoring information provided enables user to verify plugin decisions and to plan
their cluster resources based on usage pattern. The function
access the statistics. Please, see the functions description for a list of available statistics.
Mysqlnd replication and load balancing plugin (mysqlnd_ms)
DROP TABLE IF EXISTS test
host=localhost user=root db=test port=3306 flags=131072
state=0.
has been executed. Note that the
mysqlnd_ms_get_stats
2634
is used to

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents