在一個節點上啟動資源後,RGM 將在該節點上呼叫 Monitor_start 方法以啟動故障監視器。 xfnts_monitor_start 方法使用 scds_pmf_start() 來啟動 PMF 下的監視器常駐程式。
xfnts_monitor_start 的第一次呼叫是呼叫 scds_initialize(),它執行某些必需的事務性工作功能 (scds_initialize() 函式與 scds_initialize(3HA) 線上援助頁包含更多詳細資訊)。
xfnts_monitor_start 方法呼叫 mon_start 方法 (在 xfnts.c 中定義),如下所示。
scds_syslog_debug(DBG_LEVEL_HIGH, "Calling Monitor_start method for resource <%s>.", scds_get_resource_name(scds_handle)); /* Call scds_pmf_start and pass the name of the probe. */ err = scds_pmf_start(scds_handle, SCDS_PMF_TYPE_MON, SCDS_PMF_SINGLE_INSTANCE, "xfnts_probe", 0); if (err != SCHA_ERR_NOERR) { scds_syslog(LOG_ERR, "Failed to start fault monitor."); return (1); } scds_syslog(LOG_INFO, "Started the fault monitor."); return (SCHA_ERR_NOERR); /* Successfully started Monitor */ }
請注意下列關於 svc_mon_start() 呼叫 scds_pmf_start() 函式的內容。
SCDS_PMF_TYPE_MON 參數將要啟動的程式識別為故障監視器 — 此方法也可以啟動資料服務或某些其他類型的應用程式。
SCDS_PMF_SINGLE_INSTANCE 參數將其識別為單一實例資源。
xfnts_probe 參數識別要啟動的監視器常駐程式。 假定為監視器常駐程式與其他回呼程式位於同一目錄中。
最終參數 0 指定子監視層次 — 在此情況下,僅監視此監視器常駐程式。
在結束之前,xfnts_monitor_start 方法將呼叫 scds_close() 以回收 scds_initialize() 分配的資源。 請參閱scds_initialize() 函式與 scds_close(3HA) 線上說明手冊,以取得詳細資訊。