Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

big restructure of wsrep output -- more info and tighter formatting

  • Loading branch information...
commit 7a2b990fc5ad10b3bd3d18b47ea49e056f7fcbea 1 parent bc9702e
@jayjanssen authored
Showing with 29 additions and 25 deletions.
  1. BIN  .DS_Store
  2. +29 −25 myq_status
View
BIN  .DS_Store
Binary file not shown
View
54 myq_status
@@ -624,40 +624,44 @@ sub process_global_status {
&format_number( $status->{'innodb_oldest_view_low_limit_trx_id'} - $status->{'innodb_purge_trx_id'}, 1, 5 ),
&format_number( $status->{'innodb_purge_undo_no'}, 1, 5 ),
);
- } elsif( $MODE eq 'wsrep' ) {
- printf( "Wsrep%11s%13s%21s%18s%14s\n", "Cluster", "Node", "Flow", "Replicated", "Received"
+
+ } elsif( $MODE eq 'wsrep' ) {
+ printf( "%-8s %-14s %-14s %-7s %-7s %-9s %-11s %-7s\n", "Wsrep", "Cluster", "Node", "Queue", "Ops", "Bytes", "Flow", "Conflct"
) if( $count % $lines_per_header == 0 );
- printf( "%8s%5.4s%5s%5s %5s%5s%5s%5s %5s%5s %5s%5s%5s %5s%5s%5s\n",
- 'time', 'status', 'conf', 'size', 'rdy', 'cmt', 'ctd', 'dist', 'paus', 'sent', 'que', 'ops', 'size', 'que', 'ops', 'size'
+ printf( "%8s %5s %1s %3s %2s %5s %4s %3.3s %3s %3s %3s %3s %4s %4s %3s %3s %3s %3s %3s\n",
+ 'time', 'name', 'P', 'cnf', '#', 'name', 'cmt', 'state', 'Up', 'Dn', 'Up', 'Dn', 'Up' , 'Dn', 'pau', 'snt', 'dst', 'lcf', 'bfa'
) if( $count % $lines_per_header == 0 );
$status->{'wsrep_local_state_comment'} =~ s/\s+\(.+\)$//,
-
-
- printf( "%8s%5.4s%5.4s%5.4s %5.4s%5.4s%5.4s%5.4s %5.4s%5.4s %5.4s%5.4s%5.4s %5.4s%5.4s%5.4s",
+ printf( "%8s %5.5s %1s %3s %2s %5.5s %4.4s %3s %3s %3s %3s %3s %4s %4s %3s %3s %3s %3s %3s",
$pretty_time,
- # $status->{'wsrep_local_state_uuid'} eq $status->{'wsrep_cluster_state_uuid'} ? 'Ok' : 'Unsync'
- $status->{'wsrep_cluster_status'},
- $status->{'wsrep_cluster_conf_id'},
- $status->{'wsrep_cluster_size'},
+ $variables->{'wsrep_cluster_name'},
+ ($status->{'wsrep_cluster_status'} eq 'Primary' ? 'P' : 'N'),
+ substr( $status->{'wsrep_cluster_conf_id'}, -3, 3 ),
+ &format_number( $status->{'wsrep_cluster_size'}, 0, 2 ),
- $status->{'wsrep_ready'},
+ $variables->{'wsrep_node_name'},
$status->{'wsrep_local_state_comment'},
- $status->{'wsrep_connected'},
-
- &format_number( $status->{'wsrep_cert_deps_distance'}, 1, 4 ),
-
- &format_number( $status->{'wsrep_flow_control_paused'}, 1, 4 ),
- &format_number( $status->{'wsrep_flow_control_sent'}, 0, 4 ),
-
- &format_number( $status->{'wsrep_local_send_queue'}, 0, 4 ),
- &format_number( &counter_per_second( 'wsrep_replicated' ), 1, 4 ),
- &format_memory( &counter_per_second( 'wsrep_replicated_bytes' ), 2, 4 ),
+ ($status->{'wsrep_ready'} eq 'ON' ? 'T' : 'F' ) . "/" . ( $status->{'wsrep_connected'} eq 'ON' ? 'T' : 'F' ),
- &format_number( $status->{'wsrep_local_recv_queue'}, 0, 4 ),
- &format_number( &counter_per_second( 'wsrep_received' ), 1, 4 ),
- &format_memory( &counter_per_second( 'wsrep_received_bytes' ), 2, 4 ),
+ &format_number( $status->{'wsrep_local_send_queue'}, 0, 3 ),
+ &format_number( $status->{'wsrep_local_recv_queue'}, 0, 3 ),
+
+ &format_number( &counter_per_second( 'wsrep_replicated' ), 0, 3 ),
+ &format_number( &counter_per_second( 'wsrep_received' ), 0, 3 ),
+
+ &format_memory( &counter_per_second( 'wsrep_replicated_bytes' ), 1, 4 ),
+ &format_memory( &counter_per_second( 'wsrep_received_bytes' ), 1, 4 ),
+
+ &format_number( $status->{'wsrep_flow_control_paused'}, 1, 3 ),
+ &format_number( $status->{'wsrep_flow_control_sent'}, 0, 3 ),
+
+ &format_number( $status->{'wsrep_cert_deps_distance'}, 0, 3 ),
+
+ &format_number( &counter_per_second( 'wsrep_local_cert_failures' ), 0, 3 ),
+ &format_number( &counter_per_second( 'wsrep_local_bf_aborts' ), 0, 3 ),
+
);
}
Please sign in to comment.
Something went wrong with that request. Please try again.