Spec-Zone .ru
спецификации, руководства, описания, API
|
In this section, we discuss the types of event logs provided by MySQL Cluster, and the types of events that are logged.
MySQL Cluster provides two types of event log:
The cluster log, which includes events generated by all cluster nodes. The cluster log is the log recommended for most uses because it provides logging information for an entire cluster in a single location.
By default, the cluster log is saved to a file named ndb_
, (where node_id
_cluster.lognode_id
is the node ID of the management server) in the
same directory where the ndb_mgm binary resides.
Cluster logging information can also be sent to stdout
or a syslog
facility in addition to or instead of being saved to a file, as
determined by the values set for the DataDir
and LogDestination
configuration parameters. See Section
17.3.2.5, "Defining a MySQL Cluster Management Server", for more information about these
parameters.
Node logs are local to each node.
Output generated by node event logging is written to the file ndb_
(where node_id
_out.lognode_id
is the node's node ID) in the node's DataDir
. Node event logs are generated for both management nodes and
data nodes.
Node logs are intended to be used only during application development, or for debugging application code.
Both types of event logs can be set to log different subsets of events.
Each reportable event can be distinguished according to three different criteria:
Category: This can be any one of the
following values: STARTUP
, SHUTDOWN
, STATISTICS
, CHECKPOINT
, NODERESTART
, CONNECTION
, ERROR
, or INFO
.
Priority: This is represented by one of the numbers from 1 to 15 inclusive, where 1 indicates "most important" and 15 "least important."
Severity Level: This can be any one of the
following values: ALERT
, CRITICAL
, ERROR
, WARNING
, INFO
, or DEBUG
.
Both the cluster log and the node log can be filtered on these properties.
The format used in the cluster log is as shown here:
2007-01-26 19:35:55 [MgmSrvr] INFO -- Node 1: Data usage is 2%(60 32K pages of total 2560)2007-01-26 19:35:55 [MgmSrvr] INFO -- Node 1: Index usage is 1%(24 8K pages of total 2336)2007-01-26 19:35:55 [MgmSrvr] INFO -- Node 1: Resource 0 min: 0 max: 639 curr: 02007-01-26 19:35:55 [MgmSrvr] INFO -- Node 2: Data usage is 2%(76 32K pages of total 2560)2007-01-26 19:35:55 [MgmSrvr] INFO -- Node 2: Index usage is 1%(24 8K pages of total 2336)2007-01-26 19:35:55 [MgmSrvr] INFO -- Node 2: Resource 0 min: 0 max: 639 curr: 02007-01-26 19:35:55 [MgmSrvr] INFO -- Node 3: Data usage is 2%(58 32K pages of total 2560)2007-01-26 19:35:55 [MgmSrvr] INFO -- Node 3: Index usage is 1%(25 8K pages of total 2336)2007-01-26 19:35:55 [MgmSrvr] INFO -- Node 3: Resource 0 min: 0 max: 639 curr: 02007-01-26 19:35:55 [MgmSrvr] INFO -- Node 4: Data usage is 2%(74 32K pages of total 2560)2007-01-26 19:35:55 [MgmSrvr] INFO -- Node 4: Index usage is 1%(25 8K pages of total 2336)2007-01-26 19:35:55 [MgmSrvr] INFO -- Node 4: Resource 0 min: 0 max: 639 curr: 02007-01-26 19:39:42 [MgmSrvr] INFO -- Node 4: Node 9 Connected2007-01-26 19:39:42 [MgmSrvr] INFO -- Node 1: Node 9 Connected2007-01-26 19:39:42 [MgmSrvr] INFO -- Node 1: Node 9: API 5.6.11-ndb-7.3.32007-01-26 19:39:42 [MgmSrvr] INFO -- Node 2: Node 9 Connected2007-01-26 19:39:42 [MgmSrvr] INFO -- Node 2: Node 9: API 5.6.11-ndb-7.3.32007-01-26 19:39:42 [MgmSrvr] INFO -- Node 3: Node 9 Connected2007-01-26 19:39:42 [MgmSrvr] INFO -- Node 3: Node 9: API 5.6.11-ndb-7.3.32007-01-26 19:39:42 [MgmSrvr] INFO -- Node 4: Node 9: API 5.6.11-ndb-7.3.32007-01-26 19:59:22 [MgmSrvr] ALERT -- Node 2: Node 7 Disconnected2007-01-26 19:59:22 [MgmSrvr] ALERT -- Node 2: Node 7 Disconnected
Each line in the cluster log contains the following information:
A timestamp in
format. YYYY
-MM
-DD
HH
:MM
:SS
The type of node which is performing the logging. In the cluster log, this is
always [MgmSrvr]
.
The severity of the event.
The ID of the node reporting the event.
A description of the event. The most common types of events to appear in the log are connections and disconnections between different nodes in the cluster, and when checkpoints occur. In some cases, the description may contain status information.