1
1

Add capability to notify system admins of potential problems in system communication networks and/or other system elements that are detected by Open MPI during operation. For example, failures in connections that may be indicative of connectivity problems can be reported to sys admins in addition to our current error message to the user, thus allowing more rapid correction of the problem.

This system is "off" by default and only operates upon specific directive for selection of a notifier component. At the moment, the only available component will write an error message to the syslog.

This commit was SVN r19209.
Этот коммит содержится в:
Ralph Castain 2008-08-06 21:59:21 +00:00
родитель d7da6b3226
Коммит c9e53fd0d4
16 изменённых файлов: 773 добавлений и 0 удалений

Просмотреть файл

@ -48,6 +48,7 @@
#include "orte/util/session_dir.h"
#include "orte/util/name_fns.h"
#include "orte/util/show_help.h"
#include "orte/mca/notifier/base/base.h"
#include "orte/runtime/orte_cr.h"
#include "orte/runtime/orte_globals.h"
@ -200,6 +201,18 @@ int orte_ess_base_app_setup(void)
goto error;
}
/* setup the notifier system */
if (ORTE_SUCCESS != (ret = orte_notifier_base_open())) {
ORTE_ERROR_LOG(ret);
error = "orte_notifer_open";
goto error;
}
if (ORTE_SUCCESS != (ret = orte_notifier_base_select())) {
ORTE_ERROR_LOG(ret);
error = "orte_notifer_select";
goto error;
}
return ORTE_SUCCESS;
error:
@ -212,6 +225,8 @@ error:
int orte_ess_base_app_finalize(void)
{
orte_notifier_base_close();
orte_cr_finalize();
#if OPAL_ENABLE_FT == 1

Просмотреть файл

@ -50,6 +50,7 @@
#include "orte/util/session_dir.h"
#include "orte/util/name_fns.h"
#include "orte/util/show_help.h"
#include "orte/mca/notifier/base/base.h"
#include "orte/runtime/orte_cr.h"
#include "orte/runtime/orte_wait.h"
@ -218,6 +219,18 @@ int orte_ess_base_orted_setup(void)
goto error;
}
/* setup the notifier system */
if (ORTE_SUCCESS != (ret = orte_notifier_base_open())) {
ORTE_ERROR_LOG(ret);
error = "orte_notifer_open";
goto error;
}
if (ORTE_SUCCESS != (ret = orte_notifier_base_select())) {
ORTE_ERROR_LOG(ret);
error = "orte_notifer_select";
goto error;
}
return ORTE_SUCCESS;
error:
@ -247,6 +260,8 @@ int orte_ess_base_orted_finalize(void)
/* progress the OOB to ensure the message gets out */
opal_progress();
orte_notifier_base_close();
orte_cr_finalize();
#if OPAL_ENABLE_FT == 1

Просмотреть файл

@ -47,6 +47,7 @@
#include "orte/mca/ras/base/base.h"
#include "orte/mca/plm/base/base.h"
#include "orte/mca/odls/base/base.h"
#include "orte/mca/notifier/base/base.h"
#include "orte/mca/rmaps/base/base.h"
#if OPAL_ENABLE_FT == 1
@ -397,6 +398,18 @@ static int rte_init(char flags)
goto error;
}
/* setup the notifier system */
if (ORTE_SUCCESS != (ret = orte_notifier_base_open())) {
ORTE_ERROR_LOG(ret);
error = "orte_notifer_open";
goto error;
}
if (ORTE_SUCCESS != (ret = orte_notifier_base_select())) {
ORTE_ERROR_LOG(ret);
error = "orte_notifer_select";
goto error;
}
return ORTE_SUCCESS;
error:
@ -419,6 +432,8 @@ static int rte_finalize(void)
unlink(contact_path);
free(contact_path);
orte_notifier_base_close();
orte_cr_finalize();
#if OPAL_ENABLE_FT == 1

42
orte/mca/notifier/Makefile.am Обычный файл
Просмотреть файл

@ -0,0 +1,42 @@
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# main library setup
noinst_LTLIBRARIES = libmca_notifier.la
libmca_notifier_la_SOURCES =
# header setup
nobase_orte_HEADERS =
# local files
headers = notifier.h
libmca_notifier_la_SOURCES += $(headers)
# Conditionally install the header files
if WANT_INSTALL_HEADERS
nobase_orte_HEADERS += $(headers)
ortedir = $(includedir)/openmpi/orte/mca/notifier
else
ortedir = $(includedir)
endif
include base/Makefile.am
distclean-local:
rm -f base/static-components.h

25
orte/mca/notifier/base/Makefile.am Обычный файл
Просмотреть файл

@ -0,0 +1,25 @@
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
headers += \
base/base.h
libmca_notifier_la_SOURCES += \
base/notifier_base_close.c \
base/notifier_base_select.c \
base/notifier_base_open.c

63
orte/mca/notifier/base/base.h Обычный файл
Просмотреть файл

@ -0,0 +1,63 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/** @file:
*/
#ifndef MCA_NOTIFIER_BASE_H
#define MCA_NOTIFIER_BASE_H
/*
* includes
*/
#include "orte_config.h"
#include "opal/class/opal_list.h"
#include "opal/mca/mca.h"
#include "orte/mca/notifier/notifier.h"
/*
* Global functions for MCA overall collective open and close
*/
BEGIN_C_DECLS
/*
* function definitions
*/
ORTE_DECLSPEC int orte_notifier_base_open(void);
ORTE_DECLSPEC int orte_notifier_base_select(void);
ORTE_DECLSPEC int orte_notifier_base_close(void);
/*
* globals that might be needed
*/
ORTE_DECLSPEC extern int orte_notifier_base_output;
ORTE_DECLSPEC extern bool mca_notifier_base_selected;
ORTE_DECLSPEC extern opal_list_t mca_notifier_base_components_available;
ORTE_DECLSPEC extern orte_notifier_base_component_t mca_notifier_base_selected_component;
#if !ORTE_DISABLE_FULL_SUPPORT
/* no base functions to protect at this time */
#endif /* ORTE_DISABLE_FULL_SUPPORT */
END_C_DECLS
#endif

Просмотреть файл

@ -0,0 +1,45 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "orte_config.h"
#include <stdio.h>
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"
#include "orte/mca/notifier/base/base.h"
int orte_notifier_base_close(void)
{
/* If we have a selected component and module, then finalize it */
if (NULL != orte_notifier.finalize) {
orte_notifier.finalize();
}
/* Close all remaining available components (may be one if this is a
OpenRTE program, or [possibly] multiple if this is ompi_info) */
mca_base_components_close(orte_notifier_base_output,
&mca_notifier_base_components_available, NULL);
/* All done */
return ORTE_SUCCESS;
}

84
orte/mca/notifier/base/notifier_base_open.c Обычный файл
Просмотреть файл

@ -0,0 +1,84 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "orte_config.h"
#include "orte/constants.h"
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"
#include "opal/mca/base/mca_base_param.h"
#include "orte/util/show_help.h"
#include "orte/mca/notifier/base/base.h"
/*
* The following file was created by configure. It contains extern
* statements and the definition of an array of pointers to each
* component's public mca_base_component_t struct.
*/
#include "orte/mca/notifier/base/static-components.h"
static void orte_base_log(int priority, const char *msg, ...);
/*
* Global variables
*/
int orte_notifier_base_output = -1;
orte_notifier_base_module_t orte_notifier = {
NULL,
NULL,
orte_base_log
};
opal_list_t mca_notifier_base_components_available;
orte_notifier_base_component_t mca_notifier_base_selected_component;
/**
* Function for finding and opening either all MCA components, or the one
* that was specifically requested via a MCA parameter.
*/
int orte_notifier_base_open(void)
{
/* Debugging / verbose output. Always have stream open, with
verbose set by the mca open system... */
orte_notifier_base_output = opal_output_open(NULL);
/* Open up all available components */
if (ORTE_SUCCESS !=
mca_base_components_open("notifier", orte_notifier_base_output,
mca_notifier_base_static_components,
&mca_notifier_base_components_available, true)) {
return ORTE_ERROR;
}
/* All done */
return ORTE_SUCCESS;
}
static void orte_base_log(int priority, const char *msg, ...)
{
/* just do nothing - it is here just so
* someone calling it won't segv
*/
}

Просмотреть файл

@ -0,0 +1,85 @@
/*
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "orte_config.h"
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"
#include "orte/mca/notifier/base/base.h"
/**
* Function for selecting one component from all those that are
* available.
*/
int orte_notifier_base_select(void)
{
int ret, exit_status = ORTE_SUCCESS;
orte_notifier_base_component_t *best_component = NULL;
orte_notifier_base_module_t *best_module = NULL;
char *include_list = NULL;
/*
* Register the framework MCA param and look up include list
*/
mca_base_param_reg_string_name("notifier", NULL,
"Which notifier component to use (empty = none)",
false, false,
NULL, &include_list);
/* If we do not have any components to select this is ok. Just use the default
* "no-op" component and move on.
*/
if( 0 >= opal_list_get_size(&mca_notifier_base_components_available) || NULL == include_list) {
/* Close all components since none will be used */
mca_base_components_close(0, /* Pass 0 to keep this from closing the output handle */
&mca_notifier_base_components_available,
NULL);
goto cleanup;
}
/*
* Select the best component
*/
if( OPAL_SUCCESS != mca_base_select("notifier", orte_notifier_base_output,
&mca_notifier_base_components_available,
(mca_base_module_t **) &best_module,
(mca_base_component_t **) &best_component) ) {
/* It is okay if no component was selected - we just leave
* the orte_notifier module as the default
*/
exit_status = ORTE_SUCCESS;
goto cleanup;
}
/* Save the winner */
orte_notifier = *best_module;
if (NULL != orte_notifier.init) {
/* if an init function is provided, use it */
if (ORTE_SUCCESS != (ret = orte_notifier.init()) ) {
exit_status = ret;
goto cleanup;
}
}
cleanup:
return exit_status;
}

98
orte/mca/notifier/notifier.h Обычный файл
Просмотреть файл

@ -0,0 +1,98 @@
/*
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/** @file:
*
* The OpenRTE Notifier Framework
*
* The OpenRTE Notifier framework provides a mechanism for notifying
* system administrators or other fault monitoring systems that a
* problem with the underlying cluster has been detected - e.g., a
* failed connection in a network fabric
*/
#ifndef MCA_NOTIFIER_H
#define MCA_NOTIFIER_H
/*
* includes
*/
#include "orte_config.h"
#include "orte/constants.h"
#include "orte/types.h"
#include <syslog.h>
#include <stdarg.h>
#include "opal/mca/mca.h"
BEGIN_C_DECLS
/*
* Component functions - all MUST be provided!
*/
/* initialize the selected module */
typedef int (*orte_notifier_base_module_init_fn_t)(void);
/* finalize the selected module */
typedef void (*orte_notifier_base_module_finalize_fn_t)(void);
/* Log a failure message */
typedef void (*orte_notifier_base_module_log_fn_t)(int priority, const char *message, ...);
/*
* Ver 1.0
*/
struct orte_notifier_base_module_1_0_0_t {
orte_notifier_base_module_init_fn_t init;
orte_notifier_base_module_finalize_fn_t finalize;
orte_notifier_base_module_log_fn_t log;
};
typedef struct orte_notifier_base_module_1_0_0_t orte_notifier_base_module_1_0_0_t;
typedef orte_notifier_base_module_1_0_0_t orte_notifier_base_module_t;
/*
* the standard component data structure
*/
struct orte_notifier_base_component_1_0_0_t {
mca_base_component_t base_version;
mca_base_component_data_t base_data;
};
typedef struct orte_notifier_base_component_1_0_0_t orte_notifier_base_component_1_0_0_t;
typedef orte_notifier_base_component_1_0_0_t orte_notifier_base_component_t;
/*
* Macro for use in components that are of type notifier v1.0.0
*/
#define ORTE_NOTIFIER_BASE_VERSION_1_0_0 \
/* notifier v1.0 is chained to MCA v2.0 */ \
MCA_BASE_VERSION_2_0_0, \
/* notifier v1.0 */ \
"notifier", 1, 0, 0
/* Global structure for accessing notifier functions
*/
ORTE_DECLSPEC extern orte_notifier_base_module_t orte_notifier; /* holds selected module's function pointers */
END_C_DECLS
#endif /* MCA_NOTIFIER_H */

43
orte/mca/notifier/syslog/Makefile.am Обычный файл
Просмотреть файл

@ -0,0 +1,43 @@
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
sources = \
notifier_syslog.h \
notifier_syslog_module.c \
notifier_syslog_component.c
# Make the output library in this directory, and name it either
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
# (for static builds).
if OMPI_BUILD_notifier_syslog_DSO
component_noinst =
component_install = mca_notifier_syslog.la
else
component_noinst = libmca_notifier_syslog.la
component_install =
endif
mcacomponentdir = $(pkglibdir)
mcacomponent_LTLIBRARIES = $(component_install)
mca_notifier_syslog_la_SOURCES = $(sources)
mca_notifier_syslog_la_LDFLAGS = -module -avoid-version
noinst_LTLIBRARIES = $(component_noinst)
libmca_notifier_syslog_la_SOURCES =$(sources)
libmca_notifier_syslog_la_LDFLAGS = -module -avoid-version

13
orte/mca/notifier/syslog/configure.m4 Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
# -*- shell-script -*-
#
# Copyright (c) 2007 Sandia National Laboratories. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# MCA_notifier_syslog_CONFIG([action-if-found], [action-if-not-found])
# -----------------------------------------------------------
AC_DEFUN([MCA_notifier_syslog_CONFIG], [$1])

24
orte/mca/notifier/syslog/configure.params Обычный файл
Просмотреть файл

@ -0,0 +1,24 @@
# -*- shell-script -*-
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2007 Los Alamos National Security, LLC. All rights
# reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Specific to this module
PARAM_CONFIG_FILES="Makefile"

47
orte/mca/notifier/syslog/notifier_syslog.h Обычный файл
Просмотреть файл

@ -0,0 +1,47 @@
/* -*- C -*-
*
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
*/
#ifndef NOTIFIER_SYSLOG_H
#define NOTIFIER_SYSLOG_H
#include "orte_config.h"
#include "orte/types.h"
#include "orte/mca/notifier/notifier.h"
BEGIN_C_DECLS
/*
* Component open / close
*/
int orte_notifier_syslog_open(void);
int orte_notifier_syslog_close(void);
int orte_notifier_syslog_component_query(mca_base_module_t **module, int *priority);
/*
* Grpcomm interfaces
*/
ORTE_MODULE_DECLSPEC extern orte_notifier_base_component_t mca_notifier_syslog_component;
extern orte_notifier_base_module_t orte_notifier_syslog_module;
END_C_DECLS
#endif

Просмотреть файл

@ -0,0 +1,69 @@
/* -*- C -*-
*
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/** @file:
*
*/
/*
* includes
*/
#include "orte_config.h"
#include "orte/constants.h"
#include "notifier_syslog.h"
/*
* Struct of function pointers that need to be initialized
*/
orte_notifier_base_component_t mca_notifier_syslog_component = {
{
ORTE_NOTIFIER_BASE_VERSION_1_0_0,
"syslog", /* MCA module name */
ORTE_MAJOR_VERSION, /* MCA module major version */
ORTE_MINOR_VERSION, /* MCA module minor version */
ORTE_RELEASE_VERSION, /* MCA module release version */
orte_notifier_syslog_open, /* module open */
orte_notifier_syslog_close, /* module close */
orte_notifier_syslog_component_query /* module query */
},
{
/* The component is checkpoint ready */
MCA_BASE_METADATA_PARAM_CHECKPOINT
}
};
/* Open the component */
int orte_notifier_syslog_open(void)
{
return ORTE_SUCCESS;
}
int orte_notifier_syslog_close(void)
{
return ORTE_SUCCESS;
}
int orte_notifier_syslog_component_query(mca_base_module_t **module, int *priority)
{
/* we are a lower-level default, so set a low priority so we can be overridden */
*priority = 1;
*module = (mca_base_module_t *)&orte_notifier_syslog_module;
return ORTE_SUCCESS;
}

Просмотреть файл

@ -0,0 +1,90 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "orte_config.h"
#include "orte/constants.h"
#include "orte/types.h"
#include <string.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif /* HAVE_SYS_TIME_H */
#ifdef HAVE_SYSLOG_H
#include <syslog.h>
#endif
#ifdef HAVE_STDARG_H
#include <stdarg.h>
#endif
#include "opal/threads/condition.h"
#include "opal/util/bit_ops.h"
#include "opal/class/opal_hash_table.h"
#include "opal/dss/dss.h"
#include "orte/mca/errmgr/errmgr.h"
#include "orte/mca/ess/ess.h"
#include "orte/mca/odls/odls_types.h"
#include "orte/mca/rml/rml.h"
#include "orte/util/name_fns.h"
#include "orte/util/show_help.h"
#include "orte/util/proc_info.h"
#include "orte/orted/orted.h"
#include "orte/runtime/orte_wait.h"
#include "orte/runtime/orte_globals.h"
#include "orte/mca/notifier/base/base.h"
#include "notifier_syslog.h"
/* Static API's */
static int init(void);
static void finalize(void);
static void mylog(int priority, const char *msg, ...);
/* Module def */
orte_notifier_base_module_t orte_notifier_syslog_module = {
init,
finalize,
mylog
};
static int init(void) {
int opts;
opts = LOG_CONS | LOG_PID | LOG_SYSLOG;
openlog("OpenMPI Error Report:", opts, LOG_USER);
return ORTE_SUCCESS;
}
static void finalize(void) {
closelog();
}
static void mylog(int priority, const char *msg, ...)
{
va_list arglist;
/* If there was a message, output it */
va_start(arglist, msg);
vsyslog(priority, msg, arglist);
va_end(arglist);
}