You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"status", 1, 0, 'S', "Display the status of the specified node." },
72
74
{"-spacer-", 1, 0, '-', "\n\tResult is the node's internal FSM state which can be useful for debugging\n"},
75
+
{"pacemakerd",0, 0, 'P', "Display the status of local pacemakerd."},
76
+
{"-spacer-", 1, 0, '-', "\n\tResult is the state of the sub-daemons watched by pacemakerd\n"},
73
77
{"dc_lookup", 0, 0, 'D', "Display the uname of the node co-ordinating the cluster."},
74
78
{"-spacer-", 1, 0, '-', "\n\tThis is an internal detail and is rarely useful to administrators except when deciding on which node to examine the logs.\n"},
75
79
{"nodes", 0, 0, 'N', "\tDisplay the uname of all member nodes"},
@@ -142,6 +146,9 @@ main(int argc, char **argv)
142
146
case'q':
143
147
BE_SILENT= TRUE;
144
148
break;
149
+
case'P':
150
+
DO_PACEMAKERD_HEALTH= TRUE;
151
+
break;
145
152
case'S':
146
153
DO_HEALTH= TRUE;
147
154
crm_trace("Option %c => %s", flag, optarg);
@@ -215,19 +222,26 @@ do_work(void)
215
222
xmlNode*msg_data=NULL;
216
223
gbooleanall_is_good= TRUE;
217
224
218
-
if (DO_HEALTH== TRUE) {
225
+
if ((DO_HEALTH== TRUE) || (DO_PACEMAKERD_HEALTH== TRUE)) {
219
226
crm_trace("Querying the system");
220
227
221
228
sys_to=CRM_SYSTEM_DC;
222
229
223
-
if (dest_node!=NULL) {
230
+
if ((DO_HEALTH== TRUE) && (dest_node!=NULL)) {
224
231
sys_to=CRM_SYSTEM_CRMD;
225
232
crmd_operation=CRM_OP_PING;
226
233
227
234
if (BE_VERBOSE) {
228
235
expected_responses=1;
229
236
}
230
237
238
+
} elseif (DO_PACEMAKERD_HEALTH== TRUE) {
239
+
sys_to=CRM_SYSTEM_MCP;
240
+
crmd_operation=CRM_OP_PING;
241
+
242
+
if (BE_VERBOSE) {
243
+
expected_responses=1;
244
+
}
231
245
} else {
232
246
crm_info("Cluster-wide health not available yet");
233
247
all_is_good= FALSE;
@@ -286,7 +300,7 @@ do_work(void)
286
300
}
287
301
288
302
/* send it */
289
-
if (crmd_channel==NULL) {
303
+
if ((DO_PACEMAKERD_HEALTH?pacemakerd_channel:crmd_channel)==NULL) {
290
304
crm_err("The IPC connection is not valid, cannot send anything");
0 commit comments