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