Sun Cluster データサービス開発ガイド (Solaris OS 版)

xfnts_monitor_start メソッド

このメソッドは、xfnts_probe メソッドを起動します。


例 C–3 xfnts_monitor_start.c

/*
 * Copyright (c) 1998-2004 by Sun Microsystems, Inc.
 * All rights reserved.
 *
 * xfnts_monitor_stop.c - HA-XFS のモニター停止メソッド
 */

#pragma ident “@(#)xfnts_monitor_start.c 1.10 01/01/18
SMI”

#include <rgm/libdsdev.h>
#include “xfnts.h”

/*
 * このメソッドは、HA-XFS リソース用の障害モニターを停止する。
 * この処理は PMF 経由で行われる。障害モニター用の
 * PMF タグの形式は<RG-name_RS-name.mon> である。
 */

int
main(int argc, char *argv[])
{
   scds_handle_t   scds_handle;
   int   rc;

   /* RGM から渡された引数を処理して、syslog を初期化する。*/
   if (scds_initialize(&scds_handle, argc, argv) != SCHA_ERR_NOERR)
{
      scds_syslog(LOG_ERR, “Failed to initialize the handle.”);
      return (1);
   }

   rc = mon_start(scds_handle);

   /* scds_initialize が割り当てたすべてのメモリーを解放する。*/
   scds_close(&scds_handle);

   /* monitor_stop メソッドの結果を戻す。*/
   return (rc);
}