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) 線上手冊包含更多資訊。