Sun Cluster 数据服务开发者指南(适用于 Solaris OS)

xfnts_update 方法

RGM 将调用 Update 方法以通知正在运行的资源其属性已更改。唯一可为 xfnts 数据服务更改的属性与故障监视器有关。因此,只要更新了属性,xfnts_update 方法就将调用 scds_pmf_restart_fm() 以重新启动故障监视器。

  /* check if the Fault monitor is already running and if so stop
   * and restart it. The second parameter to scds_pmf_restart_fm()
   * uniquely identifies the instance of the fault monitor that needs
   * to be restarted.
   */

   scds_syslog(LOG_INFO, "Restarting the fault monitor.");
   result = scds_pmf_restart_fm(scds_handle, 0);
   if (result != SCHA_ERR_NOERR) {
      scds_syslog(LOG_ERR,
          "Failed to restart fault monitor.");
      /* Free up all the memory allocated by scds_initialize */
      scds_close(&scds_handle);
      return (1);
   }

   scds_syslog(LOG_INFO,
   "Completed successfully.");

注 –

如果故障监视器有多个实例,则 scds_pmf_restart_fm() 的第二个参数将唯一标识要被重新启动的故障监视器实例。示例中的值 0 用于指明故障监视器只有一个实例。