Author: tedross
Date: 2008-11-19 11:40:42 -0500 (Wed, 19 Nov 2008)
New Revision: 2843
Added:
mgmt/trunk/mace/
mgmt/trunk/mace/cpp/
mgmt/trunk/mace/cpp/COPYING
mgmt/trunk/mace/cpp/Makefile.am
mgmt/trunk/mace/cpp/README
mgmt/trunk/mace/cpp/bootstrap
mgmt/trunk/mace/cpp/build-aux/
mgmt/trunk/mace/cpp/configure.ac
mgmt/trunk/mace/cpp/etc/
mgmt/trunk/mace/cpp/etc/mace.conf
mgmt/trunk/mace/cpp/m4/
mgmt/trunk/mace/cpp/m4/clock_time.m4
mgmt/trunk/mace/cpp/m4/compiler-flags.m4
mgmt/trunk/mace/cpp/m4/cppunit.m4
mgmt/trunk/mace/cpp/m4/extensions.m4
mgmt/trunk/mace/cpp/src/
mgmt/trunk/mace/cpp/src/GridSim.cpp
mgmt/trunk/mace/cpp/src/Makefile.am
mgmt/trunk/mace/cpp/src/qmfgen/
mgmt/trunk/mace/cpp/src/qmfgen/Makefile.am
mgmt/trunk/mace/cpp/src/qmfgen/condor-management-schema.xml
mgmt/trunk/mace/cpp/src/qmfgen/mace.xml
mgmt/trunk/mace/cpp/src/qmfgen/sesame.xml
Log:
mace - grid simulation
Added: mgmt/trunk/mace/cpp/COPYING
===================================================================
--- mgmt/trunk/mace/cpp/COPYING (rev 0)
+++ mgmt/trunk/mace/cpp/COPYING 2008-11-19 16:40:42 UTC (rev 2843)
@@ -0,0 +1,15 @@
+Copyright (C) 2007 Red Hat Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Added: mgmt/trunk/mace/cpp/Makefile.am
===================================================================
--- mgmt/trunk/mace/cpp/Makefile.am (rev 0)
+++ mgmt/trunk/mace/cpp/Makefile.am 2008-11-19 16:40:42 UTC (rev 2843)
@@ -0,0 +1,14 @@
+AUTOMAKE_OPTIONS = 1.9.6 foreign
+ACLOCAL_AMFLAGS = -I m4
+
+
+EXTRA_DIST = README etc/mace.conf
+
+sysconf_DATA = etc/mace.conf
+
+SUBDIRS = src
+
+# Update libtool, if needed.
+libtool: $(LIBTOOL_DEPS)
+ $(SHELL) ./config.status --recheck
+
Added: mgmt/trunk/mace/cpp/README
===================================================================
--- mgmt/trunk/mace/cpp/README (rev 0)
+++ mgmt/trunk/mace/cpp/README 2008-11-19 16:40:42 UTC (rev 2843)
@@ -0,0 +1,16 @@
+sesame - A System agent for the Qpid Management Framework
+
+Pre-requisites:
+
+ Apache Qpid - You will need either the source tree for Qpid or and
+ installed copy of Qpid. The version must be M4 or later.
+
+
https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid
+
+ Alternatively, you can install the qmf-devel RPM and its dependencies.
+
+
+To use a checkout ./configure --with-qpid-checkout=<path_to_qpid>
+
+* 'make' will build the module
+
Added: mgmt/trunk/mace/cpp/bootstrap
===================================================================
--- mgmt/trunk/mace/cpp/bootstrap (rev 0)
+++ mgmt/trunk/mace/cpp/bootstrap 2008-11-19 16:40:42 UTC (rev 2843)
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+# Copyright (C) 2007, 2008 Red Hat Inc.
+#
+# This file is part of Red Hat Messaging.
+#
+# Red Hat Messaging is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+#
+# The GNU Lesser General Public License is available in the file COPYING.
+
+set -e
+aclocal -I m4
+autoheader
+libtoolize --automake
+
+# Create initial Makefile fragments that will force make to generate
+# the real ones.
+cat > src/qmfgen/qmfgen.mk <<EOF
+\$(top_srcdir)/src/qmfgen/qmfgen.mk: force
+ \$(qmfgen_cmd)
+EOF
+
+automake --add-missing
+autoconf
Property changes on: mgmt/trunk/mace/cpp/bootstrap
___________________________________________________________________
Name: svn:executable
+ *
Added: mgmt/trunk/mace/cpp/configure.ac
===================================================================
--- mgmt/trunk/mace/cpp/configure.ac (rev 0)
+++ mgmt/trunk/mace/cpp/configure.ac 2008-11-19 16:40:42 UTC (rev 2843)
@@ -0,0 +1,189 @@
+dnl # Copyright (C) 2007, 2008 Red Hat Inc.
+dnl #
+dnl # This file is part of Red Hat Messaging.
+dnl #
+dnl # Red Hat Messaging is free software; you can redistribute it and/or
+dnl # modify it under the terms of the GNU Lesser General Public
+dnl # License as published by the Free Software Foundation; either
+dnl # version 2.1 of the License, or (at your option) any later version.
+dnl #
+dnl # This library is distributed in the hope that it will be useful,
+dnl # but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl # Lesser General Public License for more details.
+dnl #
+dnl # You should have received a copy of the GNU Lesser General Public
+dnl # License along with this library; if not, write to the Free Software
+dnl # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+dnl # USA
+dnl #
+dnl # The GNU Lesser General Public License is available in the file COPYING.
+dnl
+dnl Process this file with autoconf to produce a configure script.
+
+AC_INIT([mace], [0.1], [rhemrg-users-list(a)redhat.com])
+AC_CONFIG_AUX_DIR([build-aux])
+AM_INIT_AUTOMAKE([dist-bzip2 subdir-objects])
+
+# Minimum Autoconf version required.
+AC_PREREQ(2.59)
+
+AC_CONFIG_HEADERS([src/config.h])
+AC_CONFIG_SRCDIR([src/GridSim.cpp])
+
+AC_PROG_CC_STDC
+AM_PROG_CC_C_O
+AC_PROG_CXX
+AC_USE_SYSTEM_EXTENSIONS
+AC_LANG([C++])
+
+AC_ARG_ENABLE(warnings,
+[ --enable-warnings turn on lots of compiler warnings (recommended)],
+[case "${enableval}" in
+ yes|no) ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for warnings option]) ;;
+ esac],
+ [enableval=yes])
+
+# Warnings: Enable as many as possible, keep the code clean. Please
+# do not disable warnings or remove -Werror without discussing on
+# rhm-users list.
+#
+# The following warnings are deliberately omitted, they warn on valid code.
+# -Wunreachable-code -Wpadded -Winline
+# -Wshadow - warns about boost headers.
+
+if test "${enableval}" = yes; then
+ gl_COMPILER_FLAGS(-Werror)
+ gl_COMPILER_FLAGS(-pedantic)
+ gl_COMPILER_FLAGS(-Wall)
+ gl_COMPILER_FLAGS(-Wextra)
+ gl_COMPILER_FLAGS(-Wno-shadow)
+ gl_COMPILER_FLAGS(-Wpointer-arith)
+ gl_COMPILER_FLAGS(-Wcast-qual)
+ gl_COMPILER_FLAGS(-Wcast-align)
+ gl_COMPILER_FLAGS(-Wno-long-long)
+ gl_COMPILER_FLAGS(-Wvolatile-register-var)
+ gl_COMPILER_FLAGS(-Winvalid-pch)
+ gl_COMPILER_FLAGS(-Wno-system-headers)
+ AC_SUBST([WARNING_CFLAGS], [$COMPILER_FLAGS])
+ AC_DEFINE([lint], 1, [Define to 1 if the compiler is checking for lint.])
+ COMPILER_FLAGS=
+fi
+
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
+AC_SUBST([LIBTOOL_DEPS])
+
+# Select building against qpid checkout or install.
+AC_ARG_WITH([qpid-checkout],
+ [AS_HELP_STRING([--with-qpid-checkout],
+ [Location of qpid checkout to build against (by default use installed qpid)])])
+
+if test x$with_qpid_checkout != x; then
+ QPID_DIR=$with_qpid_checkout
+ QPID_SRC=$QPID_DIR/cpp/src
+ QMF_GEN=$QPID_DIR/cpp/managementgen/qmf-gen
+ test -f $QPID_SRC/qpid/agent/ManagementAgent.h || \
+ AC_MSG_ERROR([$QPID_DIR does not appear to be a valid qpid checkout.])
+ QPID_LIBS="$QPID_SRC/libqmfagent.la"
+ QPID_CXXFLAGS="-I$QPID_SRC -I${QPID_SRC}/gen"
+else
+ fail=0
+ AC_CHECK_PROG([QMF_GEN], [qmf-gen], [qmf-gen], [no])
+ test $QMF_GEN = no &&
+ AC_MSG_ERROR([Missing required qmf-gen. Install package qmf-devel or use
--with-qpid-checkout])
+
+ AC_CHECK_HEADERS([qpid/agent/ManagementAgent.h], , [fail=1])
+ # Give any/all diagnostics before failing.
+ test $fail = 1 &&
+ AC_MSG_ERROR([Missing required qpid libraries/headers. Install package qmf-devel or
use --with-qpid-checkout])
+ QPID_LIBS="-lqmfagent"
+fi
+AC_SUBST([QMF_GEN])
+AC_SUBST([QPID_DIR])
+AC_SUBST([QPID_LIBS])
+AC_SUBST([QPID_CXXFLAGS])
+
+# For libraries (libcommon) that use dlopen, dlerror, etc.,
+# test whether we need to link with -ldl.
+gl_saved_libs=$LIBS
+AC_SEARCH_LIBS(dlopen, [dl],
+ [test "$ac_cv_search_dlopen" = "none required" ||
+ LIB_DLOPEN=$ac_cv_search_dlopen])
+AC_SUBST([LIB_DLOPEN])
+LIBS=$gl_saved_libs
+
+# Require libdb_cxx (any version between 4.2 and 4.7), for the library, and for
db_cxx.h.
+db4_devel_fail=0
+AC_CHECK_HEADER([db_cxx.h], ,[db4_devel_fail=1])
+test $db4_devel_fail == 1 && \
+ AC_MSG_ERROR([db4-devel package missing. Please ensure both db4 and db4-devel are
installed. (hint: "yum install db4-devel" should do it...)])
+
+gl_saved_libs=$LIBS
+AC_SEARCH_LIBS([__db_open], [db_cxx-4.7 db_cxx-4.6 db_cxx-4.5 db_cxx-4.4 db_cxx-4.3
db_cxx-4.2],
+ [test "$ac_cv_search___db_open" = "none required" ||
+ LIB_BERKELEY_DB=$ac_cv_search___db_open],
+ AC_MSG_ERROR([Couldn't find required library in range db_cxx-4.2 through
db_cxx-4.6]))
+AC_SUBST([LIB_BERKELEY_DB])
+LIBS=$gl_saved_libs
+
+# Determine how to include db_cxx.h:
+# Red Hat needs <db4/db_cxx.h>, Debian needs <db_cxx.h>.
+AC_CHECK_HEADER([db4/db_cxx.h],
+ [DB_CXX_HEADER_PREFIX=db4/])
+if test x$DB_CXX_HEADER_PREFIX = x; then
+ AC_CHECK_HEADER([db_cxx.h],
+ [DB_CXX_HEADER_PREFIX=])
+fi
+AC_SUBST(DB_CXX_HEADER_PREFIX)
+
+# Set the argument to be used in "libtool -version-info ARG".
+QPID_CURRENT=1
+QPID_REVISION=0
+QPID_AGE=1
+LIBTOOL_VERSION_INFO_ARG=$QPID_CURRENT:$QPID_REVISION:$QPID_AGE
+AC_SUBST(LIBTOOL_VERSION_INFO_ARG)
+
+gl_CLOCK_TIME
+
+AC_ARG_ENABLE([apr-platform],
+ [AS_HELP_STRING([--enable-apr-platform],
+ [use the Apache Portable Runtime library for platform (default no)])],
+ [case $enableval in
+ yes|no) enable_APR_PLATFORM=$enableval;;
+ *) AC_MSG_ERROR([Invalid value for --enable-apr-platform: $enableval]);;
+ esac],
+ [enable_APR_PLATFORM=no]
+)
+AM_CONDITIONAL([USE_APR_PLATFORM], [test x$enable_APR_PLATFORM = xyes])
+
+APR_MINIMUM_VERSION=1.2.2
+AC_SUBST(APR_MINIMUM_VERSION)
+AC_SUBST(APR_CXXFLAGS)
+AC_SUBST(USE_APR_PLATFORM)
+
+if test x$enable_APR_PLATFORM = xyes; then
+ PKG_CHECK_MODULES([APR], [apr-1 >= $APR_MINIMUM_VERSION])
+ APR_CXXFLAGS="$APR_CFLAGS -DUSE_APR_PLATFORM=1"
+ USE_APR_PLATFORM=1
+fi
+
+# We use valgrind for the tests. See if it's available.
+AC_CHECK_PROG([VALGRIND], [valgrind], [valgrind])
+
+# If rpmlint is available we'll run it when building RPMs.
+AC_CHECK_PROG([RPMLINT], [rpmlint], [rpmlint])
+AM_CONDITIONAL([HAS_RPMLINT], [test -n "$RPMLINT"])
+
+# Also doxygen for documentation...
+AC_CHECK_PROG([do_doxygen], [doxygen], [yes])
+AM_CONDITIONAL([DOXYGEN], [test x$do_doxygen = xyes])
+
+AC_CONFIG_FILES([
+ Makefile
+ src/Makefile
+ src/qmfgen/Makefile
+ ])
+
+AC_OUTPUT
Added: mgmt/trunk/mace/cpp/etc/mace.conf
===================================================================
--- mgmt/trunk/mace/cpp/etc/mace.conf (rev 0)
+++ mgmt/trunk/mace/cpp/etc/mace.conf 2008-11-19 16:40:42 UTC (rev 2843)
@@ -0,0 +1,45 @@
+##
+## sesame configuration
+##
+
+##===================
+## Broker Connection
+##===================
+
+##
+## Set the host and port of the broker that this agent shall attempt to
+## connect to. The port will default to the appropriate value based on the
+## protocol.
+##
+## For proto=tcp, the default port is 5672
+## proto=ssl, 5671
+## proto=rdma, 5672
+##
+#host=localhost
+#proto=tcp
+#port=5672
+
+##======================
+## Agent Authentication
+##======================
+
+##
+## Set the SASL mechanism (PLAIN by default), and the username and password
+## to be used when authenticating to the broker. If you wish to not store
+## the password in this configuration file, you may use pwd-file to point
+## to an access-restricted file containing the password.
+##
+#mech=PLAIN
+#uid=guest
+#pwd=guest
+#pwd-file=/etc/sesame/password
+
+##==============
+## Data Storage
+##==============
+
+##
+## Set the path to the directory where sesame will store persistent data.
+##
+#state-dir=/var/sesame
+
Added: mgmt/trunk/mace/cpp/m4/clock_time.m4
===================================================================
--- mgmt/trunk/mace/cpp/m4/clock_time.m4 (rev 0)
+++ mgmt/trunk/mace/cpp/m4/clock_time.m4 2008-11-19 16:40:42 UTC (rev 2843)
@@ -0,0 +1,30 @@
+# clock_time.m4 serial 8
+dnl Copyright (C) 2002-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Check for clock_gettime and clock_settime, and set LIB_CLOCK_GETTIME.
+# For a program named, say foo, you should add a line like the following
+# in the corresponding Makefile.am file:
+# foo_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
+
+AC_DEFUN([gl_CLOCK_TIME],
+[
+ dnl Persuade glibc and Solaris <time.h> to declare these functions.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+ # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
+ # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
+
+ # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
+ # programs in the package would end up linked with that potentially-shared
+ # library, inducing unnecessary run-time overhead.
+ gl_saved_libs=$LIBS
+ AC_SEARCH_LIBS(clock_gettime, [rt posix4],
+ [test "$ac_cv_search_clock_gettime" = "none
required" ||
+ LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
+ AC_SUBST([LIB_CLOCK_GETTIME])
+ AC_CHECK_FUNCS(clock_gettime clock_settime)
+ LIBS=$gl_saved_libs
+])
Added: mgmt/trunk/mace/cpp/m4/compiler-flags.m4
===================================================================
--- mgmt/trunk/mace/cpp/m4/compiler-flags.m4 (rev 0)
+++ mgmt/trunk/mace/cpp/m4/compiler-flags.m4 2008-11-19 16:40:42 UTC (rev 2843)
@@ -0,0 +1,23 @@
+# serial 3
+# Find valid warning flags for the C Compiler. -*-Autoconf-*-
+dnl Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl Written by Jesse Thilo.
+
+AC_DEFUN([gl_COMPILER_FLAGS],
+ [AC_MSG_CHECKING(whether compiler accepts $1)
+ AC_SUBST(COMPILER_FLAGS)
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $1"
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS $1"
+ AC_TRY_COMPILE(,
+ [int x;],
+ COMPILER_FLAGS="$COMPILER_FLAGS $1"
+ AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no))
+ CFLAGS="$ac_save_CFLAGS"
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ ])
Added: mgmt/trunk/mace/cpp/m4/cppunit.m4
===================================================================
--- mgmt/trunk/mace/cpp/m4/cppunit.m4 (rev 0)
+++ mgmt/trunk/mace/cpp/m4/cppunit.m4 2008-11-19 16:40:42 UTC (rev 2843)
@@ -0,0 +1,89 @@
+dnl
+dnl AM_PATH_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl
+AC_DEFUN([AM_PATH_CPPUNIT],
+[
+
+AC_ARG_WITH(cppunit-prefix,[ --with-cppunit-prefix=PFX Prefix where CppUnit is
installed (optional)],
+ cppunit_config_prefix="$withval",
cppunit_config_prefix="")
+AC_ARG_WITH(cppunit-exec-prefix,[ --with-cppunit-exec-prefix=PFX Exec prefix where
CppUnit is installed (optional)],
+ cppunit_config_exec_prefix="$withval",
cppunit_config_exec_prefix="")
+
+ if test x$cppunit_config_exec_prefix != x ; then
+ cppunit_config_args="$cppunit_config_args
--exec-prefix=$cppunit_config_exec_prefix"
+ if test x${CPPUNIT_CONFIG+set} != xset ; then
+ CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config
+ fi
+ fi
+ if test x$cppunit_config_prefix != x ; then
+ cppunit_config_args="$cppunit_config_args
--prefix=$cppunit_config_prefix"
+ if test x${CPPUNIT_CONFIG+set} != xset ; then
+ CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config
+ fi
+ fi
+
+ AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no)
+ cppunit_version_min=$1
+
+ AC_MSG_CHECKING(for Cppunit - version >= $cppunit_version_min)
+ no_cppunit=""
+ if test "$CPPUNIT_CONFIG" = "no" ; then
+ AC_MSG_RESULT(no)
+ no_cppunit=yes
+ else
+ CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags`
+ CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs`
+ cppunit_version=`$CPPUNIT_CONFIG --version`
+
+ cppunit_major_version=`echo $cppunit_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ cppunit_minor_version=`echo $cppunit_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ cppunit_micro_version=`echo $cppunit_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+
+ cppunit_major_min=`echo $cppunit_version_min | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ if test "x${cppunit_major_min}" = "x" ; then
+ cppunit_major_min=0
+ fi
+
+ cppunit_minor_min=`echo $cppunit_version_min | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ if test "x${cppunit_minor_min}" = "x" ; then
+ cppunit_minor_min=0
+ fi
+
+ cppunit_micro_min=`echo $cppunit_version_min | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ if test "x${cppunit_micro_min}" = "x" ; then
+ cppunit_micro_min=0
+ fi
+
+ cppunit_version_proper=`expr \
+ $cppunit_major_version \> $cppunit_major_min \| \
+ $cppunit_major_version \= $cppunit_major_min \& \
+ $cppunit_minor_version \> $cppunit_minor_min \| \
+ $cppunit_major_version \= $cppunit_major_min \& \
+ $cppunit_minor_version \= $cppunit_minor_min \& \
+ $cppunit_micro_version \>= $cppunit_micro_min `
+
+ if test "$cppunit_version_proper" = "1" ; then
+
AC_MSG_RESULT([$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version])
+ else
+ AC_MSG_RESULT(no)
+ no_cppunit=yes
+ fi
+ fi
+
+ if test "x$no_cppunit" = x ; then
+ ifelse([$2], , :, [$2])
+ else
+ CPPUNIT_CFLAGS=""
+ CPPUNIT_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+
+ AC_SUBST(CPPUNIT_CFLAGS)
+ AC_SUBST(CPPUNIT_LIBS)
+])
Added: mgmt/trunk/mace/cpp/m4/extensions.m4
===================================================================
--- mgmt/trunk/mace/cpp/m4/extensions.m4 (rev 0)
+++ mgmt/trunk/mace/cpp/m4/extensions.m4 2008-11-19 16:40:42 UTC (rev 2843)
@@ -0,0 +1,58 @@
+# serial 4 -*- Autoconf -*-
+# Enable extensions on systems that normally disable them.
+
+# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
+# Autoconf. Perhaps we can remove this once we can assume Autoconf
+# 2.61 or later everywhere, but since CVS Autoconf mutates rapidly
+# enough in this area it's likely we'll need to redefine
+# AC_USE_SYSTEM_EXTENSIONS for quite some time.
+
+# AC_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+[
+ AC_BEFORE([$0], [AC_COMPILE_IFELSE])
+ AC_BEFORE([$0], [AC_RUN_IFELSE])
+
+ AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([AC_AIX])
+ AC_REQUIRE([AC_MINIX])
+
+ AH_VERBATIM([__EXTENSIONS__],
+[/* Enable extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif])
+ AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
+ [ac_cv_safe_to_define___extensions__],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([
+# define __EXTENSIONS__ 1
+ AC_INCLUDES_DEFAULT])],
+ [ac_cv_safe_to_define___extensions__=yes],
+ [ac_cv_safe_to_define___extensions__=no])])
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ AC_DEFINE([__EXTENSIONS__])
+ AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+ AC_DEFINE([_TANDEM_SOURCE])
+])
+
+# gl_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],
+ [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])])
Added: mgmt/trunk/mace/cpp/src/GridSim.cpp
===================================================================
--- mgmt/trunk/mace/cpp/src/GridSim.cpp (rev 0)
+++ mgmt/trunk/mace/cpp/src/GridSim.cpp 2008-11-19 16:40:42 UTC (rev 2843)
@@ -0,0 +1,365 @@
+
+#include <qpid/management/Manageable.h>
+#include <qpid/management/ManagementObject.h>
+#include <qpid/agent/ManagementAgent.h>
+#include <qpid/sys/Mutex.h>
+#include "qpid/sys/SystemInfo.h"
+#include "qpid/framing/Uuid.h"
+#include "qmf/com/redhat/mace/Package.h"
+#include "qmf/com/redhat/sesame/Package.h"
+#include "qmf/com/redhat/sesame/Sysimage.h"
+#include "qmf/mrg/grid/Package.h"
+#include "qmf/com/redhat/mace/GridSim.h"
+#include "qmf/com/redhat/mace/ArgsGridSimStart.h"
+#include "qmf/mrg/grid/Slot.h"
+#include "qmf/mrg/grid/Job.h"
+#include "qmf/mrg/grid/Scheduler.h"
+
+#include <signal.h>
+#include <unistd.h>
+#include <cstdlib>
+#include <iostream>
+#include <fstream>
+#include <sstream>
+
+using namespace std;
+using qpid::management::ManagementAgent;
+using qpid::management::ManagementObject;
+using qpid::management::Manageable;
+using qpid::management::Args;
+using qpid::management::ObjectId;
+using qpid::sys::Mutex;
+using qpid::framing::Uuid;
+namespace _qmf = qmf::com::redhat;
+namespace _grid = qmf::mrg::grid;
+
+class GridSim : public Manageable
+{
+ ManagementAgent* agent;
+ _qmf::mace::GridSim* mgmtObject;
+ uint32_t execNodeCount;
+ uint32_t slotsPerNode;
+ uint32_t slotCount;
+ uint32_t jobCount;
+ uint8_t activityLevel;
+ map<Uuid, ManagementObject*> systems;
+ vector<ManagementObject*> slots;
+ vector<ManagementObject*> jobs;
+ _grid::Scheduler* scheduler;
+
+public:
+
+ GridSim(ManagementAgent* agent, const string& uuidFile);
+ ~GridSim() { mgmtObject->resourceDestroy(); }
+
+ ManagementObject* GetManagementObject(void) const
+ { return mgmtObject; }
+ void run();
+ Manageable::status_t ManagementMethod (uint32_t methodId, Args& args, string&
text);
+};
+
+GridSim::GridSim(ManagementAgent* _agent, const string& uuidFile) :
+ agent(_agent), mgmtObject(new _qmf::mace::GridSim(agent, this)),
+ execNodeCount(0), slotsPerNode(0), slotCount(0),
+ jobCount(0), activityLevel(0), scheduler(0)
+{
+ mgmtObject->set_execNodeCount(execNodeCount);
+ mgmtObject->set_slotsPerNode(slotsPerNode);
+ mgmtObject->set_slotCount(slotCount);
+ mgmtObject->set_jobCount(jobCount);
+ mgmtObject->set_activityLevel(activityLevel);
+
+ agent->addObject(mgmtObject, 1);
+}
+
+void GridSim::run()
+{
+ for (;;) {
+ ::sleep(5);
+ }
+}
+
+Manageable::status_t GridSim::ManagementMethod(uint32_t methodId, Args& args,
string& text)
+{
+ if (methodId == _qmf::mace::GridSim::METHOD_RESET) {
+ for (map<Uuid, ManagementObject*>::iterator iter = systems.begin();
+ iter != systems.end(); iter++)
+ iter->second->resourceDestroy();
+ systems.clear();
+
+ for (vector<ManagementObject*>::iterator iter = slots.begin();
+ iter != slots.end(); iter++)
+ (*iter)->resourceDestroy();
+ slots.clear();
+
+ for (vector<ManagementObject*>::iterator iter = jobs.begin();
+ iter != jobs.end(); iter++)
+ (*iter)->resourceDestroy();
+ jobs.clear();
+
+ if (scheduler) {
+ scheduler->resourceDestroy();
+ scheduler = 0;
+ }
+
+ return STATUS_OK;
+ }
+ else if (methodId == _qmf::mace::GridSim::METHOD_START) {
+ _qmf::mace::ArgsGridSimStart& ioArgs = (_qmf::mace::ArgsGridSimStart&)
args;
+ cout << "START: nodes=" << ioArgs.i_execNodes <<
" s/n=" << ioArgs.i_slotsPerNode <<
+ " jobs=" << ioArgs.i_jobs << " act=" <<
(int) ioArgs.i_activity << endl;
+
+ mgmtObject->set_execNodeCount(ioArgs.i_execNodes);
+ mgmtObject->set_slotsPerNode(ioArgs.i_slotsPerNode);
+ mgmtObject->set_slotCount(ioArgs.i_execNodes * ioArgs.i_slotsPerNode);
+ mgmtObject->set_jobCount(ioArgs.i_jobs);
+ mgmtObject->set_activityLevel(ioArgs.i_activity);
+
+ string schedSysName;
+
+ // Do scheduler
+ scheduler = new _grid::Scheduler(agent, this);
+ scheduler->set_Pool("Pool");
+ scheduler->set_System(schedSysName);
+
+ // Do systems
+ for (uint32_t i = 0; i < ioArgs.i_execNodes; i++) {
+ Uuid uuid(true);
+ _qmf::sesame::Sysimage* si(new _qmf::sesame::Sysimage(agent, this, uuid));
+ si->set_osName("Linux");
+ si->set_nodeName("dhcp-100-18-254.bos.redhat.com");
+ si->set_release("2.6.26.6-49.fc8");
+ si->set_version("#1 SMP Fri Oct 17 15:59:36 EDT 2008");
+ si->set_machine("i686");
+ si->set_memTotal(4096);
+ si->set_swapTotal(8192);
+ agent->addObject(si);
+ systems[uuid] = si;
+
+ if (i == 0) {
+ stringstream id;
+ id << uuid;
+ schedSysName = id.str();
+ }
+ }
+
+ // Do scheduler
+ scheduler = new _grid::Scheduler(agent, this);
+ scheduler->set_Pool("Pool");
+ scheduler->set_System(schedSysName);
+ ObjectId schedId = agent->addObject(scheduler);
+
+ // Do slots
+ for (map<Uuid, ManagementObject*>::iterator iter = systems.begin();
+ iter != systems.end(); iter++) {
+ stringstream id;
+ id << iter->first;
+
+ for (uint32_t i = 0; i < ioArgs.i_slotsPerNode; i++) {
+ _grid::Slot* slot(new _grid::Slot(agent, this));
+ slot->set_Pool("Pool");
+ slot->set_System(id.str());
+ agent->addObject(slot);
+ slots.push_back(slot);
+ }
+ }
+
+ // Do jobs
+ for (uint32_t i = 0; i < ioArgs.i_jobs; i++) {
+ _grid::Job* job(new _grid::Job(agent, this));
+ job->set_schedulerRef(schedId);
+ agent->addObject(job);
+ jobs.push_back(job);
+ }
+
+ return STATUS_OK;
+ }
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+struct Option {
+ string placeholder;
+ string defaultVal;
+ string help;
+ string value;
+
+ Option() {}
+ Option(const string& p, const string& d, const string& h) :
+ placeholder(p), defaultVal(d), help(h), value(d) {}
+};
+
+static map<string, Option> options;
+
+//==============================================================
+// Main program
+//==============================================================
+
+ManagementAgent::Singleton* singleton;
+
+void usage()
+{
+ cerr << "Usage: sesame [OPTIONS]" << endl << endl;
+ for (map<string, Option>::iterator iter = options.begin();
+ iter != options.end(); iter++)
+ cerr << " --" << iter->first << " "
<< iter->second.placeholder <<
+ " (" << iter->second.defaultVal << ") "
<< iter->second.help << endl;
+ exit(1);
+}
+
+void configure(int argc, char** argv)
+{
+ // Check to see if the config file was overridden
+ for (int i = 1; i < argc; i++) {
+ string arg(argv[i]);
+ if (arg == "--config") {
+ i++;
+ if (i == argc)
+ usage();
+ options["config"].value = string(argv[i]);
+ }
+ if (arg == "--no-config")
+ options["config"].value = string();
+ if (arg == "--help")
+ usage();
+ }
+
+ // Open the config file, if present, and load its values as overrides
+ // to the defaults.
+ if (!options["config"].value.empty()) {
+ ifstream input(options["config"].value.c_str());
+ if (!input.good()) {
+ cerr << "Can't open config file: " <<
options["config"].value << endl;
+ exit(1);
+ }
+
+ while (!input.eof()) {
+ char line[512];
+ char* cursor;
+ char* val;
+
+ input.getline(line, 512);
+ if (input.fail() && !input.eof()) {
+ cerr << "Line too long in config file: " <<
options["config"].value << endl;
+ exit(1);
+ }
+
+ if (line[0] != '\0' && line[0] != '#') {
+ cursor = line;
+ while (*cursor != '\0' && *cursor != '=')
+ cursor++;
+ if (*cursor == '\0') {
+ cerr << "Missing value in config line: " <<
line << endl;
+ exit(1);
+ }
+ *cursor = '\0';
+ val = ++cursor;
+
+ map<string, Option>::iterator iter = options.find(line);
+ if (iter == options.end()) {
+ cerr << "Config file option '" << line
<< "' not known" << endl;
+ exit(1);
+ }
+
+ iter->second.value = string(val);
+ }
+ }
+
+ input.close();
+ }
+
+ // Run through the command line options and override the defaults and the config
file.
+ for (int i = 1; i < argc; i++) {
+ string arg(argv[i]);
+ if (arg == "--no-config")
+ continue;
+ if (arg.substr(0, 2) != "--") {
+ cerr << "Invalid argument: " << arg << endl;
+ usage();
+ }
+
+ map<string, Option>::iterator iter = options.find(arg.substr(2));
+ if (iter == options.end()) {
+ cerr << "Unknown option: " << arg << endl;
+ usage();
+ }
+
+ i++;
+ if (i == argc) {
+ cerr << "No value for option: " << arg << endl;
+ usage();
+ }
+
+ iter->second.value = string(argv[i]);
+ }
+}
+
+void getPassword()
+{
+ string file(options["pwd-file"].value);
+ if (file.empty())
+ return;
+
+ ifstream input(file.c_str());
+ if (!input.good()) {
+ cerr << "Can't read password file" << endl;
+ exit(1);
+ }
+
+ input >> options["pwd"].value;
+ input.close();
+}
+
+void shutdown(int)
+{
+ delete singleton;
+ exit(0);
+}
+
+int main_int(int argc, char** argv)
+{
+ singleton = new ManagementAgent::Singleton();
+ signal(SIGINT, shutdown);
+
+ options["no-config"] = Option("", "",
"Don't read configuration file");
+ options["config"] = Option("FILE", CONF_FILE,
"Configuration file");
+ options["host"] = Option("ADDR", "localhost",
"Broker host name or IP address");
+ options["port"] = Option("N", "5672",
"Port for broker service");
+ options["proto"] = Option("NAME", "tcp",
"Protocol for broker communication");
+ options["mech"] = Option("NAME", "PLAIN",
"Authentication mechanism");
+ options["uid"] = Option("NAME", "guest",
"Authentication user name");
+ options["pwd"] = Option("PASSWORD", "guest",
"Authentication password");
+ options["pwd-file"] = Option("FILE", "",
"File containing password");
+ options["state-dir"] = Option("DIR", LOCSTATE_DIR,
"Directory for stored state");
+
+ configure(argc, argv);
+ getPassword();
+
+ // Create the qmf management agent
+ ManagementAgent* agent = singleton->getInstance();
+
+ // Register the schema with the agent
+ _qmf::mace::Package mPackageInit(agent);
+ _qmf::sesame::Package sPackageInit(agent);
+ _grid::Package gPackageInit(agent);
+
+ // Start the agent. It will attempt to make a connection to the
+ // management broker
+ agent->init(options["host"].value,
::atoi(options["port"].value.c_str()), 5, false,
+ options["state-dir"].value + "/agentdata",
+ options["uid"].value, options["pwd"].value,
+ options["mech"].value, options["proto"].value);
+
+ // Allocate core object
+ GridSim core(agent, options["state-dir"].value + "/uuid");
+ core.run();
+}
+
+int main(int argc, char** argv)
+{
+ try {
+ return main_int(argc, argv);
+ } catch(std::exception& e) {
+ cout << "Top Level Exception: " << e.what() << endl;
+ }
+}
+
Added: mgmt/trunk/mace/cpp/src/Makefile.am
===================================================================
--- mgmt/trunk/mace/cpp/src/Makefile.am (rev 0)
+++ mgmt/trunk/mace/cpp/src/Makefile.am 2008-11-19 16:40:42 UTC (rev 2843)
@@ -0,0 +1,14 @@
+SUBDIRS = qmfgen
+mace_CXXFLAGS = -I$(QPID_DIR)/cpp/src -I$(QPID_DIR)/cpp/src/gen -Iqmfgen \
+ -DCONF_FILE=\"$(sysconfdir)/mace.conf\" \
+ -DLOCSTATE_DIR=\"$(localstatedir)/mace\"
+
+include qmfgen/qmfgen.mk
+
+bin_PROGRAMS = mace
+nodist_mace_SOURCES = $(qmfgen_sources)
+mace_SOURCES = GridSim.cpp
+
+mace_LDADD = $(QPID_LIBS)
+
+
Added: mgmt/trunk/mace/cpp/src/qmfgen/Makefile.am
===================================================================
--- mgmt/trunk/mace/cpp/src/qmfgen/Makefile.am (rev 0)
+++ mgmt/trunk/mace/cpp/src/qmfgen/Makefile.am 2008-11-19 16:40:42 UTC (rev 2843)
@@ -0,0 +1,15 @@
+
+force:
+
+SCHEMADOCS = mace.xml condor-management-schema.xml sesame.xml
+EXTRA_DIST = $(SCHEMADOCS)
+
+qmfgen_cmd=$(QMF_GEN) -o $(srcdir)/qmf -m qmfgen.mk -p qmfgen $(SCHEMADOCS)
+
+include qmfgen.mk
+
+all : $(SCHEMADOCS)
+ $(qmfgen_cmd)
+
+clean:
+ rm -rf $(srcdir)/qmf
Added: mgmt/trunk/mace/cpp/src/qmfgen/condor-management-schema.xml
===================================================================
--- mgmt/trunk/mace/cpp/src/qmfgen/condor-management-schema.xml
(rev 0)
+++ mgmt/trunk/mace/cpp/src/qmfgen/condor-management-schema.xml 2008-11-19 16:40:42 UTC
(rev 2843)
@@ -0,0 +1,713 @@
+<schema package="mrg.grid">
+
+<!--
+/*
+ * Copyright 2008 Red Hat, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<group name="daemon-stats">
+ <property name="CondorPlatform"
+ type="sstr"
+ desc="The Condor platform string for the daemon's platform"/>
+ <property name="CondorVersion"
+ type="sstr"
+ desc="The Condor version string for the daemon's version"/>
+ <property name="DaemonStartTime"
+ type="absTime" unit="nanosecond"
+ desc="Number of nanoseconds since epoch when the daemon
+ was started"/>
+
+ <statistic name="MonitorSelfAge" type="uint32"/>
+ <statistic name="MonitorSelfCPUUsage" type="double"/>
+ <statistic name="MonitorSelfImageSize" type="double"/>
+ <statistic name="MonitorSelfRegisteredSocketCount"
type="uint32"/>
+ <statistic name="MonitorSelfResidentSetSize" type="uint32"/>
+ <statistic name="MonitorSelfTime" type="absTime"/>
+</group>
+
+<!--
+CpuBusy = ((LoadAvg - CondorLoadAvg) >= 0.500000)
+CpuBusyTime = 0
+CpuIsBusy = FALSE
+
+HasCheckpointing = TRUE
+HasFileTransfer = TRUE
+HasIOProxy = TRUE
+HasJava = TRUE
+HasJICLocalConfig = TRUE
+HasJICLocalStdin = TRUE
+HasJobDeferral = TRUE
+HasMPI = TRUE
+HasPerFileEncryption = TRUE
+HasReconnect = TRUE
+HasRemoteSyscalls = TRUE
+HasTDP = TRUE
+HasVM = FALSE
+
+JavaMFlops = 8.156164
+JavaVendor = "Free Software Foundation, Inc."
+JavaVersion = "1.4.2"
+
+Subnet = "10.16.43"
+
+Set by Collector:
+ UpdateSequenceNumber = 627
+ UpdatesHistory = "0x00000000000000000000000000000000"
+ UpdatesLost = 0
+ UpdatesSequenced = 58
+ UpdatesTotal = 59
+-->
+
+ <class name="Slot">
+
+ <group name="daemon-stats"/>
+
+ <property name="Pool" type="sstr" index="y"/>
+ <property name="System" type="sstr" index="y"/>
+
+ <property name="AccountingGroup"
+ type="sstr"
+ optional="y"
+ desc="AccountingGroup of the running job, fully
+ qualified with a UidDomain, UidDomain taken from
+ RemoteUser, only present when a job is
+ executing"/>
+ <statistic name="Activity"
+ type="sstr"
+ desc="One of: Idle, No job activity; Busy, Job is
+ running; Suspended, Job is suspended; Vacating,
+ Job is being removed; Killing, Job is being
+ killed; Benchmarking, Benchmarks being run"/>
+ <property name="Arch"
+ type="sstr"
+ desc="Slot's architecture, e.g.: ALPHA, Diginal Alpha;
+ HPPA1, HP PA-RISC 1.x (7000 series); HPPA2, HP
+ PA-RISC 2.x (8000 series); IA64, Intel Itanium;
+ INTEL, Intel x86 (Pentium, Xeon, etc); SGI, SGI
+ MIPS; SUN4u, Sun UltraSparc; SUN4x, Sun Sparc
+ (not UltraSparc); PPC, Power Macintosh; PPC64,
+ 64-bit Power Macintosh; X86_64, AMD/Intel 64-bit
+ x86"/>
+ <property name="CheckpointPlatform"
+ type="sstr"
+ desc="Opaque string encoding OS, hardware and kernel
+ attributes"/>
+ <property name="ClientMachine"
+ type="sstr"
+ optional="y"
+ desc="The hostname of the machine that has claimed the
+ slot, only present when slot is claimed"/>
+ <statistic name="ClockDay"
+ type="uint32"
+ desc="Day of the week: 0 = Sunday, 1 = Monday, ..., 6 =
+ Saturaday"/>
+ <statistic name="ClockMin"
+ type="uint32" unit="minute"
+ desc="Number of elapsed minutes since midnight"/>
+ <property name="ConcurrencyLimits"
+ type="sstr"
+ optional="y"
+ desc="Set of concurrency limits associated with the
+ current job"/>
+ <statistic name="CondorLoadAvg"
+ type="double"
+ desc="Portion of LoadAvg generated by Condor (job or
+ benchmark)"/>
+ <statistic name="ConsoleIdle"
+ type="uint32" unit="second"
+ desc="Seconds since activity on console keyboard or
+ mouse"/>
+ <property name="Cpus"
+ type="uint32"
+ desc="Number of CPUs in slot"/>
+ <!-- XXX: CurrentRank could quite possibly be a statistic -->
+ <property name="CurrentRank"
+ type="double"
+ optional="y"
+ desc="Slots' affinity for running the job it is
+ currently hosting, calculated as Rank expression
+ evaluated in context of the running job's ad"/>
+ <property name="Disk"
+ type="uint32" unit="KiB"
+ desc="Amount of disk space in KiB available in the slot"/>
+ <statistic name="EnteredCurrentActivity"
+ type="absTime" unit="nanosecond"
+ desc="Time at which current Activity was entered,
+ number of nanoseconds since Unix epoch"/>
+ <statistic name="EnteredCurrentState"
+ type="absTime" unit="nanosecond"
+ desc="Time at which current State was entered,
+ number of seconds since Unix epoch"/>
+ <property name="FileSystemDomain"
+ type="sstr"
+ desc="Configured namespace shared by slots with
+ uniformly mounted shared storage"/>
+ <property name="GlobalJobId"
+ type="sstr"
+ optional="y"
+ desc="The running job's GlobalJobId, only present when
+ a job is executing"/>
+ <!-- XXX: ImageSize could quite possibly be a statistic -->
+ <property name="ImageSize"
+ type="uint32" unit="KiB"
+ optional="y"
+ desc="Estimate of the memory image size, in KiB, of the
+ running job, only present when a job is
+ executing, pulled by STARTD_JOB_EXPRS"/>
+ <property name="IsValidCheckpointPlatform"
+ type="lstr"
+ desc="A configurable expression representing if a
+ checkpointed job can run on the slot, part of the
+ slot's Requirements along with the Start
+ expression"/>
+ <!-- XXX: JobId could quite possibly be a statistic, snapshots
+ would show use over time -->
+ <property name="JobId"
+ type="sstr"
+ optional="y"
+ desc="The running job's identifier,
+ i.e. ClusterId.ProcId, only present when a job is
+ executing"/>
+ <property name="JobStart"
+ type="absTime" unit="nanosecond"
+ optional="y"
+ desc="The number of nanosecond since epoch when the job
+ began executing, only present when a job is
+ executing"/>
+ <statistic name="KeyboardIdle"
+ type="uint32" unit="second"
+ desc="Number of seconds since any activity on any
+ keyboard or mouse associated with the machine,
+ including pseudo-terminals"/>
+ <property name="KFlops"
+ type="uint32"
+ desc="Relative floating point performance on a Linpack
+ benchmark"/>
+ <statistic name="LastBenchmark"
+ type="absTime" unit="nanosecond"
+ desc="Number of nanoseconds since epoch when the last
+ benchmark was run"/>
+ <statistic name="LastFetchWorkCompleted"
+ type="absTime" unit="nanosecond"
+ desc="Number of nanoseconds since epoch when the
+ FetchWork Hook returned"/>
+
+ <statistic name="LastFetchWorkSpawned"
+ type="absTime" unit="nanosecond"
+ desc="Number of nanoseconds since epoch when the
+ FetchWork Hook was invoked"/>
+ <statistic name="LastPeriodicCheckpoint"
+ type="absTime" unit="nanosecond"
+ desc="The number of nanoseconds since epoch when the
+ job last performed a periodic checkpoint, only
+ present when a job is executing"/>
+<!--
+ <statistic name="LastHeardFrom"
+ type="absTime" unit="nanosecond"
+ desc="Time when the Collector received an update from
+ the slot, nanoseconds since epoch, inserted by
+ Collector"/>
+-->
+ <statistic name="LoadAvg"
+ type="double"
+ desc="Load average of CPUs hosting the slot"/>
+ <property name="Machine"
+ type="sstr"
+ desc="The fully qualified hostname of slot's host
+ machine"/>
+ <property name="MaxJobRetirementTime"
+ type="lstr" unit="second"
+ desc="Expression evaluated in context of job ad
+ producing the number of seconds a job is allowed
+ to finish before being killed, relevant when job
+ is being kicked out of the slot"/>
+ <property name="Memory"
+ type="uint32" unit="MiB"
+ desc="Amount of RAM available in the slot, in MiB"/>
+ <property name="Mips"
+ type="uint32"
+ desc="Relative integer performance on a Dhrystone
+ benchmark"/>
+ <property name="MyAddress"
+ type="sstr"
+ desc="IP:Port of StartD in charge of the slot"/>
+ <statistic name="MyCurrentTime"
+ type="absTime" unit="nanosecond"
+ desc="The number of nanoseconds since epoch that the
+ slot produced an updated ad"/>
+<!--
+ <property name="MyType"
+ type="sstr"
+ desc="Always 'Machine'"\>
+-->
+ <property name="Name"
+ type="sstr"
+ index="y"
+ desc="Name of the slot, either the same as Machine,
+ slot#@Machine, or a configured value"/>
+ <statistic name="NextFetchWorkDelay"
+ type="int32" unit="second"
+ desc="Number of seconds until the next FetchWork
+ Hook will be invoked, -1 means never"/>
+ <property name="OpSys"
+ type="sstr"
+ desc="Slot's operating system, e.g.: HPUX10, HPUX
+ 10.20; HPUX11, HPUX B.11.00; LINUX, Linux
+ 2.[0,2,4,6].x kernels; OSF1, Diginal Unix 4.x;
+ OSX, Darwin; OSX10_2, Darwin 6.4; SOLARIS25,
+ Solaris 2.4 or 5.5; SOLARIS251, Solaris 2.5.1 or
+ 5.5.1; SOLARIS26, Solaris 2.6 or 5.6; SOLARIS27,
+ Solaris 2.7 or 5.7; SOLARIS28, Solaris 2.8 or
+ 5.8; SOLARIS29, Solaris 2.9 or 5.9; WINNT50,
+ Windows 2000; WINNT51, Windows XP; WINNT52,
+ Windows Server 2003; WINNT60, Windows Vista"/>
+ <property name="PreemptingConcurrencyLimits"
+ type="sstr"
+ optional="y"
+ desc="Set of concurrency limits associated with the
+ preempting job"/>
+ <property name="PreemptingOwner"
+ type="sstr"
+ optional="y"
+ desc="The name of the user originally preempting the
+ current job, i.e. the incoming user, only present
+ when slot is claimed"/>
+ <!-- XXX: PreemptingUser could quite possibly be a statistic -->
+ <property name="PreemptingUser"
+ type="sstr"
+ optional="y"
+ desc="The name of the user preempting the current job,
+ different from PreemptingOwner only if the claim
+ was given to another user who is using it to
+ preempt, only present when slot is claimed"/>
+ <!-- XXX: PreemptingRank could quite possibly be a statistic -->
+ <property name="PreemptingRank"
+ type="double"
+ optional="y"
+ desc="Slots' affinity for running the incoming,
+ preempting, job, calculated as Rank expression
+ evaluated in context of the incoming job's ad,
+ only present when slot is claimed"/>
+ <!-- XXX: RemoteOwner could quite possibly be a statistic, showing
+ use over time -->
+ <property name="RemoteOwner"
+ type="sstr"
+ optional="y"
+ desc="The name of the user who originally claimed the
+ slot, only present when slot is claimed"/>
+ <!-- XXX: RemoteUser could quite possibly be a statistic, showing
+ use over time -->
+ <property name="RemoteUser"
+ type="sstr"
+ optional="y"
+ desc="The name of the user who is currently using the
+ slot, different from RemoteOwner only if the
+ claim was given to another user who is using the
+ slot, only present when slot is claimed"/>
+ <property name="Requirements"
+ type="lstr"
+ desc="Expression evaluated in the context of a job ad
+ to determine if the slot will run a job"/>
+ <property name="PublicNetworkIpAddr"
+ type="sstr"
+ desc="IP:Port used to communicate with the slot"/>
+ <property name="Rank"
+ type="lstr"
+ desc="Configured expression representing how the slot
+ prefers jobs"/>
+ <property name="SlotID"
+ type="uint32"
+ desc="The # in the slot's Name, i.e.
Name='slot#@Machine'"/>
+ <property name="Start"
+ type="lstr"
+ desc="Expression evaluated to determine if a slot is
+ willing to start running a job"/>
+ <property name="StarterAbilityList"
+ type="lstr"
+ desc="StringList, comma separated, set of abilities the
+ slot has, i.e. HasFileTransfer,HasJava,HasVM,
+ query with stringListMember('Element',
+ StarterAbilityList)"/>
+ <statistic name="State"
+ type="sstr"
+ desc="One of: Owner, unavailable to Condor; Unclaimed,
+ available to Condor, but no job match yet;
+ Matched, job found, but not yet claimed; Claimed,
+ claimed and job likely running (see Activity);
+ Preempting, running job is being kicked off the
+ slot"/>
+<!--
+ <statistic name="TargetType"
+ type="sstr"
+ desc="Always 'Job'"/>
+-->
+ <statistic name="TimeToLive"
+ type="uint32" unit="second"
+ desc="Number of second until StartD managing the slot
+ has until it will exit"/>
+ <!-- XXX: TotalClaimRunTime is a statistic -->
+ <property name="TotalClaimRunTime"
+ type="uint32" unit="second"
+ optional="y"
+ desc="Number of seconds the current claim has spent
+ running jobs, only present when slot is
+ claimed"/>
+ <!-- XXX: TotalClaimSuspendTime is a statistic -->
+ <property name="TotalClaimSuspendTime"
+ type="uint32" unit="second"
+ optional="y"
+ desc="Number of seconds the current claim has spent
+ with suspended jobs, only present when slot is
+ claimed"/>
+ <statistic name="TotalCondorLoadAvg"
+ type="double"
+ desc="Portion of TotalLoadAvg generated by Condor (jobs
+ or benchmarks)"/>
+ <property name="TotalCpus"
+ type="uint32"
+ desc="Total number of CPUs on slot's host machine, or
+ NUM_CPUS configuration option"/>
+ <property name="TotalDisk"
+ type="uint32" unit="KiB"
+ desc="Amount of disk space available on the slot's host
+ machine"/>
+ <!-- XXX: TotalJobRunTime is a statistic -->
+ <property name="TotalJobRunTime"
+ type="uint32" unit="second"
+ optional="y"
+ desc="Number of seconds the current job has spent
+ running, i.e. Claimed/Busy, only present when
+ slot is claimed"/>
+ <!-- XXX: TotalJobSuspendTime is a statistic -->
+ <property name="TotalJobSuspendTime"
+ type="uint32" unit="second"
+ optional="y"
+ desc="Number of seconds the current job has spent
+ suspended, i.e. Claimed/Suspended, only present
+ when slot is claimed"/>
+ <statistic name="TotalLoadAvg"
+ type="double"
+ desc="Total load average of the slot's host machine"/>
+ <property name="TotalMemory"
+ type="uint32" unit="MiB"
+ desc="Total RAM available on slot's machine, in MiB"/>
+ <property name="TotalSlots"
+ type="uint32"
+ desc="Total number of slots sharing the Machine"/>
+ <statistic name="TotalTimeBackfillBusy"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Backfill and Activity=Busy since the
+ Startd started"/>
+ <statistic name="TotalTimeBackfillIdle"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Backfill and Activity=Idle since the
+ Startd started"/>
+ <statistic name="TotalTimeBackfillKilling"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Backfill and Activity=Killing since the
+ Startd started"/>
+ <statistic name="TotalTimeClaimedBusy"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Claimed and Activity=Busy since the
+ Startd started"/>
+ <statistic name="TotalTimeClaimedIdle"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Claimed and Activity=Idle since the
+ Startd started"/>
+ <statistic name="TotalTimeClaimedRetiring"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Claimed and Activity=Retiring since the
+ Startd started"/>
+ <statistic name="TotalTimeClaimedSuspended"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Claimed and Activity=Suspended since the
+ Startd started"/>
+ <statistic name="TotalTimeMatchedIdle"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Matched and Activity=Idle since the
+ Startd started"/>
+ <statistic name="TotalTimeOwnerIdle"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Owner and Activity=Idle since the
+ Startd started"/>
+ <statistic name="TotalTimePreemptingKilling"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Preempting and Activity=Killing since the
+ Startd started"/>
+ <statistic name="TotalTimePreemptingVacating"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Preempting and Activity=Vacating since the
+ Startd started"/>
+ <statistic name="TotalTimeUnclaimedBenchmarking"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Unclaimed and Activity=Benchmarking since
+ the Startd started"/>
+ <statistic name="TotalTimeUnclaimedIdle"
+ type="uint32" unit="second"
+ desc="Accumulated number of seconds the slot has been
+ in State=Unclaimed and Activity=Idle since the
+ Startd started"/>
+ <property name="TotalVirtualMemory"
+ type="uint32" unit="KiB"
+ desc="Amount of swap space available on slot"/>
+ <property name="UidDomain"
+ type="sstr"
+ desc="Configured namespace shared by slots with
+ uniform uid/gid entries, i.e. same logins and
+ groups"/>
+ <property name="VirtualMemory"
+ type="uint32" unit="KiB"
+ desc="Amount of currently available virtual memory
+ (swap space) in KiB"/>
+ <property name="WindowsBuildNumber"
+ type="uint32"
+ desc="Integer extracted from the platform type,
+ representing a build number for a Windows
+ operating system, only present on Windows
+ slots"/>
+ <property name="WindowsMajorVersion"
+ type="uint32"
+ desc="Integer extracted from the platform type,
+ representing a major version number for a Windows
+ operating system, only present on Windows
+ slots, e.g. 5 for OpSys=WINNT50"/>
+ <property name="WindowsMinorVersion"
+ type="uint32"
+ desc="Integer extected from the platform type,
+ representing a minor version numer for a Windows
+ operating system, only present on Windows
+ slots, e.g. 2 for OpSys=WINNT52"/>
+
+<!--
+ <property name="AdditionalAttributes" type="map"/>
+-->
+ </class>
+
+<!--
+Exec Host, Order(Rank?), StartTime, TotalTime (Sys, User), Project, AccountingGroup
+-->
+ <class name="Job">
+ <property name="schedulerRef" type="objId" index="y"
references="mrg.grid.Scheduler"/>
+ <property name="submitterRef" type="objId"
references="mrg.grid.Submitter"/>
+
+ <property name="AccountingGroup" type="sstr"
optional="y" desc=""/>
+ <property name="Args" type="lstr" optional="y"
desc=""/>
+ <property name="ClusterId"
+ type="uint32" index="y"
+ desc="The id of the cluster the job belongs
+ to. ClusterIds are unique within a SchedD."/>
+ <property name="Cmd" type="lstr" desc=""/>
+ <property name="ConcurrencyLimits" type="lstr"
optional="y" desc=""/>
+ <property name="CustomGroup" type="sstr"
optional="y" desc=""/>
+ <property name="CustomId" type="sstr" optional="y"
desc=""/>
+ <property name="CustomPriority" type="uint32"
optional="y" desc=""/>
+ <property name="GlobalJobId" type="sstr"
desc=""/>
+ <property name="In"
+ type="lstr"
+ desc="The file where the job's standard input is read
+ from."/>
+ <property name="Iwd" type="lstr" desc=""/>
+ <property name="JobStatus"
+ type="uint32"
+ desc="One of: 0, unexpanded; 1, idle; 2, running; 3,
+ removed; 4, completed; 5, held; or, 6, submission
+ error"/>
+ <property name="Note"
+ type="lstr" optional="y"
+ desc="An arbitrary note attached to the job."/>
+ <property name="Out"
+ type="lstr"
+ desc="The file where the job's standard output is
+ written."/>
+ <property name="Owner"
+ type="sstr"
+ desc="The submitter of the job."/>
+ <property name="User"
+ type="sstr"
+ desc="The Owner '@' the configured UidDomain namespace"/>
+ <property name="ProcId"
+ type="uint32" index="y"
+ desc="The id of the job within its cluster. ProcIds re
+ unique within a cluster."/>
+ <property name="QDate"
+ type="absTime" unit="nanoseconds"
+ desc="The number of nanoseconds since epoch when the
+ job was submitted."/>
+
+<!--
+ <property name="Requirements" type="lstr"
desc=""/>
+ <property name="Scheduler" type="sstr" desc=""/>
+-->
+
+ <property name="JobUniverse"
+ type="uint32"
+ desc=""/>
+
+ <property name="Title" type="sstr" optional="y"
desc=""/>
+ <property name="UserLog" type="lstr" optional="y"
desc=""/>
+
+ <property name="HoldReason" type="lstr" optional="y"
desc=""/>
+
+ <property name="DAGNodeName"
+ type="sstr" optional="y" desc=""/>
+ <property name="DAGParentNodeNames"
+ type="lstr" optional="y"
+ desc="Comma separated list of the job's parent's node
+ names"/>
+ <property name="DAGManJobId"
+ type="uint32" optional="y"
+ desc="The ClusterId of the DAGMan job who spawned the
+ job"/>
+
+ <property name="Ad" type="map" optional="y"
desc=""/>
+
+ <method name="GetAd">
+ <arg name="JobAd" dir="O" type="map"
+ desc="(name,value,type) tuples; Values are INTEGER, FLOAT,
+ STRING and EXPR. The EXPR value is not first class,
+ it is an unquoted, with double quotes, string"/>
+ </method>
+
+ <method name="SetAttribute">
+ <arg name="Name" dir="I" type="sstr"/>
+ <arg name="Value" dir="I" type="lstr"/>
+ </method>
+
+ <method name="Hold">
+ <arg name="Reason" dir="I" type="sstr"/>
+ </method>
+
+ <method name="Release">
+ <arg name="Reason" dir="I" type="sstr"/>
+ </method>
+
+ <method name="Remove">
+ <arg name="Reason" dir="I" type="sstr"/>
+ </method>
+
+ <method name="Fetch">
+ <arg name="File" dir="I" type="sstr"/>
+ <arg name="Start" dir="I" type="int32"/>
+ <arg name="End" dir="I" type="int32"/>
+ <arg name="Data" dir="O" type="lstr"/>
+ </method>
+ </class>
+
+ <class name="Scheduler">
+ <group name="daemon-stats"/>
+
+ <property name="Pool" type="sstr" index="y"/>
+ <property name="System" type="sstr" index="y"/>
+
+ <property name="JobQueueBirthdate" type="absTime"/>
+ <property name="MaxJobsRunning" type="uint32"
desc=""/>
+ <property name="Machine" type="sstr" desc=""/>
+ <property name="MyAddress" type="sstr" desc=""/>
+ <statistic name="NumUsers" type="uint32"/>
+ <property name="Name" type="sstr" index="y"
desc=""/>
+ <property name="PublicNetworkIpAddr" type="sstr"
desc=""/>
+ <statistic name="TotalHeldJobs" type="uint32"/>
+ <statistic name="TotalIdleJobs" type="uint32"/>
+ <statistic name="TotalJobAds" type="uint32"/>
+ <statistic name="TotalRemovedJobs" type="uint32"/>
+ <statistic name="TotalRunningJobs" type="uint32"/>
+ </class>
+
+ <class name="Submitter">
+ <property name="schedulerRef" type="objId"
parentRef="y" index="y"
references="mrg.grid.Scheduler"/>
+
+ <statistic name="HeldJobs" type="uint32"/>
+ <statistic name="IdleJobs" type="uint32"/>
+ <property name="JobQueueBirthdate" type="absTime"/>
+ <property name="Machine" type="sstr"/>
+ <property name="Name" type="sstr" index="y"/>
+ <statistic name="RunningJobs" type="uint32"/>
+ <property name="ScheddName" type="sstr"/>
+ </class>
+
+ <class name="Negotiator">
+ <property name="Pool" type="sstr" index="y"/>
+ <property name="System" type="sstr" index="y"/>
+
+ <property name="Name" type="sstr" index="y"/>
+ <property name="Machine" type="sstr"/>
+ <property name="MyAddress" type="sstr" desc=""/>
+
+ <!-- NOTE: MonitorSelf* statistics are currently missing in 7.0.0 -->
+ <group name="daemon-stats"/>
+
+ <method name="GetLimits">
+ <arg name="Limits" dir="O" type="map"/>
+ </method>
+
+ <method name="SetLimit">
+ <arg name="Name" dir="I" type="sstr"/>
+ <arg name="Max" dir="I" type="double"/>
+ </method>
+
+ <method name="Reconfig"/>
+ </class>
+
+ <class name="Collector">
+ <property name="Pool" type="sstr" index="y"/>
+ <property name="System" type="sstr" index="y"/>
+
+ <property name="CondorPlatform" type="sstr"/>
+ <property name="CondorVersion" type="sstr"/>
+ <property name="Name" type="sstr" index="y"/>
+ <property name="PublicNetworkIpAddr" type="sstr"/>
+ </class>
+
+ <class name="Master">
+
+ <group name="daemon-stats"/>
+
+ <property name="Pool" type="sstr" index="y"/>
+ <property name="System" type="sstr" index="y"/>
+
+ <property name="Name" type="sstr" index="y"/>
+ <property name="Machine" type="sstr"/>
+ <property name="PublicNetworkIpAddr" type="sstr"/>
+ <property name="MyAddress" type="sstr"/>
+ <property name="RealUid" type="int32"/>
+
+ <method name="Start">
+ <arg name="Subsystem"
+ dir="I" type="sstr"
+ desc="The component/subsystem to start: one of STARTD,
+ SCHEDD, COLLECTOR, NEGOTIATOR, KBDD or QUILL"/>
+ </method>
+
+ <method name="Stop">
+ <arg name="Subsystem"
+ dir="I" type="sstr"
+ desc="The component/subsystem to stop: one of STARTD,
+ SCHEDD, COLLECTOR, NEGOTIATOR, KBDD or QUILL"/>
+ </method>
+ </class>
+</schema>
Added: mgmt/trunk/mace/cpp/src/qmfgen/mace.xml
===================================================================
--- mgmt/trunk/mace/cpp/src/qmfgen/mace.xml (rev 0)
+++ mgmt/trunk/mace/cpp/src/qmfgen/mace.xml 2008-11-19 16:40:42 UTC (rev 2843)
@@ -0,0 +1,20 @@
+<schema package="com.redhat.mace">
+
+ <class name="GridSim">
+ <property name="execNodeCount" type="uint32"
access="RO"/>
+ <property name="slotsPerNode" type="uint32"
access="RO"/>
+ <property name="slotCount" type="uint32"
access="RO"/>
+ <property name="jobCount" type="uint32"
access="RO"/>
+ <property name="activityLevel" type="uint8"
access="RO" desc="0 = none, 100 = all objects every interval"/>
+
+ <method name="reset" desc="Delete all grid objects"/>
+ <method name="start" desc="Set up simulated objects">
+ <arg name="execNodes" type="uint32"
dir="I"/>
+ <arg name="slotsPerNode" type="uint32"
dir="I"/>
+ <arg name="jobs" type="uint32"
dir="I"/>
+ <arg name="activity" type="uint8"
dir="I"/>
+ </method>
+ </class>
+
+</schema>
+
Added: mgmt/trunk/mace/cpp/src/qmfgen/sesame.xml
===================================================================
--- mgmt/trunk/mace/cpp/src/qmfgen/sesame.xml (rev 0)
+++ mgmt/trunk/mace/cpp/src/qmfgen/sesame.xml 2008-11-19 16:40:42 UTC (rev 2843)
@@ -0,0 +1,30 @@
+<schema package="com.redhat.sesame">
+
+ <class name="Sysimage">
+ <property name="uuid" index="y" type="uuid"
access="RC" desc="UUID of System Image"/>
+
+ <property name="osName" type="sstr" access="RO"
desc="Operating System Name"/>
+ <property name="nodeName" type="sstr" access="RO"
desc="Node Name"/>
+ <property name="release" type="sstr"
access="RO"/>
+ <property name="version" type="sstr"
access="RO"/>
+ <property name="machine" type="sstr"
access="RO"/>
+
+ <property name="memTotal" type="uint32" access="RO"
unit="kByte"/>
+ <property name="swapTotal" type="uint32" access="RO"
unit="kByte"/>
+
+ The following statistics are gathered from /proc/meminfo
+
+ <statistic name="memFree" type="uint32"
unit="kByte"/>
+ <statistic name="swapFree" type="uint32"
unit="kByte"/>
+
+ The following statistics are gathered from /proc/loadavg
+
+ <statistic name="loadAverage1Min" type="float"/>
+ <statistic name="loadAverage5Min" type="float"/>
+ <statistic name="loadAverage10Min" type="float"/>
+ <statistic name="procTotal" type="uint32"/>
+ <statistic name="procRunning" type="uint32"/>
+ </class>
+
+</schema>
+