Sun Cluster 資料服務開發者指南 (適用於 Solaris 作業系統)

xfnts_monitor_start 方法

在一個節點上啟動資源後,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() 函式的內容。


註解 –

在結束之前,xfnts_monitor_start 方法將呼叫 scds_close() 以回收 scds_initialize() 分配的資源。 請參閱scds_initialize() 函式scds_close(3HA) 線上說明手冊,以取得詳細資訊。