├── .github └── workflows │ └── build.yml ├── AUTHORS ├── COPYING ├── ChangeLog ├── DISCLAIMER ├── DISCLAIMER.UC ├── INSTALL ├── Makefile.am ├── Makefile.in ├── NEWS ├── README ├── README.md ├── ROADMAP ├── TODO ├── aclocal.m4 ├── autogen.sh ├── cerebro.spec.in ├── config ├── ac_boottime.m4 ├── ac_cerebro_config_file.m4 ├── ac_cerebro_metric_control_path.m4 ├── ac_cerebro_module_dir.m4 ├── ac_cerebrod_speaker_only.m4 ├── ac_debug.m4 ├── ac_genders.m4 ├── ac_gethostbyname_r.m4 ├── ac_hostsfile.m4 ├── ac_ipv6.m4 ├── ac_loadavg.m4 ├── ac_memory.m4 ├── ac_network.m4 ├── ac_shutdown.m4 ├── ac_slurm_state.m4 ├── ac_static_modules.m4 ├── ac_struct_sa_len.m4 ├── ac_updown_event.m4 ├── acx_pthread.m4 ├── compile ├── config.guess ├── config.h.in ├── config.sub ├── depcomp ├── install-sh ├── libtool.m4 ├── ltmain.sh ├── missing └── systemd.m4 ├── configure ├── configure.ac ├── etc ├── Makefile.am ├── Makefile.in ├── cerebro.conf ├── cerebrod └── cerebrod.service ├── libltdl ├── COPYING.LIB ├── Makefile.am ├── Makefile.in ├── README ├── aclocal.m4 ├── config-h.in ├── config │ ├── compile │ ├── config.guess │ ├── config.sub │ ├── depcomp │ ├── install-sh │ ├── ltmain.sh │ └── missing ├── configure ├── configure.ac ├── libltdl │ ├── lt__alloc.h │ ├── lt__argz_.h │ ├── lt__dirent.h │ ├── lt__glibc.h │ ├── lt__private.h │ ├── lt__strl.h │ ├── lt_dlloader.h │ ├── lt_error.h │ ├── lt_system.h │ └── slist.h ├── loaders │ ├── dld_link.c │ ├── dlopen.c │ ├── dyld.c │ ├── load_add_on.c │ ├── loadlibrary.c │ ├── preopen.c │ └── shl_load.c ├── lt__alloc.c ├── lt__argz.c ├── lt__dirent.c ├── lt__strl.c ├── lt_dlloader.c ├── lt_error.c ├── ltdl.c ├── ltdl.h ├── m4 │ ├── argz.m4 │ ├── libtool.m4 │ ├── ltargz.m4 │ ├── ltdl.m4 │ ├── ltoptions.m4 │ ├── ltsugar.m4 │ ├── ltversion.m4 │ └── lt~obsolete.m4 └── slist.c ├── man ├── Makefile.am ├── Makefile.in ├── cerebro-admin.8.in ├── cerebro-stat.8.in ├── cerebro.7.in ├── cerebro.conf.5.in ├── cerebro_errnum.3 ├── cerebro_event.3 ├── cerebro_event_parse.3 ├── cerebro_event_register.3 ├── cerebro_event_unregister.3 ├── cerebro_flush_metric.3 ├── cerebro_get_event_names.3 ├── cerebro_get_flags.3 ├── cerebro_get_hostname.3 ├── cerebro_get_metric_data.3 ├── cerebro_get_metric_names.3 ├── cerebro_get_port.3 ├── cerebro_get_timeout_len.3 ├── cerebro_handle_create.3 ├── cerebro_handle_destroy.3 ├── cerebro_module.3.in ├── cerebro_module_devel.3.in ├── cerebro_namelist_destroy.3 ├── cerebro_namelist_errnum.3 ├── cerebro_namelist_iterator_at_end.3 ├── cerebro_namelist_iterator_create.3 ├── cerebro_namelist_iterator_destroy.3 ├── cerebro_namelist_iterator_errnum.3 ├── cerebro_namelist_iterator_name.3 ├── cerebro_namelist_iterator_next.3 ├── cerebro_namelist_iterator_reset.3 ├── cerebro_namelist_length.3 ├── cerebro_nodelist_destroy.3 ├── cerebro_nodelist_errnum.3 ├── cerebro_nodelist_iterator_at_end.3 ├── cerebro_nodelist_iterator_create.3 ├── cerebro_nodelist_iterator_destroy.3 ├── cerebro_nodelist_iterator_errnum.3 ├── cerebro_nodelist_iterator_metric_value.3 ├── cerebro_nodelist_iterator_next.3 ├── cerebro_nodelist_iterator_nodename.3 ├── cerebro_nodelist_iterator_reset.3 ├── cerebro_nodelist_length.3 ├── cerebro_nodelist_metric_name.3 ├── cerebro_register_metric.3 ├── cerebro_resend_metric.3 ├── cerebro_set_flags.3 ├── cerebro_set_hostname.3 ├── cerebro_set_port.3 ├── cerebro_set_timeout_len.3 ├── cerebro_strerror.3 ├── cerebro_unregister_metric.3 ├── cerebro_update_metric_value.3 ├── cerebrod.8.in └── libcerebro.3 └── src ├── Makefile.am ├── Makefile.in ├── cerebro-admin ├── Makefile.am ├── Makefile.in └── cerebro-admin.c ├── cerebro-stat ├── Makefile.am ├── Makefile.in └── cerebro-stat.c ├── cerebrod ├── Makefile.am ├── Makefile.in ├── cerebrod.c ├── cerebrod.h ├── cerebrod_config.c ├── cerebrod_config.h ├── cerebrod_daemon.c ├── cerebrod_daemon.h ├── cerebrod_debug.h ├── cerebrod_event_node_timeout_monitor.c ├── cerebrod_event_node_timeout_monitor.h ├── cerebrod_event_server.c ├── cerebrod_event_server.h ├── cerebrod_event_update.c ├── cerebrod_event_update.h ├── cerebrod_listener.c ├── cerebrod_listener.h ├── cerebrod_listener_data.c ├── cerebrod_listener_data.h ├── cerebrod_message.c ├── cerebrod_message.h ├── cerebrod_metric_controller.c ├── cerebrod_metric_controller.h ├── cerebrod_metric_server.c ├── cerebrod_metric_server.h ├── cerebrod_monitor_update.c ├── cerebrod_monitor_update.h ├── cerebrod_speaker.c ├── cerebrod_speaker.h ├── cerebrod_speaker_data.c ├── cerebrod_speaker_data.h ├── cerebrod_util.c └── cerebrod_util.h ├── libs ├── Makefile.am ├── Makefile.in ├── cerebro │ ├── Makefile.am │ ├── Makefile.in │ ├── cerebro.c │ ├── cerebro.map │ ├── cerebro_api.h │ ├── cerebro_config_util.c │ ├── cerebro_config_util.h │ ├── cerebro_event.c │ ├── cerebro_metric_control.c │ ├── cerebro_metric_data.c │ ├── cerebro_metric_names.c │ ├── cerebro_metric_util.c │ ├── cerebro_metric_util.h │ ├── cerebro_namelist.c │ ├── cerebro_namelist_util.c │ ├── cerebro_namelist_util.h │ ├── cerebro_nodelist.c │ ├── cerebro_nodelist_util.c │ ├── cerebro_nodelist_util.h │ ├── cerebro_util.c │ └── cerebro_util.h ├── cerebro_error │ ├── Makefile.am │ ├── Makefile.in │ ├── cerebro_error.c │ └── cerebro_error.map ├── common │ ├── Makefile.am │ ├── Makefile.in │ ├── conffile.c │ ├── conffile.h │ ├── error.c │ ├── error.h │ ├── fd.c │ ├── fd.h │ ├── hash.c │ ├── hash.h │ ├── hostlist.c │ ├── hostlist.h │ ├── list.c │ ├── list.h │ ├── marshall.c │ ├── marshall.h │ ├── thread.c │ ├── thread.h │ ├── vector.c │ └── vector.h ├── debug │ ├── Makefile.am │ ├── Makefile.in │ ├── debug.c │ └── debug.h ├── include │ ├── Makefile.am │ ├── Makefile.in │ ├── cerebro.h │ └── cerebro │ │ ├── cerebro_clusterlist_module.h │ │ ├── cerebro_config.h │ │ ├── cerebro_config_module.h │ │ ├── cerebro_constants.h │ │ ├── cerebro_error.h │ │ ├── cerebro_event_module.h │ │ ├── cerebro_event_protocol.h │ │ ├── cerebro_metric_control_protocol.h.in │ │ ├── cerebro_metric_module.h │ │ ├── cerebro_metric_server_protocol.h │ │ ├── cerebro_monitor_module.h │ │ └── cerebrod_message_protocol.h ├── modules │ ├── Makefile.am │ ├── Makefile.in │ ├── clusterlist_module.c │ ├── clusterlist_module.h │ ├── config_module.c │ ├── config_module.h │ ├── event_module.c │ ├── event_module.h │ ├── metric_module.c │ ├── metric_module.h │ ├── module_util.c │ ├── module_util.h │ ├── monitor_module.c │ └── monitor_module.h ├── util │ ├── Makefile.am │ ├── Makefile.in │ ├── config_util.c │ ├── config_util.h │ ├── data_util.c │ ├── data_util.h │ ├── network_util.c │ └── network_util.h └── wrappers │ ├── Makefile.am │ ├── Makefile.in │ ├── wrappers.c │ ├── wrappers.h │ ├── wrappers_hash.c │ ├── wrappers_hostlist.c │ ├── wrappers_list.c │ ├── wrappers_marshall.c │ └── wrappers_pthread.c └── modules ├── Makefile.am ├── Makefile.in ├── clusterlist ├── Makefile.am ├── Makefile.in ├── cerebro_clusterlist_genders.c ├── cerebro_clusterlist_genders_util.c ├── cerebro_clusterlist_genders_util.h ├── cerebro_clusterlist_hostsfile.c ├── cerebro_clusterlist_util.c ├── cerebro_clusterlist_util.h └── clusterlist.map ├── config ├── Makefile.am ├── Makefile.in └── config.map ├── event ├── Makefile.am ├── Makefile.in ├── cerebro_event_updown.c └── event.map ├── metric ├── Makefile.am ├── Makefile.in ├── cerebro_metric_boottime.c ├── cerebro_metric_bytesin.c ├── cerebro_metric_bytesout.c ├── cerebro_metric_common.c ├── cerebro_metric_common.h ├── cerebro_metric_loadavg.c ├── cerebro_metric_loadavg.h ├── cerebro_metric_loadavg1.c ├── cerebro_metric_loadavg15.c ├── cerebro_metric_loadavg5.c ├── cerebro_metric_memfree.c ├── cerebro_metric_memory.c ├── cerebro_metric_memory.h ├── cerebro_metric_memtotal.c ├── cerebro_metric_memused.c ├── cerebro_metric_network.c ├── cerebro_metric_network.h ├── cerebro_metric_packetsin.c ├── cerebro_metric_packetsout.c ├── cerebro_metric_rxerrs.c ├── cerebro_metric_shutdown.c ├── cerebro_metric_slurm_state.c ├── cerebro_metric_swapfree.c ├── cerebro_metric_swaptotal.c ├── cerebro_metric_swapused.c ├── cerebro_metric_txerrs.c └── metric.map └── monitor ├── Makefile.am ├── Makefile.in └── monitor.map /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: build CI 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-22.04 12 | steps: 13 | - uses: actions/checkout@v2 14 | - name: configure 15 | run: ./configure 16 | - name: make 17 | run: make 18 | - name: make dist 19 | run: make dist 20 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Albert Chu 2 | -------------------------------------------------------------------------------- /DISCLAIMER: -------------------------------------------------------------------------------- 1 | This work was produced at the Lawrence Livermore National Laboratory 2 | (LLNL) under Contract No. DE-AC52-07NA27344 (Contract 44) between 3 | the U.S. Department of Energy (DOE) and Lawrence Livermore National 4 | Security, LLC (LLNS) for the operation of LLNL. 5 | 6 | This work was prepared as an account of work sponsored by an agency of 7 | the United States Government. Neither the United States Government nor 8 | Lawrence Livermore National Security, LLC nor any of their employees, 9 | makes any warranty, express or implied, or assumes any liability or 10 | responsibility for the accuracy, completeness, or usefulness of any 11 | information, apparatus, product, or process disclosed, or represents 12 | that its use would not infringe privately-owned rights. 13 | 14 | Reference herein to any specific commercial products, process, or 15 | services by trade name, trademark, manufacturer or otherwise does 16 | not necessarily constitute or imply its endorsement, recommendation, 17 | or favoring by the United States Government or Lawrence Livermore 18 | National Security, LLC. The views and opinions of authors expressed 19 | herein do not necessarily state or reflect those of the Untied States 20 | Government or Lawrence Livermore National Security, LLC, and shall 21 | not be used for advertising or product endorsement purposes. 22 | 23 | The precise terms and conditions for copying, distribution, and 24 | modification are specified in the file "COPYING". 25 | -------------------------------------------------------------------------------- /DISCLAIMER.UC: -------------------------------------------------------------------------------- 1 | Copyright (C) 2005-2007 The Regents of the University of California. 2 | Produced at Lawrence Livermore National Laboratory. 3 | Written by Albert Chu . 4 | UCRL-CODE-155989 All rights reserved. 5 | 6 | This file is part of Cerebro, a collection of cluster monitoring tools 7 | and libraries. For details, see . 8 | 9 | Cerebro is free software; you can redistribute it and/or modify it under 10 | the terms of the GNU General Public License as published by the Free 11 | Software Foundation; either version 2 of the License, or (at your option) 12 | any later version. 13 | 14 | Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 15 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 16 | FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 17 | details. 18 | 19 | You should have received a copy of the GNU General Public License along 20 | with Cerebro; if not, write to the Free Software Foundation, Inc., 21 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 22 | 23 | This notice is required to be provided under our contract with the U.S. 24 | Department of Energy (DOE). This work was produced at the University 25 | of California, Lawrence Livermore National Laboratory under Contract 26 | No. W-7405-ENG-48 with the DOE. 27 | 28 | Neither the United States Government nor the University of California 29 | nor any of their employees, makes any warranty, express or implied, or 30 | assumes any liability or responsibility for the accuracy, completeness, 31 | or usefulness of any information, apparatus, product, or process 32 | disclosed, or represents that its use would not infringe 33 | privately-owned rights. 34 | 35 | Also, reference herein to any specific commercial products, process, or 36 | services by trade name, trademark, manufacturer or otherwise does not 37 | necessarily constitute or imply its endorsement, recommendation, or 38 | favoring by the United States Government or the University of 39 | California. The views and opinions of authors expressed herein do not 40 | necessarily state or reflect those of the United States Government or 41 | the University of California, and shall not be used for advertising or 42 | product endorsement purposes. 43 | 44 | The precise terms and conditions for copying, distribution and 45 | modification are specified in the file "COPYING". 46 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: Makefile.am,v 1.7 2007-10-17 20:05:45 chu11 Exp $ 3 | ##***************************************************************************** 4 | ## Process this file with automake to produce Makefile.in. 5 | ##***************************************************************************** 6 | 7 | if !WITH_STATIC_MODULES 8 | LTDL_DIRS = libltdl 9 | endif 10 | 11 | install-data-local: 12 | $(top_srcdir)/config/install-sh -m 755 -d \ 13 | $(DESTDIR)$(localstatedir)/run 14 | $(top_srcdir)/config/install-sh -m 755 -d \ 15 | $(DESTDIR)$(localstatedir)/run/cerebro 16 | 17 | SUBDIRS = $(LTDL_DIRS) etc man src 18 | 19 | EXTRA_DIST = autogen.sh DISCLAIMER DISCLAIMER.UC cerebro.spec.in cerebro.spec 20 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Cerebro is a collection of cluster monitoring tools and libraries. 2 | This project has been named after a part of the central nervous system 3 | to pay homage to the the Ganglia project 4 | (http://ganglia.sourceforge.net). 5 | 6 | A heavily modified version of Ganglia was once used at Lawrence 7 | Livermore National Laboratory, but as needs and demands changed, it 8 | became necessary to develop a slightly different tool. 9 | 10 | Several of goals of Cerebro were to develop a monitoring tool that: 11 | 12 | - Interrupt the CPU less frequently (fixed in newer Ganglias). 13 | 14 | - Provide the user with a set of libraries, command-line tools, and a 15 | dynamic module interface that allow users to monitor new metrics 16 | without any re-compilation or configuration changes. 17 | 18 | - Provide a dynamic module interface that allows individual clusters to 19 | monitor different metrics based solely on the modules installed. 20 | 21 | - Provide a dynamic module interface which allows the libraries and 22 | tools to have knowledge of every node in the cluster. 23 | 24 | - Provide a dynamic module interface which allows the libraries and 25 | tools to automatically configure itself across a cluster. 26 | 27 | - Define what nodes exist within a cluster. 28 | 29 | - Remove XML overhead. 30 | 31 | At this point in time, the Cerebro project should not be mistaken for 32 | a full host monitoring system like Ganglia or Supermon, although it 33 | one day may be. 34 | 35 | Future development goals include: 36 | 37 | - Security/access control features 38 | 39 | - Confined listening configuration. 40 | 41 | In order to install Cerebro, only the primary RPM (cerebro) need be 42 | installed. However, additional features of Cerebro can be taken 43 | advantage of by installing a clusterlist module (cerebro-clusterlist) 44 | which allows Cerebro to recognize the hosts in the current cluster. 45 | 46 | The current clusterlist database formats supported are: 47 | 48 | Genders - Uses a genders database and the genders library to determine 49 | all nodes in the cluster. (http://sourceforge.net/projects/genders) 50 | 51 | Hostsfile - Uses a file that lists the hostname of every node in the 52 | cluster on a separate line. 53 | 54 | In addition, other modules can be installed for cluster configuration 55 | (cerebro-config), metric monitoring (cerebro-metric), or metric 56 | logging (cerebro-monitor). 57 | 58 | The following metric modules are currently publicly distributed: 59 | 60 | boottime - Monitor cluster node boottimes. 61 | 62 | shutdown - Monitor when nodes are shutdown gracefully 63 | 64 | bytesin, bytesout, packetsin, packetsout, rxerrs, txerrs - Monitor network usage 65 | 66 | memtotal, memused, memfree, swaptotal, swapused, swapfree - Monitor memory usage 67 | 68 | loadavg1, loadavg5, loadavg15 - Monitor load 69 | 70 | Albert Chu 71 | chu11@llnl.gov 72 | Lawrence Livermore National Laboratories 73 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Cerebro is a collection of cluster monitoring tools and libraries. 2 | This project has been named after a part of the central nervous system 3 | to pay homage to the Ganglia project 4 | (http://ganglia.sourceforge.net). 5 | -------------------------------------------------------------------------------- /ROADMAP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaos/cerebro/7dca6843c042656f6673bfa6728d59b44590dc79/ROADMAP -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | Portability 2 | - IPv6 3 | - Multicast 4 | 5 | Future Features 6 | - controller 7 | - allow access through netowrk? 8 | - limit host connections based on host list or subnet 9 | - user/password limited access? 10 | - munge based access? 11 | 12 | - controller/access rights 13 | - need some security stuff 14 | 15 | - listener 16 | - limit data receiving based on host list or subnet 17 | - allow mixed listening 18 | i.e. accept heartbeats from nodes in genders database and 19 | nodes on a specific subnet. Would be useful for BGL. 20 | 21 | - Malloc looping 22 | - so can try to avoid dieing on low memory conditions 23 | (i.e. before the linux oom killer finishes its job) 24 | 25 | - iterate through all config modules, exit after one succeeds. If 26 | none succeed, use default. 27 | 28 | Enhancements 29 | - Should pass config to modules so they can configure/setup 30 | based on various conditions. 31 | - need way to send functions/pointers/etc. stuff between modules 32 | without keeping on adding functions. 33 | - logging/error output/something facility for modules 34 | 35 | Reducements? 36 | - remove genders config module? Too much at the end of the day. 37 | 38 | Module Extra Stuff 39 | - signal or polling to see if there are new modules to load 40 | - retry loading of previously failed modules 41 | - metric 42 | - monitoring 43 | - event 44 | - don't fail if mysql connection fails in monitoring modules 45 | - support exclude option on all modules 46 | 47 | TCP connections instead of UDP for metric monitoring 48 | 49 | extra tag mechanism 50 | - add extra tag/mark/key mechanism to differentiate same metric name 51 | from same node. 52 | 53 | preserve stats across cerebro restart 54 | - to allow more HA like services to exist 55 | - i.e. trent's idea to have cerebro monitor things so nodes no to 56 | auto-config/auto-restart/etc. 57 | 58 | synchronize heartbeats 59 | - perhaps on exact time schedule 60 | 61 | Specs: 62 | - cerebro.spec.in - find better way to do restarts 63 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ## 3 | # $Id: autogen.sh,v 1.1.1.1 2004-07-02 22:31:29 achu Exp $ 4 | ## 5 | 6 | echo "running aclocal ... " 7 | aclocal -I config 8 | echo "running libtoolize ... " 9 | libtoolize --automake --copy --force 10 | echo "running autoheader ... " 11 | autoheader 12 | echo "running automake ... " 13 | automake --copy --add-missing 14 | echo "running autoconf ... " 15 | autoconf 16 | echo "now run ./configure to configure cerebro for your environment." 17 | -------------------------------------------------------------------------------- /config/ac_boottime.m4: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: ac_boottime.m4,v 1.3 2005-08-23 21:10:14 achu Exp $ 3 | ##***************************************************************************** 4 | 5 | AC_DEFUN([AC_BOOTTIME], 6 | [ 7 | AC_MSG_CHECKING([for whether to build boottime module]) 8 | AC_ARG_WITH([boottime], 9 | AS_HELP_STRING([--with-boottime], [Build boottime modules]), 10 | [ case "$withval" in 11 | no) ac_boottime_test=no ;; 12 | yes) ac_boottime_test=yes ;; 13 | *) ac_boottime_test=yes ;; 14 | esac 15 | ] 16 | ) 17 | AC_MSG_RESULT([${ac_boottime_test=yes}]) 18 | 19 | if test "$ac_boottime_test" = "yes"; then 20 | AC_DEFINE([WITH_BOOTTIME], [1], [Define if you want the boottime module.]) 21 | MANPAGE_BOOTTIME=1 22 | ac_with_boottime=yes 23 | else 24 | MANPAGE_BOOTTIME=0 25 | ac_with_boottime=no 26 | fi 27 | 28 | AC_SUBST(MANPAGE_BOOTTIME) 29 | ]) 30 | -------------------------------------------------------------------------------- /config/ac_cerebro_config_file.m4: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: ac_cerebro_config_file.m4,v 1.3 2005-07-18 21:45:28 achu Exp $ 3 | ##***************************************************************************** 4 | 5 | AC_DEFUN([AC_CEREBRO_CONFIG_FILE], 6 | [ 7 | CEREBRO_CONFIG_FILE_DEFAULT=/etc/cerebro.conf 8 | 9 | AC_MSG_CHECKING([for cerebro config file default path]) 10 | AC_ARG_WITH([cerebro-config-file], 11 | AS_HELP_STRING([--with-cerebro-config-file=PATH], 12 | [Specify default cerebro config file path]), 13 | [ case "$withval" in 14 | no) ;; 15 | yes) ;; 16 | *) CEREBRO_CONFIG_FILE_DEFAULT=$withval 17 | esac 18 | ] 19 | ) 20 | AC_MSG_RESULT($CEREBRO_CONFIG_FILE_DEFAULT) 21 | 22 | AC_DEFINE_UNQUOTED([CEREBRO_CONFIG_FILE_DEFAULT], 23 | ["$CEREBRO_CONFIG_FILE_DEFAULT"], 24 | [Define default cerebro config_file.]) 25 | AC_SUBST(CEREBRO_CONFIG_FILE_DEFAULT) 26 | ]) 27 | -------------------------------------------------------------------------------- /config/ac_cerebro_metric_control_path.m4: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: ac_cerebro_metric_control_path.m4,v 1.2 2007-10-05 16:44:43 chu11 Exp $ 3 | ##***************************************************************************** 4 | 5 | AC_DEFUN([AC_CEREBRO_METRIC_CONTROL_PATH], 6 | [ 7 | if test "$ac_debug" = "yes"; then 8 | METRIC_CONTROL_PATH="\"/tmp/cerebro_metric_control\"" 9 | else 10 | # Must expand nested unquoting 11 | METRIC_CONTROL_PATH_TMP1="`eval echo ${localstatedir}/run/cerebro_metric_control`" 12 | METRIC_CONTROL_PATH_TMP2="`echo $METRIC_CONTROL_PATH_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" 13 | METRIC_CONTROL_PATH_TMP3="`eval echo $METRIC_CONTROL_PATH_TMP2`" 14 | METRIC_CONTROL_PATH="\"$METRIC_CONTROL_PATH_TMP3\"" 15 | fi 16 | 17 | AC_MSG_CHECKING([for the metric control path]) 18 | AC_ARG_WITH([metric-control-path], 19 | AS_HELP_STRING([--with-metric-control-path], 20 | [Define metric control path]), 21 | [ case "$withval" in 22 | no) ;; 23 | yes) ;; 24 | *) METRIC_CONTROL_PATH="\"$withval\"" ;; 25 | esac 26 | ] 27 | ) 28 | AC_MSG_RESULT($METRIC_CONTROL_PATH) 29 | 30 | AC_SUBST(METRIC_CONTROL_PATH) 31 | ]) 32 | 33 | -------------------------------------------------------------------------------- /config/ac_cerebro_module_dir.m4: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: ac_cerebro_module_dir.m4,v 1.4 2006-07-27 02:39:27 chu11 Exp $ 3 | ##***************************************************************************** 4 | 5 | AC_DEFUN([AC_CEREBRO_MODULE_DIR], 6 | [ 7 | if echo ${libdir} | grep 'lib64'; then 8 | LIBDIRTYPE=lib64 9 | else 10 | LIBDIRTYPE=lib 11 | fi 12 | 13 | if test "$prefix" = "NONE"; then 14 | CEREBRO_MODULE_DIR=${ac_default_prefix}/$LIBDIRTYPE/cerebro 15 | else 16 | CEREBRO_MODULE_DIR=${prefix}/$LIBDIRTYPE/cerebro 17 | fi 18 | 19 | AC_DEFINE_UNQUOTED([CEREBRO_MODULE_DIR], 20 | ["$CEREBRO_MODULE_DIR"], 21 | [Define default cerebro module dir]) 22 | AC_SUBST(CEREBRO_MODULE_DIR) 23 | ]) 24 | -------------------------------------------------------------------------------- /config/ac_cerebrod_speaker_only.m4: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: ac_cerebrod_speaker_only.m4,v 1.2 2005-08-25 01:44:21 achu Exp $ 3 | ##***************************************************************************** 4 | 5 | AC_DEFUN([AC_CEREBROD_SPEAKER_ONLY], 6 | [ 7 | AC_MSG_CHECKING([for whether to build cerebrod with only speaker functionality]) 8 | AC_ARG_WITH([cerebrod-speaker-only], 9 | AS_HELP_STRING([--with-cerebrod-speaker-only], [Build only speaker functionality into cerebrod]), 10 | [ case "$withval" in 11 | no) ac_cerebrod_speaker_only_test=no ;; 12 | yes) ac_cerebrod_speaker_only_test=yes ;; 13 | *) AC_MSG_ERROR([bad value "$withval" for --with-low-memory]) ;; 14 | esac 15 | ] 16 | ) 17 | AC_MSG_RESULT([${ac_cerebrod_speaker_only_test=no}]) 18 | 19 | if test "$ac_cerebrod_speaker_only_test" = "yes"; then 20 | AC_DEFINE([WITH_CEREBROD_SPEAKER_ONLY], [1], [Define if you want to build cerebrod with the speaker only]) 21 | ac_with_cerebrod_speaker_only=yes 22 | else 23 | ac_with_cerebrod_speaker_only=no 24 | fi 25 | ]) 26 | 27 | AC_DEFUN([AC_CEREBROD_NO_THREADS], 28 | [ 29 | AC_MSG_CHECKING([for whether to build cerebrod with no threads (requires --with-cerebrod-speaker-only]) 30 | AC_ARG_WITH([cerebrod-no-threads], 31 | AS_HELP_STRING([--with-cerebrod-no-threads], [Build no threads into cerebrod (requires --with-cerebrod-speaker-only]), 32 | [ case "$withval" in 33 | no) ac_cerebrod_no_threads_test=no ;; 34 | yes) ac_cerebrod_no_threads_test=yes ;; 35 | *) AC_MSG_ERROR([bad value "$withval" for --with-low-memory]) ;; 36 | esac 37 | ] 38 | ) 39 | AC_MSG_RESULT([${ac_cerebrod_no_threads_test=no}]) 40 | 41 | if test "$ac_with_cerebrod_speaker_only" = "yes" && 42 | test "$ac_cerebrod_no_threads_test" = "yes"; then 43 | AC_DEFINE([WITH_CEREBROD_NO_THREADS], [1], [Define if you want to build cerebrod with no threads (requires --with-cerebrod-speaker-only)]) 44 | ac_with_cerebrod_no_threads=yes 45 | else 46 | ac_with_cerebrod_no_threads=no 47 | fi 48 | ]) 49 | -------------------------------------------------------------------------------- /config/ac_debug.m4: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: ac_debug.m4,v 1.3 2005-05-09 16:02:11 achu Exp $ 3 | ##***************************************************************************** 4 | # AUTHOR: 5 | # Chris Dunlap 6 | # 7 | # SYNOPSIS: 8 | # AC_DEBUG 9 | # 10 | # DESCRIPTION: 11 | # Adds support for the "--enable-debug" configure script option. 12 | # If CFLAGS are not passed to configure, they will be set based 13 | # on whether debugging has been enabled. Also, the NDEBUG macro 14 | # (used by assert) will be set accordingly. 15 | # 16 | # WARNINGS: 17 | # This macro must be placed after AC_PROG_CC or equivalent. 18 | ##***************************************************************************** 19 | 20 | AC_DEFUN([AC_DEBUG], 21 | [ 22 | AC_MSG_CHECKING([whether debugging is enabled]) 23 | AC_ARG_ENABLE([debug], 24 | AS_HELP_STRING([--enable-debug], [enable debugging code for development]), 25 | [ case "$enableval" in 26 | yes) ac_debug=yes ;; 27 | no) ac_debug=no ;; 28 | *) AC_MSG_RESULT([doh!]) 29 | AC_MSG_ERROR([bad value "$enableval" for --enable-debug]) ;; 30 | esac 31 | ] 32 | ) 33 | if test "$ac_debug" = yes; then 34 | if test -z "$ac_save_CFLAGS"; then 35 | test "$ac_cv_prog_cc_g" = yes && CFLAGS="-g -Werror-implicit-function-declaration" 36 | test "$GCC" = yes && CFLAGS="$CFLAGS -Wall" 37 | fi 38 | AC_DEFINE([CEREBRO_DEBUG], [1], [Define to 1 for Cerebro debugging]) 39 | MANPAGE_DEBUG=1 40 | else 41 | if test -z "$ac_save_CFLAGS"; then 42 | test "$GCC" = yes && CFLAGS="-O3 -Wall -fno-strict-aliasing" || CFLAGS="-O3" 43 | LDFLAGS="${LDFLAGS--s}" 44 | fi 45 | AC_DEFINE([NDEBUG], [1], 46 | [Define to 1 if you are building a production release.]) 47 | MANPAGE_DEBUG=0 48 | fi 49 | AC_SUBST(MANPAGE_DEBUG) 50 | AC_MSG_RESULT([${ac_debug=no}]) 51 | ]) 52 | -------------------------------------------------------------------------------- /config/ac_genders.m4: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: ac_genders.m4,v 1.6 2005-05-10 22:39:40 achu Exp $ 3 | ##***************************************************************************** 4 | 5 | AC_DEFUN([AC_GENDERS], 6 | [ 7 | AC_MSG_CHECKING([for whether to build genders modules]) 8 | AC_ARG_WITH([genders], 9 | AS_HELP_STRING([--with-genders], [Build genders modules]), 10 | [ case "$withval" in 11 | no) ac_genders_test=no ;; 12 | yes) ac_genders_test=yes ;; 13 | *) AC_MSG_ERROR([bad value "$withval" for --with-genders]) ;; 14 | esac 15 | ] 16 | ) 17 | AC_MSG_RESULT([${ac_genders_test=yes}]) 18 | 19 | if test "$ac_genders_test" = "yes"; then 20 | AC_CHECK_LIB([genders], [genders_handle_create], [ac_have_genders=yes], []) 21 | fi 22 | 23 | if test "$ac_have_genders" = "yes"; then 24 | AC_DEFINE([WITH_GENDERS], [1], [Define if you have genders.]) 25 | GENDERS_LIBS="-lgenders" 26 | MANPAGE_GENDERS=1 27 | ac_with_genders=yes 28 | else 29 | MANPAGE_GENDERS=0 30 | ac_with_genders=no 31 | fi 32 | 33 | AC_SUBST(GENDERS_LIBS) 34 | AC_SUBST(MANPAGE_GENDERS) 35 | ]) 36 | -------------------------------------------------------------------------------- /config/ac_hostsfile.m4: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: ac_hostsfile.m4,v 1.7 2005-07-18 21:45:28 achu Exp $ 3 | ##***************************************************************************** 4 | 5 | AC_DEFUN([AC_HOSTSFILE], 6 | [ 7 | AC_MSG_CHECKING([for whether to build hostsfile module]) 8 | AC_ARG_WITH([hostsfile], 9 | AS_HELP_STRING([--with-hostsfile], [Build hostsfile modules]), 10 | [ case "$withval" in 11 | no) ac_hostsfile_test=no ;; 12 | yes) ac_hostsfile_test=yes ;; 13 | *) ac_hostsfile_test=yes ;; 14 | esac 15 | ] 16 | ) 17 | AC_MSG_RESULT([${ac_hostsfile_test=yes}]) 18 | 19 | if test "$ac_hostsfile_test" = "yes"; then 20 | MANPAGE_HOSTSFILE=1 21 | ac_with_hostsfile=yes 22 | else 23 | MANPAGE_HOSTSFILE=0 24 | ac_with_hostsfile=no 25 | fi 26 | 27 | AC_SUBST(MANPAGE_HOSTSFILE) 28 | ]) 29 | 30 | AC_DEFUN([AC_HOSTSFILE_PATH], 31 | [ 32 | CEREBRO_CLUSTERLIST_HOSTSFILE_DEFAULT=/etc/hostsfile 33 | 34 | AC_MSG_CHECKING([for default hostsfile path]) 35 | AC_ARG_WITH([hostsfile-path], 36 | AS_HELP_STRING([--with-hostsfile-path=PATH], 37 | [Specify default hostsfile clusterlist path]), 38 | [ case "$withval" in 39 | no) ;; 40 | yes) ;; 41 | *) CEREBRO_CLUSTERLIST_HOSTSFILE_DEFAULT=$withval ;; 42 | esac 43 | ] 44 | ) 45 | AC_MSG_RESULT($CEREBRO_CLUSTERLIST_HOSTSFILE_DEFAULT) 46 | 47 | AC_DEFINE_UNQUOTED([CEREBRO_CLUSTERLIST_HOSTSFILE_DEFAULT], 48 | ["$CEREBRO_CLUSTERLIST_HOSTSFILE_DEFAULT"], 49 | [Define default hostsfile clusterlist.]) 50 | AC_SUBST(CEREBRO_CLUSTERLIST_HOSTSFILE_DEFAULT) 51 | ]) 52 | -------------------------------------------------------------------------------- /config/ac_ipv6.m4: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: ac_ipv6.m4,v 1.1 2004-07-12 15:15:02 achu Exp $ 3 | ##***************************************************************************** 4 | # AUTHOR: 5 | # Albert Chu 6 | # 7 | # SYNOPSIS: 8 | # AC_IPV6 9 | # 10 | # DESCRIPTION: 11 | # Check for IPv6 12 | # 13 | # WARNINGS: 14 | # This macro must be placed after AC_PROG_CC or equivalent. 15 | ##***************************************************************************** 16 | 17 | AC_DEFUN([AC_IPV6], 18 | [ 19 | # IEEE standard says it should be in sys/socket.h 20 | AC_CHECK_DECL([AF_INET6], 21 | AC_DEFINE(HAVE_IPV6,1,[have IPv6]),, 22 | [#include ]) 23 | ]) 24 | -------------------------------------------------------------------------------- /config/ac_loadavg.m4: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: ac_loadavg.m4,v 1.1 2006-08-25 16:11:25 chu11 Exp $ 3 | ##***************************************************************************** 4 | 5 | AC_DEFUN([AC_LOADAVG], 6 | [ 7 | AC_MSG_CHECKING([for whether to build loadavg modules]) 8 | AC_ARG_WITH([loadavg], 9 | AS_HELP_STRING([--with-loadavg], [Build loadavg modules]), 10 | [ case "$withval" in 11 | no) ac_loadavg_test=no ;; 12 | yes) ac_loadavg_test=yes ;; 13 | *) ac_loadavg_test=yes ;; 14 | esac 15 | ] 16 | ) 17 | AC_MSG_RESULT([${ac_loadavg_test=yes}]) 18 | 19 | if test "$ac_loadavg_test" = "yes"; then 20 | AC_DEFINE([WITH_LOADAVG], [1], [Define if you want the loadavg module.]) 21 | MANPAGE_LOADAVG=1 22 | ac_with_loadavg=yes 23 | else 24 | MANPAGE_LOADAVG=0 25 | ac_with_loadavg=no 26 | fi 27 | 28 | AC_SUBST(MANPAGE_LOADAVG) 29 | ]) 30 | -------------------------------------------------------------------------------- /config/ac_memory.m4: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: ac_memory.m4,v 1.1 2006-08-26 16:06:55 chu11 Exp $ 3 | ##***************************************************************************** 4 | 5 | AC_DEFUN([AC_MEMORY], 6 | [ 7 | AC_MSG_CHECKING([for whether to build memory modules]) 8 | AC_ARG_WITH([memory], 9 | AS_HELP_STRING([--with-memory], [Build memory modules]), 10 | [ case "$withval" in 11 | no) ac_memory_test=no ;; 12 | yes) ac_memory_test=yes ;; 13 | *) ac_memory_test=yes ;; 14 | esac 15 | ] 16 | ) 17 | AC_MSG_RESULT([${ac_memory_test=yes}]) 18 | 19 | if test "$ac_memory_test" = "yes"; then 20 | AC_DEFINE([WITH_MEMORY], [1], [Define if you want the memory module.]) 21 | MANPAGE_MEMORY=1 22 | ac_with_memory=yes 23 | else 24 | MANPAGE_MEMORY=0 25 | ac_with_memory=no 26 | fi 27 | 28 | AC_SUBST(MANPAGE_MEMORY) 29 | ]) 30 | -------------------------------------------------------------------------------- /config/ac_network.m4: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: ac_network.m4,v 1.1 2006-08-27 22:03:32 chu11 Exp $ 3 | ##***************************************************************************** 4 | 5 | AC_DEFUN([AC_NETWORK], 6 | [ 7 | AC_MSG_CHECKING([for whether to build network modules]) 8 | AC_ARG_WITH([network], 9 | AS_HELP_STRING([--with-network], [Build network modules]), 10 | [ case "$withval" in 11 | no) ac_network_test=no ;; 12 | yes) ac_network_test=yes ;; 13 | *) ac_network_test=yes ;; 14 | esac 15 | ] 16 | ) 17 | AC_MSG_RESULT([${ac_network_test=yes}]) 18 | 19 | if test "$ac_network_test" = "yes"; then 20 | AC_DEFINE([WITH_NETWORK], [1], [Define if you want the network modules.]) 21 | MANPAGE_NETWORK=1 22 | ac_with_network=yes 23 | else 24 | MANPAGE_NETWORK=0 25 | ac_with_network=no 26 | fi 27 | 28 | AC_SUBST(MANPAGE_NETWORK) 29 | ]) 30 | -------------------------------------------------------------------------------- /config/ac_shutdown.m4: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: ac_shutdown.m4,v 1.2 2006-03-01 00:25:20 chu11 Exp $ 3 | ##***************************************************************************** 4 | 5 | AC_DEFUN([AC_SHUTDOWN], 6 | [ 7 | AC_MSG_CHECKING([for whether to build shutdown module]) 8 | AC_ARG_WITH([shutdown], 9 | AS_HELP_STRING([--with-shutdown], [Build shutdown module]), 10 | [ case "$withval" in 11 | no) ac_shutdown_test=no ;; 12 | yes) ac_shutdown_test=yes ;; 13 | *) ac_shutdown_test=yes ;; 14 | esac 15 | ] 16 | ) 17 | AC_MSG_RESULT([${ac_shutdown_test=yes}]) 18 | 19 | if test "$ac_shutdown_test" = "yes"; then 20 | AC_DEFINE([WITH_SHUTDOWN], [1], [Define if you want the shutdown module.]) 21 | MANPAGE_SHUTDOWN=1 22 | ac_with_shutdown=yes 23 | else 24 | MANPAGE_SHUTDOWN=0 25 | ac_with_shutdown=no 26 | fi 27 | 28 | AC_SUBST(MANPAGE_SHUTDOWN) 29 | ]) 30 | -------------------------------------------------------------------------------- /config/ac_slurm_state.m4: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: ac_slurm_state.m4,v 1.4 2005-08-23 21:10:14 achu Exp $ 3 | ##***************************************************************************** 4 | 5 | AC_DEFUN([AC_SLURM_STATE], 6 | [ 7 | AC_MSG_CHECKING([for whether to build slurm state module]) 8 | AC_ARG_WITH([slurm-state], 9 | AS_HELP_STRING([--with-slurm-state], [Build slurm state module]), 10 | [ case "$withval" in 11 | no) ac_slurm_state_test=no ;; 12 | yes) ac_slurm_state_test=yes ;; 13 | *) ac_slurm_state_test=yes ;; 14 | esac 15 | ] 16 | ) 17 | AC_MSG_RESULT([${ac_slurm_state_test=yes}]) 18 | 19 | if test "$ac_slurm_state_test" = "yes"; then 20 | AC_DEFINE([WITH_SLURM_STATE], [1], [Define if you want the slurm_state module.]) 21 | MANPAGE_SLURM_STATE=1 22 | ac_with_slurm_state=yes 23 | else 24 | MANPAGE_SLURM_STATE=0 25 | ac_with_slurm_state=no 26 | fi 27 | 28 | AC_SUBST(MANPAGE_SLURM_STATE) 29 | ]) 30 | 31 | AC_DEFUN([AC_SLURM_STATE_CONTROL_PATH], 32 | [ 33 | if test "$ac_debug" = "yes"; then 34 | SLURM_STATE_CONTROL_PATH="/tmp/cerebro_metric_slurm_state" 35 | else 36 | SLURM_STATE_CONTROL_PATH="$CEREBRO_MODULE_DIR/cerebro_metric_slurm_state" 37 | fi 38 | 39 | AC_MSG_CHECKING([for the slurm state control path]) 40 | AC_ARG_WITH([slurm-state-control-path], 41 | AS_HELP_STRING([--with-slurm-state-control-path], 42 | [Define slurm state control path]), 43 | [ case "$withval" in 44 | no) ;; 45 | yes) ;; 46 | *) SLURM_STATE_CONTROL_PATH=$withval ;; 47 | esac 48 | ] 49 | ) 50 | AC_MSG_RESULT($SLURM_STATE_CONTROL_PATH) 51 | 52 | AC_DEFINE_UNQUOTED([SLURM_STATE_CONTROL_PATH], 53 | ["$SLURM_STATE_CONTROL_PATH"], 54 | [Define default slurm state control path]) 55 | AC_SUBST(SLURM_STATE_CONTROL_PATH) 56 | ]) 57 | 58 | -------------------------------------------------------------------------------- /config/ac_static_modules.m4: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: ac_static_modules.m4,v 1.4 2005-08-23 21:10:14 achu Exp $ 3 | ##***************************************************************************** 4 | 5 | AC_DEFUN([AC_STATIC_MODULES], 6 | [ 7 | AC_MSG_CHECKING([for static module compilation]) 8 | AC_ARG_ENABLE([static-modules], 9 | AS_HELP_STRING([--enable-static-modules], [enable build with static modules]), 10 | [ case "$enableval" in 11 | yes) ac_with_static_modules=yes ;; 12 | no) ac_with_static_modules=no ;; 13 | *) AC_MSG_ERROR([bad value "$enableval" for --enable-static-modules]) ;; 14 | esac 15 | ] 16 | ) 17 | AC_MSG_RESULT([${ac_with_static_modules=no}]) 18 | 19 | if test "$ac_with_static_modules" = "yes"; then 20 | AC_DEFINE([WITH_STATIC_MODULES], [1], [Define if builing with static modules]) 21 | MANPAGE_STATIC_MODULES=1 22 | else 23 | MANPAGE_STATIC_MODULES=0 24 | fi 25 | 26 | AC_SUBST(WITH_STATIC_MODULES) 27 | AC_SUBST(MANPAGE_STATIC_MODULES) 28 | ]) 29 | -------------------------------------------------------------------------------- /config/ac_struct_sa_len.m4: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: ac_struct_sa_len.m4,v 1.1 2004-07-12 15:15:02 achu Exp $ 3 | ##***************************************************************************** 4 | # AUTHOR: 5 | # Albert Chu 6 | # 7 | # SYNOPSIS: 8 | # AC_STRUCT_SA_LEN 9 | # 10 | # DESCRIPTION: 11 | # Check for sa_len variable in struct sockaddr_in 12 | # 13 | # WARNINGS: 14 | # This macro must be placed after AC_PROG_CC or equivalent. 15 | ##***************************************************************************** 16 | 17 | # Found online, original author not known 18 | AC_DEFUN([AC_STRUCT_SA_LEN], 19 | [ 20 | AC_CACHE_CHECK([for sa_len in struct sockaddr], ac_cv_struct_sa_len, 21 | AC_TRY_COMPILE([#include #include ], 22 | [struct sockaddr s; s.sa_len;], 23 | ac_cv_struct_sa_len=yes, 24 | ac_cv_struct_sa_len=no)) 25 | 26 | if test $ac_cv_struct_sa_len = yes; then 27 | AC_DEFINE(HAVE_SA_LEN, [1], [do we have sa_len in struct sockaddr]) 28 | fi 29 | ]) 30 | -------------------------------------------------------------------------------- /config/ac_updown_event.m4: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: ac_updown_event.m4,v 1.4 2006-12-19 23:00:57 chu11 Exp $ 3 | ##***************************************************************************** 4 | 5 | AC_DEFUN([AC_UPDOWN], 6 | [ 7 | AC_MSG_CHECKING([for whether to build updown event module]) 8 | AC_ARG_WITH([updown], 9 | AS_HELP_STRING([--with-updown], [Build updown event module]), 10 | [ case "$withval" in 11 | no) ac_updown_test=no ;; 12 | yes) ac_updown_test=yes ;; 13 | *) ac_updown_test=yes ;; 14 | esac 15 | ] 16 | ) 17 | AC_MSG_RESULT([${ac_updown_test=yes}]) 18 | 19 | if test "$ac_updown_test" = "yes"; then 20 | AC_DEFINE([WITH_UPDOWN], [1], [Define if you want the updown module.]) 21 | MANPAGE_UPDOWN=1 22 | ac_with_updown=yes 23 | else 24 | MANPAGE_UPDOWN=0 25 | ac_with_updown=no 26 | fi 27 | 28 | AC_SUBST(MANPAGE_UPDOWN) 29 | ]) 30 | -------------------------------------------------------------------------------- /config/systemd.m4: -------------------------------------------------------------------------------- 1 | dnl Probe for systemd libraries and installation paths. 2 | dnl 3 | dnl Provides the RRA_WITH_SYSTEMD_UNITDIR macro, which adds the 4 | dnl --with-systemdsystemunitdir configure flag, sets the systemdsystemunitdir 5 | dnl substitution variable, and provides the HAVE_SYSTEMD Automake conditional 6 | dnl to use to control whether to install unit files. 7 | dnl 8 | dnl Provides the RRA_LIB_SYSTEMD_DAEMON_OPTIONAL macro, which sets 9 | dnl SYSTEMD_CFLAGS and SYSTEMD_LIBS substitution variables if 10 | dnl libsystemd-daemon is available and defines HAVE_SD_NOTIFY. pkg-config 11 | dnl support for libsystemd-daemon is required for it to be detected. 12 | dnl 13 | dnl Depends on the Autoconf macros that come with pkg-config. 14 | dnl 15 | dnl The canonical version of this file is maintained in the rra-c-util 16 | dnl package, available at . 17 | dnl 18 | dnl Written by Russ Allbery 19 | dnl Copyright 2013, 2014 20 | dnl The Board of Trustees of the Leland Stanford Junior University 21 | dnl 22 | dnl This file is free software; the authors give unlimited permission to copy 23 | dnl and/or distribute it, with or without modifications, as long as this 24 | dnl notice is preserved. 25 | 26 | dnl Determine the systemd system unit directory, along with a configure flag 27 | dnl to override, and sets @systemdsystemunitdir@. Provides the Automake 28 | dnl HAVE_SYSTEMD Automake conditional. 29 | AC_DEFUN([RRA_WITH_SYSTEMD_UNITDIR], 30 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 31 | AS_IF([test x"$PKG_CONFIG" = x], [PKG_CONFIG=false]) 32 | AC_ARG_WITH([systemdsystemunitdir], 33 | [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], 34 | [Directory for systemd service files])], 35 | [], 36 | [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) 37 | AS_IF([test x"$with_systemdsystemunitdir" != xno], 38 | [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])]) 39 | AM_CONDITIONAL([HAVE_SYSTEMD], 40 | [test -n "$with_systemdsystemunitdir" -a x"$with_systemdsystemunitdir" != xno])]) 41 | 42 | dnl Check for libsystemd-daemon and define SYSTEMD_DAEMON_{CFLAGS,LIBS} if it 43 | dnl is available. 44 | AC_DEFUN([RRA_LIB_SYSTEMD_DAEMON_OPTIONAL], 45 | [PKG_CHECK_EXISTS([libsystemd-daemon], 46 | [PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon]) 47 | AC_DEFINE([HAVE_SD_NOTIFY], 1, [Define if sd_notify is available.])])]) 48 | 49 | -------------------------------------------------------------------------------- /etc/Makefile.am: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: Makefile.am,v 1.12 2010-06-01 21:01:40 chu11 Exp $ 3 | ##***************************************************************************** 4 | ## Process this file with automake to produce Makefile.in. 5 | ##***************************************************************************** 6 | 7 | EXTRA_DIST = cerebrod cerebro.conf cerebrod.service 8 | 9 | if HAVE_SYSTEMD 10 | systemdsystemunit_SCRIPTS=cerebrod.service 11 | else 12 | initconfdir=$(sysconfdir)/init.d 13 | initconf_SCRIPTS=cerebrod 14 | endif 15 | 16 | sysconf_DATA=cerebro.conf 17 | -------------------------------------------------------------------------------- /etc/cerebrod: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $Id: cerebrod,v 1.8 2009-02-26 18:18:58 chu11 Exp $ 3 | # 4 | # chkconfig: - 95 5 5 | # description: cerebrod startup script 6 | # 7 | ### BEGIN INIT INFO 8 | # Provides: cerebrod 9 | # Required-Start: $network $remote_fs $syslog 10 | # Required-Stop: $network $remote_fs $syslog 11 | # Default-Start: none 12 | # Default-Stop: 0 1 2 3 5 6 13 | # Description: Start cerebrod- 14 | ### END INIT INFO 15 | 16 | CEREBROD=/usr/sbin/cerebrod 17 | 18 | [ -f $CEREBROD ] || exit 1 19 | 20 | # Load Redhat or Suse appropriate libs 21 | if [ -f /etc/rc.d/init.d/functions ] ; then 22 | . /etc/rc.d/init.d/functions 23 | Xstart() { 24 | daemon $CEREBROD 25 | RETVAL=$? 26 | echo 27 | [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cerebrod 28 | } 29 | Xstop() { 30 | killproc cerebrod -TERM 31 | RETVAL=$? 32 | echo 33 | [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/cerebrod 34 | } 35 | Xstatus() { 36 | status cerebrod 37 | RETVAL=$? 38 | } 39 | Xrestart() { 40 | $0 stop 41 | $0 start 42 | RETVAL=$? 43 | } 44 | Xcondrestart() { 45 | if test -e /var/lock/subsys/cerebrod; then 46 | $0 restart 47 | RETVAL=$? 48 | fi 49 | } 50 | Xexit() { 51 | exit $RETVAL 52 | } 53 | elif [ -f /etc/rc.status ] ; then 54 | . /etc/rc.status 55 | Xstart() { 56 | startproc $CEREBROD 57 | rc_status -v 58 | } 59 | Xstop() { 60 | killproc -TERM $CEREBROD 61 | rc_status -v 62 | } 63 | Xstatus() { 64 | echo -n "Checking for cerebrod: " 65 | checkproc $CEREBROD 66 | rc_status -v 67 | } 68 | Xrestart() { 69 | $0 stop 70 | $0 start 71 | rc_status 72 | } 73 | Xcondrestart() { 74 | $0 status 75 | if test $? = 0; then 76 | $0 restart 77 | else 78 | rc_reset 79 | fi 80 | rc_status 81 | } 82 | Xexit() { 83 | rc_exit 84 | } 85 | else 86 | echo "Unknown distribution type" 87 | exit 1 88 | fi 89 | 90 | RETVAL=0 91 | 92 | case "$1" in 93 | start) 94 | echo -n "Starting cerebrod: " 95 | Xstart 96 | ;; 97 | stop) 98 | echo -n "Shutting down cerebrod: " 99 | Xstop 100 | ;; 101 | restart|force-reload) 102 | Xrestart 103 | ;; 104 | reload) 105 | echo "Operation unsupported: $1" 106 | exit 3 107 | ;; 108 | status) 109 | Xstatus 110 | ;; 111 | condrestart|try-restart) 112 | Xcondrestart 113 | ;; 114 | *) 115 | echo "Usage: $0 {start|stop|restart|force-reload|status|condrestart|try-restart}" 116 | exit 1 117 | esac 118 | 119 | Xexit 120 | -------------------------------------------------------------------------------- /etc/cerebrod.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Cerebrod daemon 3 | After=syslog.target network.target 4 | 5 | [Service] 6 | Type=forking 7 | ExecStart=/usr/sbin/cerebrod 8 | ExecReload=/bin/kill -HUP $MAINPID 9 | KillMode=process 10 | User=root 11 | Group=root 12 | Restart=on-failure 13 | RestartSec=5s 14 | 15 | [Install] 16 | WantedBy=multi-user.target 17 | -------------------------------------------------------------------------------- /libltdl/README: -------------------------------------------------------------------------------- 1 | This is GNU libltdl, a system independent dlopen wrapper for GNU libtool. 2 | 3 | It supports the following dlopen interfaces: 4 | * dlopen (POSIX) 5 | * shl_load (HP-UX) 6 | * LoadLibrary (Win16 and Win32) 7 | * load_add_on (BeOS) 8 | * GNU DLD (emulates dynamic linking for static libraries) 9 | * dyld (darwin/Mac OS X) 10 | * libtool's dlpreopen 11 | -- 12 | Copyright (C) 1999, 2003, 2011-2015 Free Software Foundation, Inc. 13 | Written by Thomas Tanner, 1999 14 | 15 | This file is part of GNU Libtool. 16 | 17 | Copying and distribution of this file, with or without modification, 18 | are permitted in any medium without royalty provided the copyright 19 | notice and this notice are preserved. This file is offered as-is, 20 | without warranty of any kind. 21 | -------------------------------------------------------------------------------- /libltdl/configure.ac: -------------------------------------------------------------------------------- 1 | # Process this file with autoconf to create configure. -*- autoconf -*- 2 | # 3 | # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 4 | # Foundation, Inc. 5 | # Written by Gary V. Vaughan, 2004 6 | # 7 | # NOTE: The canonical source of this file is maintained with the 8 | # GNU Libtool package. Report bugs to bug-libtool@gnu.org. 9 | # 10 | # GNU Libltdl is free software; you can redistribute it and/or 11 | # modify it under the terms of the GNU Lesser General Public 12 | # License as published by the Free Software Foundation; either 13 | # version 2 of the License, or (at your option) any later version. 14 | # 15 | # As a special exception to the GNU Lesser General Public License, 16 | # if you distribute this file as part of a program or library that 17 | # is built using GNU libtool, you may include this file under the 18 | # same distribution terms that you use for the rest of that program. 19 | # 20 | # GNU Libltdl is distributed in the hope that it will be useful, 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | # GNU Lesser General Public License for more details. 24 | # 25 | # You should have received a copy of the GNU LesserGeneral Public 26 | # License along with GNU Libltdl; see the file COPYING.LIB. If not, a 27 | # copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, 28 | # or obtained by writing to the Free Software Foundation, Inc., 29 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 30 | #### 31 | 32 | # This configure.ac is not used at all by the libtool bootstrap, but 33 | # is copied to the ltdl subdirectory if you libtoolize --ltdl your own 34 | # project. Adding LT_WITH_LTDL to your project configure.ac will then 35 | # configure this directory if your user doesn't want to use the installed 36 | # libltdl. 37 | 38 | AC_PREREQ(2.59)dnl We use AS_HELP_STRING 39 | 40 | 41 | ## ------------------------ ## 42 | ## Autoconf initialisation. ## 43 | ## ------------------------ ## 44 | AC_INIT([libltdl], [2.4.3a], [bug-libtool@gnu.org]) 45 | AC_CONFIG_HEADERS([config.h:config-h.in]) 46 | AC_CONFIG_SRCDIR([ltdl.c]) 47 | AC_CONFIG_AUX_DIR([../config]) 48 | LT_CONFIG_LTDL_DIR([.]) # I am me! 49 | 50 | 51 | ## ------------------------ ## 52 | ## Automake Initialisation. ## 53 | ## ------------------------ ## 54 | 55 | AM_INIT_AUTOMAKE([gnu subdir-objects]) 56 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 57 | 58 | 59 | ## ------------------------------- ## 60 | ## Libtool specific configuration. ## 61 | ## ------------------------------- ## 62 | pkgdatadir='$datadir'"/$PACKAGE" 63 | 64 | 65 | ## ----------------------- ## 66 | ## Libtool initialisation. ## 67 | ## ----------------------- ## 68 | LT_INIT([dlopen win32-dll]) 69 | _LTDL_SETUP 70 | 71 | 72 | ## -------- ## 73 | ## Outputs. ## 74 | ## -------- ## 75 | AC_CONFIG_FILES([Makefile]) 76 | AC_OUTPUT 77 | -------------------------------------------------------------------------------- /libltdl/libltdl/lt__alloc.h: -------------------------------------------------------------------------------- 1 | /* lt__alloc.h -- internal memory management interface 2 | 3 | Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 4 | Written by Gary V. Vaughan, 2004 5 | 6 | NOTE: The canonical source of this file is maintained with the 7 | GNU Libtool package. Report bugs to bug-libtool@gnu.org. 8 | 9 | GNU Libltdl is free software; you can redistribute it and/or 10 | modify it under the terms of the GNU Lesser General Public 11 | License as published by the Free Software Foundation; either 12 | version 2 of the License, or (at your option) any later version. 13 | 14 | As a special exception to the GNU Lesser General Public License, 15 | if you distribute this file as part of a program or library that 16 | is built using GNU Libtool, you may include this file under the 17 | same distribution terms that you use for the rest of that program. 18 | 19 | GNU Libltdl is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU Lesser General Public License for more details. 23 | 24 | You should have received a copy of the GNU Lesser General Public 25 | License along with GNU Libltdl; see the file COPYING.LIB. If not, a 26 | copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, 27 | or obtained by writing to the Free Software Foundation, Inc., 28 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 29 | */ 30 | 31 | #if !defined LT__ALLOC_H 32 | #define LT__ALLOC_H 1 33 | 34 | #include "lt_system.h" 35 | 36 | LT_BEGIN_C_DECLS 37 | 38 | #define MALLOC(tp, n) (tp*) lt__malloc((n) * sizeof(tp)) 39 | #define REALLOC(tp, mem, n) (tp*) lt__realloc((mem), (n) * sizeof(tp)) 40 | #define FREE(mem) LT_STMT_START { \ 41 | free (mem); mem = NULL; } LT_STMT_END 42 | #define MEMREASSIGN(p, q) LT_STMT_START { \ 43 | if ((p) != (q)) { free (p); (p) = (q); (q) = 0; } \ 44 | } LT_STMT_END 45 | 46 | /* If set, this function is called when memory allocation has failed. */ 47 | LT_SCOPE void (*lt__alloc_die) (void); 48 | 49 | LT_SCOPE void *lt__malloc (size_t n); 50 | LT_SCOPE void *lt__zalloc (size_t n); 51 | LT_SCOPE void *lt__realloc (void *mem, size_t n); 52 | LT_SCOPE void *lt__memdup (void const *mem, size_t n); 53 | 54 | LT_SCOPE char *lt__strdup (const char *string); 55 | 56 | LT_END_C_DECLS 57 | 58 | #endif /*!defined LT__ALLOC_H*/ 59 | -------------------------------------------------------------------------------- /libltdl/libltdl/lt__argz_.h: -------------------------------------------------------------------------------- 1 | /* lt__argz.h -- internal argz interface for non-glibc systems 2 | 3 | Copyright (C) 2004, 2007-2008, 2011-2015 Free Software Foundation, 4 | Inc. 5 | Written by Gary V. Vaughan, 2004 6 | 7 | NOTE: The canonical source of this file is maintained with the 8 | GNU Libtool package. Report bugs to bug-libtool@gnu.org. 9 | 10 | GNU Libltdl is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU Lesser General Public 12 | License as published by the Free Software Foundation; either 13 | version 2 of the License, or (at your option) any later version. 14 | 15 | As a special exception to the GNU Lesser General Public License, 16 | if you distribute this file as part of a program or library that 17 | is built using GNU Libtool, you may include this file under the 18 | same distribution terms that you use for the rest of that program. 19 | 20 | GNU Libltdl is distributed in the hope that it will be useful, 21 | but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | GNU Lesser General Public License for more details. 24 | 25 | You should have received a copy of the GNU Lesser General Public 26 | License along with GNU Libltdl; see the file COPYING.LIB. If not, a 27 | copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, 28 | or obtained by writing to the Free Software Foundation, Inc., 29 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 30 | */ 31 | 32 | #if !defined LT__ARGZ_H 33 | #define LT__ARGZ_H 1 34 | 35 | #include 36 | #define __need_error_t 37 | #include 38 | #include 39 | 40 | #if defined LTDL 41 | # include "lt__glibc.h" 42 | # include "lt_system.h" 43 | #else 44 | # define LT_SCOPE 45 | #endif 46 | 47 | #if defined __cplusplus 48 | extern "C" { 49 | #endif 50 | 51 | LT_SCOPE error_t argz_append (char **pargz, size_t *pargz_len, 52 | const char *buf, size_t buf_len); 53 | LT_SCOPE error_t argz_create_sep(const char *str, int delim, 54 | char **pargz, size_t *pargz_len); 55 | LT_SCOPE error_t argz_insert (char **pargz, size_t *pargz_len, 56 | char *before, const char *entry); 57 | LT_SCOPE char * argz_next (char *argz, size_t argz_len, 58 | const char *entry); 59 | LT_SCOPE void argz_stringify (char *argz, size_t argz_len, int sep); 60 | 61 | #if defined __cplusplus 62 | } 63 | #endif 64 | 65 | #if !defined LTDL 66 | # undef LT_SCOPE 67 | #endif 68 | 69 | #endif /*!defined LT__ARGZ_H*/ 70 | -------------------------------------------------------------------------------- /libltdl/libltdl/lt__dirent.h: -------------------------------------------------------------------------------- 1 | /* lt__dirent.h -- internal directory entry scanning interface 2 | 3 | Copyright (C) 2001, 2004, 2006, 2011-2015 Free Software Foundation, 4 | Inc. 5 | Written by Bob Friesenhahn, 2001 6 | 7 | NOTE: The canonical source of this file is maintained with the 8 | GNU Libtool package. Report bugs to bug-libtool@gnu.org. 9 | 10 | GNU Libltdl is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU Lesser General Public 12 | License as published by the Free Software Foundation; either 13 | version 2 of the License, or (at your option) any later version. 14 | 15 | As a special exception to the GNU Lesser General Public License, 16 | if you distribute this file as part of a program or library that 17 | is built using GNU Libtool, you may include this file under the 18 | same distribution terms that you use for the rest of that program. 19 | 20 | GNU Libltdl is distributed in the hope that it will be useful, 21 | but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | GNU Lesser General Public License for more details. 24 | 25 | You should have received a copy of the GNU Lesser General Public 26 | License along with GNU Libltdl; see the file COPYING.LIB. If not, a 27 | copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, 28 | or obtained by writing to the Free Software Foundation, Inc., 29 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 30 | */ 31 | 32 | #if !defined LT__DIRENT_H 33 | #define LT__DIRENT_H 1 34 | 35 | #if defined LT_CONFIG_H 36 | # include LT_CONFIG_H 37 | #else 38 | # include 39 | #endif 40 | 41 | #include "lt_system.h" 42 | 43 | #ifdef HAVE_DIRENT_H 44 | /* We have a fully operational dirent subsystem. */ 45 | # include 46 | # define D_NAMLEN(dirent) (strlen((dirent)->d_name)) 47 | 48 | #elif defined __WINDOWS__ 49 | /* Use some wrapper code to emulate dirent on windows.. */ 50 | # define WINDOWS_DIRENT_EMULATION 1 51 | 52 | # include 53 | 54 | # define D_NAMLEN(dirent) (strlen((dirent)->d_name)) 55 | # define dirent lt__dirent 56 | # define DIR lt__DIR 57 | # define opendir lt__opendir 58 | # define readdir lt__readdir 59 | # define closedir lt__closedir 60 | 61 | LT_BEGIN_C_DECLS 62 | 63 | struct dirent 64 | { 65 | char d_name[LT_FILENAME_MAX]; 66 | int d_namlen; 67 | }; 68 | 69 | typedef struct 70 | { 71 | HANDLE hSearch; 72 | WIN32_FIND_DATA Win32FindData; 73 | BOOL firsttime; 74 | struct dirent file_info; 75 | } DIR; 76 | 77 | 78 | LT_SCOPE DIR * opendir (const char *path); 79 | LT_SCOPE struct dirent *readdir (DIR *entry); 80 | LT_SCOPE void closedir (DIR *entry); 81 | 82 | LT_END_C_DECLS 83 | 84 | #else /* !defined __WINDOWS__*/ 85 | ERROR - cannot find dirent 86 | #endif /*!defined __WINDOWS__*/ 87 | 88 | #endif /*!defined LT__DIRENT_H*/ 89 | -------------------------------------------------------------------------------- /libltdl/libltdl/lt__glibc.h: -------------------------------------------------------------------------------- 1 | /* lt__glibc.h -- support for non glibc environments 2 | 3 | Copyright (C) 2004, 2006-2007, 2011-2015 Free Software Foundation, 4 | Inc. 5 | Written by Gary V. Vaughan, 2004 6 | 7 | NOTE: The canonical source of this file is maintained with the 8 | GNU Libtool package. Report bugs to bug-libtool@gnu.org. 9 | 10 | GNU Libltdl is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU Lesser General Public 12 | License as published by the Free Software Foundation; either 13 | version 2 of the License, or (at your option) any later version. 14 | 15 | As a special exception to the GNU Lesser General Public License, 16 | if you distribute this file as part of a program or library that 17 | is built using GNU Libtool, you may include this file under the 18 | same distribution terms that you use for the rest of that program. 19 | 20 | GNU Libltdl is distributed in the hope that it will be useful, 21 | but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | GNU Lesser General Public License for more details. 24 | 25 | You should have received a copy of the GNU Lesser General Public 26 | License along with GNU Libltdl; see the file COPYING.LIB. If not, a 27 | copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, 28 | or obtained by writing to the Free Software Foundation, Inc., 29 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 30 | */ 31 | 32 | #if !defined LT__GLIBC_H 33 | #define LT__GLIBC_H 1 34 | 35 | #if defined LT_CONFIG_H 36 | # include LT_CONFIG_H 37 | #else 38 | # include 39 | #endif 40 | 41 | #if !defined HAVE_ARGZ_H || !defined HAVE_WORKING_ARGZ 42 | /* Redefine any glibc symbols we reimplement to import the 43 | implementations into our lt__ namespace so we don't ever 44 | clash with the system library if our clients use argz_* 45 | from there in addition to libltdl. */ 46 | # undef argz_append 47 | # define argz_append lt__argz_append 48 | # undef argz_create_sep 49 | # define argz_create_sep lt__argz_create_sep 50 | # undef argz_insert 51 | # define argz_insert lt__argz_insert 52 | # undef argz_next 53 | # define argz_next lt__argz_next 54 | # undef argz_stringify 55 | # define argz_stringify lt__argz_stringify 56 | 57 | # include 58 | 59 | #else 60 | 61 | #ifdef __cplusplus 62 | extern "C" { 63 | #endif 64 | 65 | #include 66 | 67 | #ifdef __cplusplus 68 | } 69 | #endif 70 | 71 | #endif /*!defined HAVE_ARGZ_H || !defined HAVE_WORKING_ARGZ*/ 72 | 73 | # define slist_concat lt__slist_concat 74 | # define slist_cons lt__slist_cons 75 | # define slist_delete lt__slist_delete 76 | # define slist_remove lt__slist_remove 77 | # define slist_reverse lt__slist_reverse 78 | # define slist_sort lt__slist_sort 79 | # define slist_tail lt__slist_tail 80 | # define slist_nth lt__slist_nth 81 | # define slist_find lt__slist_find 82 | # define slist_length lt__slist_length 83 | # define slist_foreach lt__slist_foreach 84 | # define slist_box lt__slist_box 85 | # define slist_unbox lt__slist_unbox 86 | 87 | #include 88 | 89 | #endif /*!defined LT__GLIBC_H*/ 90 | -------------------------------------------------------------------------------- /libltdl/libltdl/lt__strl.h: -------------------------------------------------------------------------------- 1 | /* lt__strl.h -- size-bounded string copying and concatenation 2 | 3 | Copyright (C) 2004, 2006, 2011-2015 Free Software Foundation, Inc. 4 | Written by Bob Friesenhahn, 2004 5 | 6 | NOTE: The canonical source of this file is maintained with the 7 | GNU Libtool package. Report bugs to bug-libtool@gnu.org. 8 | 9 | GNU Libltdl is free software; you can redistribute it and/or 10 | modify it under the terms of the GNU Lesser General Public 11 | License as published by the Free Software Foundation; either 12 | version 2 of the License, or (at your option) any later version. 13 | 14 | As a special exception to the GNU Lesser General Public License, 15 | if you distribute this file as part of a program or library that 16 | is built using GNU Libtool, you may include this file under the 17 | same distribution terms that you use for the rest of that program. 18 | 19 | GNU Libltdl is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU Lesser General Public License for more details. 23 | 24 | You should have received a copy of the GNU Lesser General Public 25 | License along with GNU Libltdl; see the file COPYING.LIB. If not, a 26 | copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, 27 | or obtained by writing to the Free Software Foundation, Inc., 28 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 29 | */ 30 | 31 | #if !defined LT__STRL_H 32 | #define LT__STRL_H 1 33 | 34 | #if defined LT_CONFIG_H 35 | # include LT_CONFIG_H 36 | #else 37 | # include 38 | #endif 39 | 40 | #include 41 | #include "lt_system.h" 42 | 43 | #if !defined HAVE_STRLCAT 44 | # define strlcat(dst,src,dstsize) lt_strlcat(dst,src,dstsize) 45 | LT_SCOPE size_t lt_strlcat(char *dst, const char *src, const size_t dstsize); 46 | #endif /* !defined HAVE_STRLCAT */ 47 | 48 | #if !defined HAVE_STRLCPY 49 | # define strlcpy(dst,src,dstsize) lt_strlcpy(dst,src,dstsize) 50 | LT_SCOPE size_t lt_strlcpy(char *dst, const char *src, const size_t dstsize); 51 | #endif /* !defined HAVE_STRLCPY */ 52 | 53 | #endif /*!defined LT__STRL_H*/ 54 | -------------------------------------------------------------------------------- /libltdl/lt__alloc.c: -------------------------------------------------------------------------------- 1 | /* lt__alloc.c -- internal memory management interface 2 | 3 | Copyright (C) 2004, 2006-2007, 2011-2015 Free Software Foundation, 4 | Inc. 5 | Written by Gary V. Vaughan, 2004 6 | 7 | NOTE: The canonical source of this file is maintained with the 8 | GNU Libtool package. Report bugs to bug-libtool@gnu.org. 9 | 10 | GNU Libltdl is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU Lesser General Public 12 | License as published by the Free Software Foundation; either 13 | version 2 of the License, or (at your option) any later version. 14 | 15 | As a special exception to the GNU Lesser General Public License, 16 | if you distribute this file as part of a program or library that 17 | is built using GNU Libtool, you may include this file under the 18 | same distribution terms that you use for the rest of that program. 19 | 20 | GNU Libltdl is distributed in the hope that it will be useful, 21 | but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | GNU Lesser General Public License for more details. 24 | 25 | You should have received a copy of the GNU Lesser General Public 26 | License along with GNU Libltdl; see the file COPYING.LIB. If not, a 27 | copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, 28 | or obtained by writing to the Free Software Foundation, Inc., 29 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 30 | */ 31 | 32 | #include "lt__private.h" 33 | 34 | #include 35 | 36 | #include "lt__alloc.h" 37 | 38 | static void alloc_die_default (void); 39 | 40 | void (*lt__alloc_die) (void) = alloc_die_default; 41 | 42 | /* Unless overridden, exit on memory failure. */ 43 | static void 44 | alloc_die_default (void) 45 | { 46 | fprintf (stderr, "Out of memory.\n"); 47 | exit (EXIT_FAILURE); 48 | } 49 | 50 | void * 51 | lt__malloc (size_t n) 52 | { 53 | void *mem; 54 | 55 | if (! (mem = malloc (n))) 56 | (*lt__alloc_die) (); 57 | 58 | return mem; 59 | } 60 | 61 | void * 62 | lt__zalloc (size_t n) 63 | { 64 | void *mem; 65 | 66 | if ((mem = lt__malloc (n))) 67 | memset (mem, 0, n); 68 | 69 | return mem; 70 | } 71 | 72 | void * 73 | lt__realloc (void *mem, size_t n) 74 | { 75 | if (! (mem = realloc (mem, n))) 76 | (*lt__alloc_die) (); 77 | 78 | return mem; 79 | } 80 | 81 | void * 82 | lt__memdup (void const *mem, size_t n) 83 | { 84 | void *newmem; 85 | 86 | if ((newmem = lt__malloc (n))) 87 | return memcpy (newmem, mem, n); 88 | 89 | return 0; 90 | } 91 | 92 | char * 93 | lt__strdup (const char *string) 94 | { 95 | return (char *) lt__memdup (string, strlen (string) +1); 96 | } 97 | -------------------------------------------------------------------------------- /libltdl/m4/argz.m4: -------------------------------------------------------------------------------- 1 | # Portability macros for glibc argz. -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. 4 | # Written by Gary V. Vaughan 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # serial 5 argz.m4 11 | 12 | AC_DEFUN([gl_FUNC_ARGZ], 13 | [gl_PREREQ_ARGZ 14 | 15 | AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT]) 16 | 17 | AC_CHECK_TYPES([error_t], 18 | [], 19 | [AC_DEFINE([error_t], [int], 20 | [Define to a type to use for `error_t' if it is not otherwise available.]) 21 | AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h 22 | does not typedef error_t.])], 23 | [#if defined(HAVE_ARGZ_H) 24 | # include 25 | #endif]) 26 | 27 | ARGZ_H= 28 | AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \ 29 | argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])]) 30 | 31 | dnl if have system argz functions, allow forced use of 32 | dnl libltdl-supplied implementation (and default to do so 33 | dnl on "known bad" systems). Could use a runtime check, but 34 | dnl (a) detecting malloc issues is notoriously unreliable 35 | dnl (b) only known system that declares argz functions, 36 | dnl provides them, yet they are broken, is cygwin 37 | dnl releases prior to 16-Mar-2007 (1.5.24 and earlier) 38 | dnl So, it's more straightforward simply to special case 39 | dnl this for known bad systems. 40 | AS_IF([test -z "$ARGZ_H"], 41 | [AC_CACHE_CHECK( 42 | [if argz actually works], 43 | [lt_cv_sys_argz_works], 44 | [[case $host_os in #( 45 | *cygwin*) 46 | lt_cv_sys_argz_works=no 47 | if test "$cross_compiling" != no; then 48 | lt_cv_sys_argz_works="guessing no" 49 | else 50 | lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/' 51 | save_IFS=$IFS 52 | IFS=-. 53 | set x `uname -r | sed -e "$lt_sed_extract_leading_digits"` 54 | IFS=$save_IFS 55 | lt_os_major=${2-0} 56 | lt_os_minor=${3-0} 57 | lt_os_micro=${4-0} 58 | if test "$lt_os_major" -gt 1 \ 59 | || { test "$lt_os_major" -eq 1 \ 60 | && { test "$lt_os_minor" -gt 5 \ 61 | || { test "$lt_os_minor" -eq 5 \ 62 | && test "$lt_os_micro" -gt 24; }; }; }; then 63 | lt_cv_sys_argz_works=yes 64 | fi 65 | fi 66 | ;; #( 67 | *) lt_cv_sys_argz_works=yes ;; 68 | esac]]) 69 | AS_IF([test $lt_cv_sys_argz_works = yes], 70 | [AC_DEFINE([HAVE_WORKING_ARGZ], 1, 71 | [This value is set to 1 to indicate that the system argz facility works])], 72 | [ARGZ_H=argz.h 73 | AC_LIBOBJ([argz])])]) 74 | 75 | AC_SUBST([ARGZ_H]) 76 | ]) 77 | 78 | # Prerequisites of lib/argz.c. 79 | AC_DEFUN([gl_PREREQ_ARGZ], [:]) 80 | -------------------------------------------------------------------------------- /libltdl/m4/ltargz.m4: -------------------------------------------------------------------------------- 1 | # Portability macros for glibc argz. -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004-2007, 2011-2015 Free Software Foundation, Inc. 4 | # Written by Gary V. Vaughan 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # serial 1 ltargz.m4 11 | 12 | AC_DEFUN([LT_FUNC_ARGZ], [ 13 | AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT]) 14 | 15 | AC_CHECK_TYPES([error_t], 16 | [], 17 | [AC_DEFINE([error_t], [int], 18 | [Define to a type to use for 'error_t' if it is not otherwise available.]) 19 | AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h 20 | does not typedef error_t.])], 21 | [#if defined(HAVE_ARGZ_H) 22 | # include 23 | #endif]) 24 | 25 | LT_ARGZ_H= 26 | AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \ 27 | argz_next argz_stringify], [], [LT_ARGZ_H=lt__argz.h; AC_LIBOBJ([lt__argz])]) 28 | 29 | dnl if have system argz functions, allow forced use of 30 | dnl libltdl-supplied implementation (and default to do so 31 | dnl on "known bad" systems). Could use a runtime check, but 32 | dnl (a) detecting malloc issues is notoriously unreliable 33 | dnl (b) only known system that declares argz functions, 34 | dnl provides them, yet they are broken, is cygwin 35 | dnl releases prior to 16-Mar-2007 (1.5.24 and earlier) 36 | dnl So, it's more straightforward simply to special case 37 | dnl this for known bad systems. 38 | AS_IF([test -z "$LT_ARGZ_H"], 39 | [AC_CACHE_CHECK( 40 | [if argz actually works], 41 | [lt_cv_sys_argz_works], 42 | [[case $host_os in #( 43 | *cygwin*) 44 | lt_cv_sys_argz_works=no 45 | if test no != "$cross_compiling"; then 46 | lt_cv_sys_argz_works="guessing no" 47 | else 48 | lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/' 49 | save_IFS=$IFS 50 | IFS=-. 51 | set x `uname -r | sed -e "$lt_sed_extract_leading_digits"` 52 | IFS=$save_IFS 53 | lt_os_major=${2-0} 54 | lt_os_minor=${3-0} 55 | lt_os_micro=${4-0} 56 | if test 1 -lt "$lt_os_major" \ 57 | || { test 1 -eq "$lt_os_major" \ 58 | && { test 5 -lt "$lt_os_minor" \ 59 | || { test 5 -eq "$lt_os_minor" \ 60 | && test 24 -lt "$lt_os_micro"; }; }; }; then 61 | lt_cv_sys_argz_works=yes 62 | fi 63 | fi 64 | ;; #( 65 | *) lt_cv_sys_argz_works=yes ;; 66 | esac]]) 67 | AS_IF([test yes = "$lt_cv_sys_argz_works"], 68 | [AC_DEFINE([HAVE_WORKING_ARGZ], 1, 69 | [This value is set to 1 to indicate that the system argz facility works])], 70 | [LT_ARGZ_H=lt__argz.h 71 | AC_LIBOBJ([lt__argz])])]) 72 | 73 | AC_SUBST([LT_ARGZ_H]) 74 | ]) 75 | -------------------------------------------------------------------------------- /libltdl/m4/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 4 | # Written by Scott James Remnant, 2004 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # @configure_input@ 11 | 12 | # serial 4179 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.4.6]) 16 | m4_define([LT_PACKAGE_REVISION], [2.4.6]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.4.6' 20 | macro_revision='2.4.6' 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 22 | _LT_DECL(, macro_revision, 0) 23 | ]) 24 | -------------------------------------------------------------------------------- /man/cerebro_event_parse.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_event_parse.3,v 1.7 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_event.3 27 | -------------------------------------------------------------------------------- /man/cerebro_event_register.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_event_register.3,v 1.7 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_event.3 27 | -------------------------------------------------------------------------------- /man/cerebro_event_unregister.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_event_unregister.3,v 1.7 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_event.3 27 | -------------------------------------------------------------------------------- /man/cerebro_flush_metric.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_flush_metric.3,v 1.6 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_register_metric.3 27 | -------------------------------------------------------------------------------- /man/cerebro_get_flags.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_get_flags.3,v 1.7 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_get_hostname.3 27 | -------------------------------------------------------------------------------- /man/cerebro_get_port.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_get_port.3,v 1.7 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_get_hostname.3 27 | -------------------------------------------------------------------------------- /man/cerebro_get_timeout_len.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_get_timeout_len.3,v 1.7 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_get_hostname.3 27 | -------------------------------------------------------------------------------- /man/cerebro_handle_create.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_handle_create.3,v 1.8 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .TH CEREBRO_HANDLE_CREATE 3 "May 2005" "LLNL" "LIBCEREBRO" 27 | .SH "NAME" 28 | cerebro_handle_create \- create a cerebro handle 29 | .SH "SYNOPSIS" 30 | .B #include 31 | .sp 32 | .BI "cerebro_t cerebro_handle_create(void);" 33 | .br 34 | .SH "DESCRIPTION" 35 | .br 36 | \fBcerebro_handle_create()\fR creates a cerebro handle for use 37 | with the cerebro library of functions. A cerebro handle is of 38 | type cerebro_t, which is defined in cerebro.h. The cerebro 39 | handle must be passed to most of the cerebro library functions. 40 | .br 41 | .SH "RETURN VALUES" 42 | On success, a cerebro handle (datatype cerebro_t) will be 43 | returned. On error, NULL is returned. 44 | .br 45 | .SH "FILES" 46 | /usr/include/cerebro.h 47 | .SH "SEE ALSO" 48 | cerebro_handle_destroy(3) 49 | -------------------------------------------------------------------------------- /man/cerebro_handle_destroy.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_handle_destroy.3,v 1.11 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .TH CEREBRO_HANDLE_DESTROY 3 "May 2005" "LLNL" "LIBCEREBRO" 27 | .SH "NAME" 28 | cerebro_handle_destroy \- destroys a cerebro handle 29 | .SH "SYNOPSIS" 30 | .B #include 31 | .sp 32 | .BI "int cerebro_handle_destroy(cerebro_t handle);" 33 | .br 34 | .SH "DESCRIPTION" 35 | \fBcerebro_handle_destroy()\fR destroys the cerebro handle pointed to 36 | by \fIhandle\fR and frees all allocated memory associated with it. 37 | Any cerebro nodelists created using the handle will also be destroyed. 38 | .br 39 | .SH "RETURN VALUES" 40 | On success, 0 is returned. On error, -1 is returned, and an error 41 | code is returned in \fIhandle\fR. The error code can be retrieved via 42 | .BR cerebro_errnum(3), 43 | and a description of the error code can be retrieved via 44 | .BR cerebro_strerror(3). 45 | .br 46 | .SH "ERRORS" 47 | .TP 48 | .B CEREBRO_ERR_NULLHANDLE 49 | The \fIhandle\fR parameter is NULL. 50 | .TP 51 | .B CEREBRO_ERR_MAGIC_NUMBER 52 | \fIhandle\fR has an incorrect magic number. \fIhandle\fR does not 53 | point to a cerebro_t handle or \fIhandle\fR has already been 54 | destroyed. 55 | .TP 56 | .B CEREBRO_ERR_CLUSTERLIST_MODULE 57 | A clusterlist module error occurred. 58 | .TP 59 | .B CEREBRO_ERR_INTERNAL 60 | An internal system error occurred. 61 | .br 62 | .SH "FILES" 63 | /usr/include/cerebro.h 64 | .SH "SEE ALSO" 65 | cerebro_handle_create(3), cerebro_errnum(3), cerebro_strerror(3) 66 | -------------------------------------------------------------------------------- /man/cerebro_namelist_destroy.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_namelist_destroy.3,v 1.6 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_namelist_length.3 27 | -------------------------------------------------------------------------------- /man/cerebro_namelist_errnum.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_namelist_errnum.3,v 1.6 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_errnum.3 27 | -------------------------------------------------------------------------------- /man/cerebro_namelist_iterator_at_end.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_namelist_iterator_at_end.3,v 1.6 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_namelist_length.3 27 | -------------------------------------------------------------------------------- /man/cerebro_namelist_iterator_create.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_namelist_iterator_create.3,v 1.6 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_namelist_length.3 27 | -------------------------------------------------------------------------------- /man/cerebro_namelist_iterator_destroy.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_namelist_iterator_destroy.3,v 1.6 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_namelist_length.3 27 | -------------------------------------------------------------------------------- /man/cerebro_namelist_iterator_errnum.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_namelist_iterator_errnum.3,v 1.6 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_errnum.3 27 | -------------------------------------------------------------------------------- /man/cerebro_namelist_iterator_name.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_namelist_iterator_name.3,v 1.6 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_namelist_length.3 27 | -------------------------------------------------------------------------------- /man/cerebro_namelist_iterator_next.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_namelist_iterator_next.3,v 1.6 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_namelist_length.3 27 | -------------------------------------------------------------------------------- /man/cerebro_namelist_iterator_reset.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_namelist_iterator_reset.3,v 1.6 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_namelist_length.3 27 | -------------------------------------------------------------------------------- /man/cerebro_nodelist_destroy.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_nodelist_destroy.3,v 1.7 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_nodelist_length.3 27 | -------------------------------------------------------------------------------- /man/cerebro_nodelist_errnum.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_nodelist_errnum.3,v 1.7 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_errnum.3 27 | -------------------------------------------------------------------------------- /man/cerebro_nodelist_iterator_at_end.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_nodelist_iterator_at_end.3,v 1.8 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_nodelist_metric_name.3 27 | -------------------------------------------------------------------------------- /man/cerebro_nodelist_iterator_create.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_nodelist_iterator_create.3,v 1.8 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_nodelist_metric_name.3 27 | -------------------------------------------------------------------------------- /man/cerebro_nodelist_iterator_destroy.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_nodelist_iterator_destroy.3,v 1.8 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_nodelist_metric_name.3 27 | -------------------------------------------------------------------------------- /man/cerebro_nodelist_iterator_errnum.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_nodelist_iterator_errnum.3,v 1.7 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_errnum.3 27 | -------------------------------------------------------------------------------- /man/cerebro_nodelist_iterator_metric_value.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_nodelist_iterator_metric_value.3,v 1.8 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_nodelist_metric_name.3 27 | -------------------------------------------------------------------------------- /man/cerebro_nodelist_iterator_next.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_nodelist_iterator_next.3,v 1.8 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_nodelist_metric_name.3 27 | -------------------------------------------------------------------------------- /man/cerebro_nodelist_iterator_nodename.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_nodelist_iterator_nodename.3,v 1.8 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_nodelist_metric_name.3 27 | -------------------------------------------------------------------------------- /man/cerebro_nodelist_iterator_reset.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_nodelist_iterator_reset.3,v 1.8 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_nodelist_metric_name.3 27 | -------------------------------------------------------------------------------- /man/cerebro_nodelist_length.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_nodelist_length.3,v 1.10 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_nodelist_metric_name.3 27 | -------------------------------------------------------------------------------- /man/cerebro_resend_metric.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_resend_metric.3,v 1.7 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_register_metric.3 27 | -------------------------------------------------------------------------------- /man/cerebro_set_flags.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_set_flags.3,v 1.7 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_set_hostname.3 27 | -------------------------------------------------------------------------------- /man/cerebro_set_port.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_set_port.3,v 1.7 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_set_hostname.3 27 | -------------------------------------------------------------------------------- /man/cerebro_set_timeout_len.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_set_timeout_len.3,v 1.7 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_set_hostname.3 27 | -------------------------------------------------------------------------------- /man/cerebro_strerror.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_strerror.3,v 1.8 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_errnum.3 27 | -------------------------------------------------------------------------------- /man/cerebro_unregister_metric.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_unregister_metric.3,v 1.7 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_register_metric.3 27 | -------------------------------------------------------------------------------- /man/cerebro_update_metric_value.3: -------------------------------------------------------------------------------- 1 | .\"############################################################################# 2 | .\"$Id: cerebro_update_metric_value.3,v 1.7 2010-02-02 01:01:20 chu11 Exp $ 3 | .\"############################################################################# 4 | .\" Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | .\" Copyright (C) 2005-2007 The Regents of the University of California. 6 | .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | .\" Written by Albert Chu . 8 | .\" UCRL-CODE-155989 All rights reserved. 9 | .\" 10 | .\" This file is part of Cerebro, a collection of cluster monitoring tools 11 | .\" and libraries. For details, see . 12 | .\" 13 | .\" Cerebro is free software; you can redistribute it and/or modify it under 14 | .\" the terms of the GNU General Public License as published by the Free 15 | .\" Software Foundation; either version 2 of the License, or (at your option) 16 | .\" any later version. 17 | .\" 18 | .\" Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 19 | .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 20 | .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 21 | .\" details. 22 | .\" 23 | .\" You should have received a copy of the GNU General Public License along 24 | .\" with Cerebro. If not, see . 25 | .\"############################################################################# 26 | .so man3/cerebro_register_metric.3 27 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: Makefile.am,v 1.9 2005-07-20 21:51:46 achu Exp $ 3 | ##***************************************************************************** 4 | ## Process this file with automake to produce Makefile.in. 5 | ##***************************************************************************** 6 | 7 | SUBDIRS = cerebro-admin \ 8 | cerebro-stat \ 9 | cerebrod \ 10 | libs \ 11 | modules 12 | -------------------------------------------------------------------------------- /src/cerebro-admin/Makefile.am: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: Makefile.am,v 1.2 2005-08-05 23:59:30 achu Exp $ 3 | ##***************************************************************************** 4 | ## Process this file with automake to produce Makefile.in. 5 | ##***************************************************************************** 6 | 7 | sbin_PROGRAMS = cerebro-admin 8 | cerebro_admin_SOURCES = cerebro-admin.c 9 | cerebro_admin_CFLAGS = -I $(srcdir)/../libs/include \ 10 | -I $(srcdir)/../libs/common 11 | 12 | cerebro_admin_LDADD = ../libs/cerebro/libcerebro.la \ 13 | ../libs/common/liberror.la 14 | 15 | ../libs/cerebro/libcerebro.la: force-dependency-check 16 | @cd `dirname $@` && make `basename $@` 17 | 18 | ../libs/common/liberror.la: force-dependency-check 19 | @cd `dirname $@` && make `basename $@` 20 | 21 | force-dependency-check: 22 | -------------------------------------------------------------------------------- /src/cerebro-stat/Makefile.am: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: Makefile.am,v 1.10 2005-08-26 17:16:45 achu Exp $ 3 | ##***************************************************************************** 4 | ## Process this file with automake to produce Makefile.in. 5 | ##***************************************************************************** 6 | 7 | sbin_PROGRAMS = cerebro-stat 8 | cerebro_stat_SOURCES = cerebro-stat.c 9 | cerebro_stat_CFLAGS = -I $(srcdir)/../libs/include \ 10 | -I $(srcdir)/../libs/common \ 11 | -I $(srcdir)/../libs/wrappers \ 12 | -I $(srcdir)/../../libltdl 13 | 14 | # Weird linker issues, ordering here matters 15 | cerebro_stat_LDADD = ../libs/cerebro/libcerebro.la \ 16 | ../libs/wrappers/libwrappers.la \ 17 | ../libs/wrappers/libwrappers_hash.la \ 18 | ../libs/wrappers/libwrappers_hostlist.la \ 19 | ../libs/wrappers/libwrappers_list.la \ 20 | ../libs/cerebro_error/libcerebro_error.la \ 21 | ../libs/common/liberror.la \ 22 | ../libs/common/libhash.la \ 23 | ../libs/common/libhostlist.la \ 24 | ../libs/common/liblist.la 25 | 26 | ../libs/cerebro/libcerebro.la: force-dependency-check 27 | @cd `dirname $@` && make `basename $@` 28 | 29 | ../libs/cerebro_error/libcerebro_error.la: force-dependency-check 30 | @cd `dirname $@` && make `basename $@` 31 | 32 | ../libs/common/liberror.la: force-dependency-check 33 | @cd `dirname $@` && make `basename $@` 34 | 35 | ../libs/common/libhash.la: force-dependency-check 36 | @cd `dirname $@` && make `basename $@` 37 | 38 | ../libs/common/libhostlist.la: force-dependency-check 39 | @cd `dirname $@` && make `basename $@` 40 | 41 | ../libs/common/liblist.la: force-dependency-check 42 | @cd `dirname $@` && make `basename $@` 43 | 44 | ../libs/wrappers/libwrappers.la: force-dependency-check 45 | @cd `dirname $@` && make `basename $@` 46 | 47 | ../libs/wrappers/libwrappers_hash.la: force-dependency-check 48 | @cd `dirname $@` && make `basename $@` 49 | 50 | ../libs/wrappers/libwrappers_hostlist.la: force-dependency-check 51 | @cd `dirname $@` && make `basename $@` 52 | 53 | ../libs/wrappers/libwrappers_list.la: force-dependency-check 54 | @cd `dirname $@` && make `basename $@` 55 | 56 | force-dependency-check: 57 | -------------------------------------------------------------------------------- /src/cerebrod/cerebrod.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebrod.h,v 1.15 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBROD_H 29 | #define _CEREBROD_H 30 | 31 | #define CEREBROD_THREAD_STACKSIZE (1024*1024) 32 | 33 | #endif /* _CEREBROD_H */ 34 | -------------------------------------------------------------------------------- /src/cerebrod/cerebrod_daemon.c: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebrod_daemon.c,v 1.15 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #if HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif /* HAVE_CONFIG_H */ 31 | 32 | #include 33 | #include 34 | #if HAVE_UNISTD_H 35 | #include 36 | #endif /* HAVE_UNISTD_H */ 37 | 38 | #include "cerebrod_daemon.h" 39 | 40 | #include "wrappers.h" 41 | 42 | void 43 | cerebrod_daemon_init(void) 44 | { 45 | /* Based on code in Unix network programming by R. Stevens */ 46 | pid_t pid; 47 | int i; 48 | 49 | pid = Fork(); 50 | if (pid != 0) /* Terminate Parent */ 51 | exit(0); 52 | 53 | setsid(); 54 | 55 | Signal(SIGHUP, SIG_IGN); 56 | 57 | pid = Fork(); 58 | if (pid != 0) /* Terminate 1st Child */ 59 | exit(0); 60 | 61 | Chdir("/"); 62 | 63 | Umask(0); 64 | 65 | /* Don't use Close() wrapper, we don't want to exit on error */ 66 | for (i = 0; i < 64; i++) 67 | close(i); 68 | } 69 | -------------------------------------------------------------------------------- /src/cerebrod/cerebrod_daemon.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebrod_daemon.h,v 1.9 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBROD_DAEMON_H 29 | #define _CEREBROD_DAEMON_H 30 | 31 | /* 32 | * cerebrod_daemon_init 33 | * 34 | * daemonize the cerebrod process 35 | */ 36 | void cerebrod_daemon_init(void); 37 | 38 | #endif /* _CEREBROD_DAEMON_H */ 39 | -------------------------------------------------------------------------------- /src/cerebrod/cerebrod_debug.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: debug.h,v 1.12 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBROD_DEBUG_H 29 | #define _CEREBROD_DEBUG_H 30 | 31 | #if HAVE_CONFIG_H 32 | #include "config.h" 33 | #endif /* HAVE_CONFIG_H */ 34 | 35 | #include "debug.h" 36 | 37 | #if CEREBRO_DEBUG 38 | 39 | #define CEREBROD_DBG(msg) CEREBRO_DBG(msg) 40 | 41 | #else /* !CEREBRO_DEBUG */ 42 | 43 | #define CEREBROD_DBG(msg) \ 44 | do { \ 45 | if (conf.debug) \ 46 | cerebro_err_debug msg; \ 47 | } while(0) 48 | 49 | #endif /* !CEREBRO_DEBUG */ 50 | 51 | #define CEREBROD_ERR(msg) CEREBRO_ERR(msg) 52 | 53 | #define CEREBROD_EXIT(msg) CEREBRO_EXIT(msg) 54 | 55 | #endif /* _CEREBROD_DEBUG_H */ 56 | -------------------------------------------------------------------------------- /src/cerebrod/cerebrod_event_node_timeout_monitor.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebrod_event_node_timeout_monitor.h,v 1.7 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBROD_EVENT_NODE_TIMEOUT_H 29 | #define _CEREBROD_EVENT_NODE_TIMEOUT_H 30 | 31 | /* 32 | * cerebrod_event_node_timeout_monitor 33 | * 34 | * Runs the cerebrod event node timeout monitor. This thread will 35 | * determine when nodes have timed out and call event modules that 36 | * must be notified. 37 | * 38 | * Passed no argument 39 | * 40 | * Executed in detached state, no return value. 41 | */ 42 | void *cerebrod_event_node_timeout_monitor(void *); 43 | 44 | #endif /* _CEREBROD_EVENT_NODE_TIMEOUT_H */ 45 | -------------------------------------------------------------------------------- /src/cerebrod/cerebrod_listener.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebrod_listener.h,v 1.17 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBROD_LISTENER_H 29 | #define _CEREBROD_LISTENER_H 30 | 31 | /* 32 | * cerebrod_listener 33 | * 34 | * Runs a cerebrod listening thread 35 | * 36 | * Passed no argument 37 | * 38 | * Executed in detached state, no return value. 39 | */ 40 | void *cerebrod_listener(void *); 41 | 42 | #endif /* _CEREBROD_LISTENER_H */ 43 | -------------------------------------------------------------------------------- /src/cerebrod/cerebrod_message.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebrod_message.h,v 1.6 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBROD_MESSAGE_H 29 | #define _CEREBROD_MESSAGE_H 30 | 31 | #include "cerebro/cerebrod_message_protocol.h" 32 | 33 | /* 34 | * cerebrod_message_destroy 35 | * 36 | * destroy a message packet 37 | */ 38 | void cerebrod_message_destroy(struct cerebrod_message *msg); 39 | 40 | /* 41 | * cerebrod_message_dump 42 | * 43 | * dump contents of a message packet. Should be called with 44 | * debug_output_mutex held. 45 | */ 46 | void cerebrod_message_dump(struct cerebrod_message *msg); 47 | 48 | #endif /* _CEREBROD_MESSAGE_H */ 49 | -------------------------------------------------------------------------------- /src/cerebrod/cerebrod_metric_controller.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebrod_metric_controller.h,v 1.7 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBROD_METRIC_CONTROLLER_H 29 | #define _CEREBROD_METRIC_CONTROLLER_H 30 | 31 | /* 32 | * cerebrod_metric_controller 33 | * 34 | * Runs the cerebrod metric controller thread 35 | * 36 | * Passed no argument 37 | * 38 | * Executed in detached state, no return value. 39 | */ 40 | void *cerebrod_metric_controller(void *); 41 | 42 | #endif /* _CEREBROD_METRIC_CONTROLLER_H */ 43 | -------------------------------------------------------------------------------- /src/cerebrod/cerebrod_metric_server.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebrod_metric_server.h,v 1.12 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBROD_METRIC_SERVER_H 29 | #define _CEREBROD_METRIC_SERVER_H 30 | 31 | #include "cerebro/cerebro_metric_server_protocol.h" 32 | 33 | #include "list.h" 34 | 35 | /* 36 | * struct cerebrod_metric_name_evaluation_data 37 | * 38 | * Holds data for callback functions 39 | */ 40 | struct cerebrod_metric_name_evaluation_data 41 | { 42 | int fd; 43 | List responses; 44 | }; 45 | 46 | /* 47 | * struct cerebrod_metric_data_evaluation_data 48 | * 49 | * Holds data for callback functions 50 | */ 51 | struct cerebrod_metric_data_evaluation_data 52 | { 53 | int fd; 54 | struct cerebro_metric_server_request *req; 55 | u_int32_t time_now; 56 | char *metric_name; 57 | List responses; 58 | }; 59 | 60 | /* 61 | * cerebrod_metric_server 62 | * 63 | * Runs the cerebrod metric server thread 64 | * 65 | * Passed no argument 66 | * 67 | * Executed in detached state, no return value. 68 | */ 69 | void *cerebrod_metric_server(void *); 70 | 71 | #endif /* _CEREBROD_METRIC_SERVER_H */ 72 | -------------------------------------------------------------------------------- /src/cerebrod/cerebrod_monitor_update.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebrod_monitor_update.h,v 1.8 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBROD_MONITOR_UPDATE_H 29 | #define _CEREBROD_MONITOR_UPDATE_H 30 | 31 | #if HAVE_CONFIG_H 32 | #include "config.h" 33 | #endif /* HAVE_CONFIG_H */ 34 | 35 | #if HAVE_PTHREAD_H 36 | #include 37 | #endif /* HAVE_PTHREAD_H */ 38 | 39 | #include "cerebro/cerebrod_message_protocol.h" 40 | #include "cerebrod_listener_data.h" 41 | 42 | #include "list.h" 43 | 44 | /* 45 | * struct cerebrod_monitor_module_info 46 | * 47 | * contains cerebrod monitor module metric information 48 | */ 49 | struct cerebrod_monitor_module_info 50 | { 51 | char *metric_names; 52 | int index; 53 | pthread_mutex_t monitor_lock; 54 | }; 55 | 56 | /* 57 | * struct cerebrod_monitor_module_list 58 | * 59 | * Contains list of monitor module info list and a lock for thread 60 | * safety. 61 | */ 62 | struct cerebrod_monitor_module_list 63 | { 64 | List monitor_list; 65 | pthread_mutex_t monitor_list_lock; 66 | }; 67 | 68 | /* 69 | * cerebrod_monitor_modules_setup 70 | * 71 | * Setup monitor modules. 72 | * 73 | * Return 1 if modules are loaded, 0 if not, -1 on error 74 | */ 75 | int cerebrod_monitor_modules_setup(void); 76 | 77 | /* 78 | * cerebrod_monitor_update 79 | * 80 | * Accepts recently gathered metric data to be passed to monitor modules. 81 | */ 82 | void cerebrod_monitor_modules_update(const char *nodename, 83 | struct cerebrod_node_data *nd, 84 | const char *metric_name, 85 | struct cerebrod_message_metric *mm); 86 | 87 | #endif /* _CEREBROD_MONITOR_UPDATE_H */ 88 | -------------------------------------------------------------------------------- /src/cerebrod/cerebrod_speaker.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebrod_speaker.h,v 1.15 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBROD_SPEAKER_H 29 | #define _CEREBROD_SPEAKER_H 30 | 31 | #include "cerebro/cerebrod_message_protocol.h" 32 | 33 | /* 34 | * Flags to define if a metric should be sent with cerebrod heartbeat 35 | * or by themselves. 36 | */ 37 | #define CEREBROD_SPEAKER_NEXT_SEND_TYPE_HEARTBEAT 0x1 38 | #define CEREBROD_SPEAKER_NEXT_SEND_TYPE_MODULE 0x2 39 | 40 | /* 41 | * struct cerebrod_next_send_time 42 | * 43 | * Store information on when to next send information 44 | */ 45 | struct cerebrod_next_send_time 46 | { 47 | u_int32_t next_send_type; 48 | u_int32_t next_send_time; 49 | 50 | /* For Metric Modules */ 51 | int metric_period; 52 | int index; 53 | }; 54 | 55 | /* 56 | * cerebrod_speaker 57 | * 58 | * Runs the cerebrod speaker thread 59 | * 60 | * Passed no argument 61 | * 62 | * Executed in detached state, no return value. 63 | */ 64 | void *cerebrod_speaker(void *); 65 | 66 | /* 67 | * cerebrod_send_message 68 | * 69 | * Sends a message. Called by metric modules when necessary. 70 | * 71 | * Returns 0 on success, -1 on error. 72 | */ 73 | int cerebrod_send_message(struct cerebrod_message *msg); 74 | 75 | #endif /* _CEREBROD_SPEAKER_H */ 76 | -------------------------------------------------------------------------------- /src/libs/Makefile.am: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: Makefile.am,v 1.9 2005-06-25 00:14:28 achu Exp $ 3 | ##***************************************************************************** 4 | ## Process this file with automake to produce Makefile.in. 5 | ##***************************************************************************** 6 | 7 | # 8 | # With LTL_LIBRARIES, the libraries must be ordered correctly, or 9 | # libtool has trouble with installations. 10 | # 11 | 12 | SUBDIRS = cerebro_error \ 13 | cerebro \ 14 | common \ 15 | debug \ 16 | modules \ 17 | include \ 18 | util \ 19 | wrappers 20 | -------------------------------------------------------------------------------- /src/libs/cerebro/Makefile.am: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: Makefile.am,v 1.21 2007-10-18 21:45:28 chu11 Exp $ 3 | ##***************************************************************************** 4 | 5 | if WITH_GNU_LD 6 | CEREBRO_VERSION_SCRIPT = $(srcdir)/cerebro.map 7 | CEREBRO_OTHER_FLAGS = -Wl,--version-script=$(CEREBRO_VERSION_SCRIPT) 8 | endif 9 | 10 | if !WITH_STATIC_MODULES 11 | LTDL_LIBS = ../../../libltdl/libltdlc.la 12 | endif 13 | 14 | noinst_HEADERS = cerebro_api.h \ 15 | cerebro_config_util.h \ 16 | cerebro_metric_util.h \ 17 | cerebro_namelist_util.h \ 18 | cerebro_nodelist_util.h \ 19 | cerebro_util.h 20 | 21 | lib_LTLIBRARIES = libcerebro.la 22 | libcerebro_la_CFLAGS = -D_REENTRANT \ 23 | -I$(srcdir)/../common \ 24 | -I$(srcdir)/../debug \ 25 | -I$(srcdir)/../include \ 26 | -I$(srcdir)/../modules \ 27 | -I$(srcdir)/../util 28 | libcerebro_la_SOURCES = cerebro.c \ 29 | cerebro_config_util.c \ 30 | cerebro_event.c \ 31 | cerebro_metric_control.c \ 32 | cerebro_metric_data.c \ 33 | cerebro_metric_names.c \ 34 | cerebro_metric_util.c \ 35 | cerebro_namelist.c \ 36 | cerebro_namelist_util.c \ 37 | cerebro_nodelist.c \ 38 | cerebro_nodelist_util.c \ 39 | cerebro_util.c 40 | libcerebro_la_LDFLAGS = -version-info @LIBCEREBRO_VERSION_INFO@ \ 41 | $(CEREBRO_OTHER_FLAGS) 42 | libcerebro_la_LIBADD = ../cerebro_error/libcerebro_error.la \ 43 | ../common/libconffile.la \ 44 | ../common/libfd.la \ 45 | ../common/liblist.la \ 46 | ../common/libmarshall.la \ 47 | ../debug/libdebug.la \ 48 | ../modules/libconfigmodules.la \ 49 | ../modules/libmodules.la \ 50 | ../util/libutil_config.la \ 51 | ../util/libutil_data.la \ 52 | ../util/libutil_network.la \ 53 | $(LTDL_LIBS) 54 | 55 | ../../../libltdl/libltdlc.la : force-dependency-check 56 | @cd `dirname $@` && make `basename $@` 57 | 58 | ../cerebro_error/libcerebro_error.la : force-dependency-check 59 | @cd `dirname $@` && make `basename $@` 60 | 61 | ../common/libconffile.la : force-dependency-check 62 | @cd `dirname $@` && make `basename $@` 63 | 64 | ../common/libfd.la : force-dependency-check 65 | @cd `dirname $@` && make `basename $@` 66 | 67 | ../common/liblist.la : force-dependency-check 68 | @cd `dirname $@` && make `basename $@` 69 | 70 | ../common/libmarshall.la : force-dependency-check 71 | @cd `dirname $@` && make `basename $@` 72 | 73 | ../debug/libdebug.la : force-dependency-check 74 | @cd `dirname $@` && make `basename $@` 75 | 76 | ../modules/libconfigmodules.la : force-dependency-check 77 | @cd `dirname $@` && make `basename $@` 78 | 79 | ../modules/libmodules.la : force-dependency-check 80 | @cd `dirname $@` && make `basename $@` 81 | 82 | ../util/libutil_config.la : force-dependency-check 83 | @cd `dirname $@` && make `basename $@` 84 | 85 | ../util/libutil_data.la : force-dependency-check 86 | @cd `dirname $@` && make `basename $@` 87 | 88 | ../util/libutil_network.la : force-dependency-check 89 | @cd `dirname $@` && make `basename $@` 90 | 91 | force-dependency-check: 92 | 93 | EXTRA_DIST = cerebro.map 94 | -------------------------------------------------------------------------------- /src/libs/cerebro/cerebro.map: -------------------------------------------------------------------------------- 1 | { 2 | global: 3 | cerebro*; 4 | local: 5 | *; 6 | }; 7 | -------------------------------------------------------------------------------- /src/libs/cerebro/cerebro_config_util.c: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebro_config_util.c,v 1.14 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #if HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif /* HAVE_CONFIG_H */ 31 | 32 | #include 33 | #include 34 | #if STDC_HEADERS 35 | #include 36 | #endif /* STDC_HEADERS */ 37 | 38 | #include "cerebro_api.h" 39 | #include "cerebro_config_util.h" 40 | #include "cerebro_util.h" 41 | #include "cerebro/cerebro_config.h" 42 | 43 | #include "config_module.h" 44 | #include "config_util.h" 45 | #include "debug.h" 46 | 47 | int 48 | _cerebro_load_config(cerebro_t handle) 49 | { 50 | unsigned int errnum; 51 | 52 | if (_cerebro_handle_check(handle) < 0) 53 | return -1; 54 | 55 | if (handle->loaded_state & CEREBRO_CONFIG_LOADED) 56 | return 0; 57 | 58 | memset(&(handle->config_data), '\0', sizeof(struct cerebro_config)); 59 | if (load_config(&(handle->config_data), &errnum) < 0) 60 | { 61 | CEREBRO_DBG(("merge_cerebro_configs")); 62 | handle->errnum = errnum; 63 | return -1; 64 | } 65 | 66 | handle->loaded_state |= CEREBRO_CONFIG_LOADED; 67 | return 0; 68 | } 69 | 70 | int 71 | _cerebro_unload_config(cerebro_t handle) 72 | { 73 | if (_cerebro_handle_check(handle) < 0) 74 | return -1; 75 | 76 | memset(&(handle->config_data), '\0', sizeof(struct cerebro_config)); 77 | 78 | handle->loaded_state &= ~CEREBRO_CONFIG_LOADED; 79 | return 0; 80 | } 81 | -------------------------------------------------------------------------------- /src/libs/cerebro/cerebro_config_util.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebro_config_util.h,v 1.8 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBRO_CONFIG_UTIL_H 29 | #define _CEREBRO_CONFIG_UTIL_H 30 | 31 | #include "cerebro.h" 32 | 33 | /* 34 | * _cerebro_load_config 35 | * 36 | * Read and load config file data 37 | * 38 | * Returns 0 on success, -1 on error 39 | */ 40 | int _cerebro_load_config(cerebro_t handle); 41 | 42 | /* 43 | * _cerebro_unload_config 44 | * 45 | * Unload config file info 46 | * 47 | * Returns 0 on success, -1 on error 48 | */ 49 | int _cerebro_unload_config(cerebro_t handle); 50 | 51 | #endif /* _CEREBRO_CONFIG_UTIL_H */ 52 | -------------------------------------------------------------------------------- /src/libs/cerebro/cerebro_metric_util.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebro_metric_util.h,v 1.17 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBRO_METRIC_UTIL_H 29 | #define _CEREBRO_METRIC_UTIL_H 30 | 31 | #include "cerebro.h" 32 | 33 | #include "cerebro/cerebro_metric_server_protocol.h" 34 | 35 | /* 36 | * Cerebro_metric_receive_response 37 | * 38 | * Function to call after the metric request has been sent 39 | */ 40 | typedef int (*Cerebro_metric_receive_response)(cerebro_t handle, 41 | void *list, 42 | struct cerebro_metric_server_response *res, 43 | unsigned int bytes_read, 44 | int fd); 45 | 46 | /* 47 | * _cerebro_metric_get_data 48 | * 49 | * Connect to the cerebrod metric and receive responses 50 | * 51 | * Returns 0 on success, -1 on error 52 | */ 53 | int _cerebro_metric_get_data(cerebro_t handle, 54 | void *list, 55 | const char *metric_name, 56 | Cerebro_metric_receive_response receive_response); 57 | 58 | #endif /* _CEREBRO_METRIC_UTIL_H */ 59 | -------------------------------------------------------------------------------- /src/libs/cerebro/cerebro_namelist_util.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebro_namelist_util.h,v 1.6 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBRO_NAMELIST_UTIL_H 29 | #define _CEREBRO_NAMELIST_UTIL_H 30 | 31 | #include "cerebro.h" 32 | 33 | /* 34 | * _cerebro_namelist_check 35 | * 36 | * Checks for a proper cerebro namelist, setting the errnum 37 | * appropriately if an error is found. 38 | * 39 | * Returns 0 on success, -1 on error 40 | */ 41 | int _cerebro_namelist_check(cerebro_namelist_t namelist); 42 | 43 | /* 44 | * _cerebro_namelist_create 45 | * 46 | * Create and initialize a namelist 47 | * 48 | * Returns namelist on success, NULL on error 49 | */ 50 | cerebro_namelist_t _cerebro_namelist_create(cerebro_t handle); 51 | 52 | /* 53 | * _cerebro_namelist_append 54 | * 55 | * Append additional namelist data 56 | * 57 | * Returns 0 on success, -1 on error 58 | */ 59 | int _cerebro_namelist_append(cerebro_namelist_t namelist, 60 | const char *metric_name); 61 | 62 | #endif /* _CEREBRO_NAMELIST_UTIL_H */ 63 | -------------------------------------------------------------------------------- /src/libs/cerebro/cerebro_nodelist_util.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebro_nodelist_util.h,v 1.8 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBRO_NODELIST_UTIL_H 29 | #define _CEREBRO_NODELIST_UTIL_H 30 | 31 | #include "cerebro.h" 32 | 33 | /* 34 | * _cerebro_nodelist_check 35 | * 36 | * Checks for a proper cerebro nodelist, setting the errnum 37 | * appropriately if an error is found. 38 | * 39 | * Returns 0 on success, -1 on error 40 | */ 41 | int _cerebro_nodelist_check(cerebro_nodelist_t nodelist); 42 | 43 | /* 44 | * _cerebro_nodelist_create 45 | * 46 | * Create and initialize a nodelist 47 | * 48 | * Returns nodelist on success, NULL on error 49 | */ 50 | cerebro_nodelist_t _cerebro_nodelist_create(cerebro_t handle, 51 | const char *metric_name); 52 | 53 | /* 54 | * _cerebro_nodelist_append 55 | * 56 | * Append additional nodelist data 57 | * 58 | * Returns 0 on success, -1 on error 59 | */ 60 | int _cerebro_nodelist_append(cerebro_nodelist_t nodelist, 61 | const char *nodename, 62 | u_int32_t metric_value_received_time, 63 | u_int32_t metric_value_type, 64 | u_int32_t metric_value_len, 65 | void *metric_value); 66 | 67 | /* 68 | * _cerebro_nodelist_sort 69 | * 70 | * Sort the nodelist by nodename 71 | * 72 | * Returns 0 on success, -1 on error 73 | */ 74 | int _cerebro_nodelist_sort(cerebro_nodelist_t nodelist); 75 | 76 | #endif /* _CEREBRO_NODELIST_UTIL_H */ 77 | -------------------------------------------------------------------------------- /src/libs/cerebro/cerebro_util.c: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebro_util.c,v 1.12 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #if HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif /* HAVE_CONFIG_H */ 31 | 32 | #include 33 | #include 34 | 35 | #include "cerebro.h" 36 | #include "cerebro_api.h" 37 | #include "cerebro_util.h" 38 | 39 | #include "debug.h" 40 | 41 | int 42 | _cerebro_handle_check(cerebro_t handle) 43 | { 44 | if (!handle || handle->magic != CEREBRO_MAGIC_NUMBER) 45 | return -1; 46 | 47 | if (!handle->namelists) 48 | { 49 | CEREBRO_DBG(("namelists null")); 50 | handle->errnum = CEREBRO_ERR_INTERNAL; 51 | return -1; 52 | } 53 | 54 | if (!handle->nodelists) 55 | { 56 | CEREBRO_DBG(("nodelists null")); 57 | handle->errnum = CEREBRO_ERR_INTERNAL; 58 | return -1; 59 | } 60 | 61 | return 0; 62 | } 63 | 64 | -------------------------------------------------------------------------------- /src/libs/cerebro/cerebro_util.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebro_util.h,v 1.8 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBRO_UTIL_H 29 | #define _CEREBRO_UTIL_H 30 | 31 | /* 32 | * _cerebro_handle_check 33 | * 34 | * Checks for a proper cerebro handle, setting the errnum 35 | * appropriately if an error is found. 36 | * 37 | * Returns 0 on succss, -1 on error 38 | */ 39 | int _cerebro_handle_check(cerebro_t handle); 40 | 41 | #endif /* _CEREBRO_UTIL_H */ 42 | -------------------------------------------------------------------------------- /src/libs/cerebro_error/Makefile.am: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: Makefile.am,v 1.4 2005-08-05 22:51:21 achu Exp $ 3 | ##***************************************************************************** 4 | 5 | if WITH_GNU_LD 6 | CEREBRO_ERROR_VERSION_SCRIPT = $(srcdir)/cerebro_error.map 7 | CEREBRO_ERROR_OTHER_FLAGS = -Wl,--version-script=$(CEREBRO_ERROR_VERSION_SCRIPT) 8 | endif 9 | 10 | lib_LTLIBRARIES = libcerebro_error.la 11 | libcerebro_error_la_CFLAGS = -D_REENTRANT \ 12 | -I$(srcdir)/../common \ 13 | -I$(srcdir)/../include 14 | libcerebro_error_la_SOURCES = cerebro_error.c 15 | libcerebro_error_la_LDFLAGS = -version-info @LIBCEREBRO_ERROR_VERSION_INFO@ \ 16 | $(CEREBRO_ERROR_OTHER_FLAGS) 17 | libcerebro_error_la_LIBADD = ../common/liberror.la 18 | 19 | ../common/liberror.la : force-dependency-check 20 | @cd `dirname $@` && make `basename $@` 21 | 22 | force-dependency-check: 23 | 24 | EXTRA_DIST = cerebro_error.map 25 | -------------------------------------------------------------------------------- /src/libs/cerebro_error/cerebro_error.map: -------------------------------------------------------------------------------- 1 | { 2 | global: 3 | cerebro*; 4 | local: 5 | *; 6 | }; 7 | -------------------------------------------------------------------------------- /src/libs/common/Makefile.am: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: Makefile.am,v 1.11 2006-11-08 00:34:04 chu11 Exp $ 3 | ##***************************************************************************** 4 | ## Process this file with automake to produce Makefile.in. 5 | ##***************************************************************************** 6 | 7 | noinst_HEADERS = conffile.h \ 8 | error.h \ 9 | fd.h \ 10 | hash.h \ 11 | hostlist.h \ 12 | list.h \ 13 | marshall.h \ 14 | thread.h \ 15 | vector.h 16 | 17 | noinst_LTLIBRARIES = libconffile.la \ 18 | liberror.la \ 19 | libfd.la \ 20 | libhash.la \ 21 | libhostlist.la \ 22 | liblist.la \ 23 | libmarshall.la \ 24 | libvector.la 25 | 26 | libconffile_la_SOURCES = conffile.c 27 | 28 | liberror_la_SOURCES = error.c 29 | 30 | libfd_la_SOURCES = fd.c 31 | 32 | libhash_la_SOURCES = hash.c thread.c 33 | 34 | libhostlist_la_SOURCES = hostlist.c 35 | 36 | liblist_la_SOURCES = list.c 37 | 38 | libmarshall_la_SOURCES = marshall.c 39 | 40 | libvector_la_SOURCES = vector.c 41 | -------------------------------------------------------------------------------- /src/libs/common/error.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: error.h,v 1.7 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _ERROR_H 29 | #define _ERROR_H 30 | 31 | #if HAVE_CONFIG_H 32 | #include "config.h" 33 | #endif /* HAVE_CONFIG_H */ 34 | 35 | #include 36 | #include 37 | #if STDC_HEADERS 38 | #include 39 | #include 40 | #endif /* STDC_HEADERS */ 41 | 42 | #define ERROR_STDOUT 0x0001 43 | #define ERROR_STDERR 0x0002 44 | #define ERROR_SYSLOG 0x0004 45 | 46 | /* 47 | * err_init 48 | * 49 | * Initialize error lib with program name. This is usually the first 50 | * thing called from main, and is simply passed argv[0]. 51 | */ 52 | void err_init(char *prog); 53 | 54 | /* 55 | * err_init_exit_value 56 | * 57 | * By default, err_exit() exits with 1. Give an alternate value to 58 | * exit with. 59 | */ 60 | void err_init_exit_value(int val); 61 | 62 | /* 63 | * err_get_flags 64 | * 65 | * Returns the currently set flags 66 | */ 67 | int err_get_flags(void); 68 | 69 | /* 70 | * err_set_flags 71 | * 72 | * Sets the error lib flags to 'flags'. 73 | */ 74 | void err_set_flags(int flags); 75 | 76 | /* 77 | * err_debug 78 | * 79 | * Output a debug message 80 | */ 81 | void err_debug(const char *fmt, ...); 82 | 83 | /* 84 | * err_output 85 | * 86 | * Output an error message 87 | */ 88 | void err_output(const char *fmt, ...); 89 | 90 | /* 91 | * err_exit 92 | * 93 | * Output an error message and exit 94 | */ 95 | void err_exit(const char *fmt, ...); 96 | 97 | #endif /* _ERROR_H */ 98 | -------------------------------------------------------------------------------- /src/libs/common/thread.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * $Id: thread.c,v 1.2 2007-09-05 18:16:00 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2003 The Regents of the University of California. 5 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 6 | * Written by Chris Dunlap . 7 | * 8 | * This file is from LSD-Tools, the LLNL Software Development Toolbox. 9 | * 10 | * LSD-Tools is free software; you can redistribute it and/or modify it under 11 | * the terms of the GNU General Public License as published by the Free 12 | * Software Foundation; either version 2 of the License, or (at your option) 13 | * any later version. 14 | * 15 | * LSD-Tools is distributed in the hope that it will be useful, but WITHOUT 16 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 18 | * more details. 19 | * 20 | * You should have received a copy of the GNU General Public License along 21 | * with LSD-Tools; if not, write to the Free Software Foundation, Inc., 22 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 23 | *****************************************************************************/ 24 | 25 | 26 | #if HAVE_CONFIG_H 27 | # include "config.h" 28 | #endif /* HAVE_CONFIG_H */ 29 | 30 | #include 31 | #include 32 | #include 33 | #include "thread.h" 34 | 35 | 36 | #if WITH_PTHREADS 37 | #ifndef NDEBUG 38 | int 39 | lsd_mutex_is_locked (pthread_mutex_t *mutex) 40 | { 41 | /* Returns true if the mutex is locked; o/w, returns false. 42 | */ 43 | int rc; 44 | 45 | assert (mutex != NULL); 46 | rc = pthread_mutex_trylock (mutex); 47 | return (rc == EBUSY ? 1 : 0); 48 | } 49 | #endif /* !NDEBUG */ 50 | #endif /* WITH_PTHREADS */ 51 | -------------------------------------------------------------------------------- /src/libs/debug/Makefile.am: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: Makefile.am,v 1.2 2005-08-25 22:04:32 achu Exp $ 3 | ##***************************************************************************** 4 | 5 | noinst_HEADERS = debug.h 6 | 7 | noinst_LTLIBRARIES = libdebug.la 8 | libdebug_la_CFLAGS = -I$(srcdir)/../include 9 | libdebug_la_SOURCES = debug.c 10 | 11 | force-dependency-check: 12 | -------------------------------------------------------------------------------- /src/libs/debug/debug.c: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: debug.c,v 1.8 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #if HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif /* HAVE_CONFIG_H */ 31 | 32 | #if CEREBRO_DEBUG 33 | 34 | #if STDC_HEADERS 35 | #include 36 | #endif /* STDC_HEADERS */ 37 | 38 | #include "debug.h" 39 | 40 | char * 41 | debug_msg_create(const char *fmt, ...) 42 | { 43 | char *buffer; 44 | va_list ap; 45 | 46 | if (!fmt) 47 | return NULL; 48 | 49 | if (!(buffer = malloc(DEBUG_BUFFER_LEN))) 50 | return NULL; 51 | 52 | va_start(ap, fmt); 53 | vsnprintf(buffer, DEBUG_BUFFER_LEN, fmt, ap); 54 | va_end(ap); 55 | 56 | return buffer; 57 | } 58 | 59 | #endif /* CEREBRO_DEBUG */ 60 | -------------------------------------------------------------------------------- /src/libs/include/Makefile.am: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: Makefile.am,v 1.11 2006-11-15 00:12:30 chu11 Exp $ 3 | ##***************************************************************************** 4 | 5 | include_HEADERS = cerebro.h 6 | nobase_include_HEADERS = cerebro/cerebro_clusterlist_module.h \ 7 | cerebro/cerebro_config.h \ 8 | cerebro/cerebro_config_module.h \ 9 | cerebro/cerebro_constants.h \ 10 | cerebro/cerebro_error.h \ 11 | cerebro/cerebro_event_module.h \ 12 | cerebro/cerebro_event_protocol.h \ 13 | cerebro/cerebro_metric_module.h \ 14 | cerebro/cerebro_monitor_module.h \ 15 | cerebro/cerebro_metric_server_protocol.h \ 16 | cerebro/cerebro_metric_control_protocol.h \ 17 | cerebro/cerebrod_message_protocol.h 18 | -------------------------------------------------------------------------------- /src/libs/include/cerebro/cerebro_constants.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebro_constants.h,v 1.16 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBRO_CONSTANTS_H 29 | #define _CEREBRO_CONSTANTS_H 30 | 31 | /* Do not use MAXHOSTNAMELEN defined in sys/param.h. We do not want 32 | * the possibility that other machines may have a different length 33 | * definition for MAXHOSTNAMELEN. We define our own maximum nodename 34 | * length. 35 | */ 36 | #define CEREBRO_MAX_NODENAME_LEN 64 37 | #define CEREBRO_MAX_HOSTNAME_LEN CEREBRO_MAX_NODENAME_LEN 38 | 39 | #define CEREBRO_MAX_PATH_LEN 512 40 | 41 | /* 65536 = 64K = Max UDP packet size */ 42 | #define CEREBRO_MAX_PACKET_LEN 65536 43 | 44 | #define CEREBRO_MAX_IPADDR_LEN 64 45 | 46 | #define CEREBRO_MAX_NETWORK_INTERFACE_LEN 128 47 | 48 | #define CEREBRO_MAX_METRIC_NAME_LEN 32 49 | 50 | #define CEREBRO_MAX_EVENT_NAME_LEN 32 51 | 52 | /* Max of CEREBRO_MAX_NODENAME_LEN & CEREBRO_MAX_METRIC_NAME_LEN */ 53 | #define CEREBRO_MAX_NAME_LEN CEREBRO_MAX_NODENAME_LEN 54 | 55 | /* Leave atleast 1K for packet header information */ 56 | #define CEREBRO_MAX_DATA_STRING_LEN (CEREBRO_MAX_PACKET_LEN - 1024) 57 | 58 | /* achu: all modules don't have a name length, and cerebrod doesn't 59 | * check for a name length. This is a hack to get the 60 | * cerebrod_metric_module_exclude option going. 61 | */ 62 | #define CEREBRO_MAX_MODULE_NAME_LEN 64 63 | 64 | #endif /* _CEREBRO_CONSTANTS_H */ 65 | -------------------------------------------------------------------------------- /src/libs/include/cerebro/cerebro_error.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebro_error.h,v 1.7 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBRO_ERROR_H 29 | #define _CEREBRO_ERROR_H 30 | 31 | #define CEREBRO_ERROR_STDOUT 0x0001 32 | #define CEREBRO_ERROR_STDERR 0x0002 33 | #define CEREBRO_ERROR_SYSLOG 0x0004 34 | 35 | /* 36 | * cerebro_err_init 37 | * 38 | * Initializes cerebro error lib 39 | */ 40 | void cerebro_err_init(char *prog); 41 | 42 | /* 43 | * cerebro_err_get_flags 44 | * 45 | * Returns the currently set flags 46 | */ 47 | int cerebro_err_get_flags(void); 48 | 49 | /* 50 | * cerebro_err_set_flags 51 | * 52 | * Sets the error lib flags to 'flags'. 53 | */ 54 | void cerebro_err_set_flags(int flags); 55 | 56 | /* 57 | * cerebro_err_debug 58 | * 59 | * Outputs error debugging. 60 | */ 61 | void cerebro_err_debug(const char *fmt, ...); 62 | 63 | /* 64 | * cerebro_err_output 65 | * 66 | * Calls error output. 67 | */ 68 | void cerebro_err_output(const char *fmt, ...); 69 | 70 | /* 71 | * cerebro_err_exit 72 | * 73 | * Outputs error and exits 74 | */ 75 | void cerebro_err_exit(const char *fmt, ...); 76 | 77 | #endif /* _CEREBRO_ERROR_H */ 78 | -------------------------------------------------------------------------------- /src/libs/include/cerebro/cerebrod_message_protocol.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebrod_message_protocol.h,v 1.6 2010-02-02 01:01:20 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBROD_MESSAGE_PROTOCOL_H 29 | #define _CEREBROD_MESSAGE_PROTOCOL_H 30 | 31 | #include 32 | 33 | #include 34 | 35 | #define CEREBROD_MESSAGE_PROTOCOL_VERSION 2 36 | 37 | /* 38 | * struct cerebrod_message_metric 39 | * 40 | * defines message metric data 41 | */ 42 | struct cerebrod_message_metric 43 | { 44 | char metric_name[CEREBRO_MAX_METRIC_NAME_LEN]; 45 | u_int32_t metric_value_type; 46 | u_int32_t metric_value_len; 47 | void *metric_value; 48 | }; 49 | 50 | #define CEREBROD_MESSAGE_METRIC_HEADER_LEN (CEREBRO_MAX_METRIC_NAME_LEN \ 51 | + sizeof(u_int32_t) \ 52 | + sizeof(u_int32_t)) 53 | 54 | /* 55 | * struct cerebrod_message 56 | * 57 | * defines message data sent/received from each cerebrod daemon 58 | */ 59 | struct cerebrod_message 60 | { 61 | int32_t version; 62 | char nodename[CEREBRO_MAX_NODENAME_LEN]; 63 | u_int32_t metrics_len; 64 | struct cerebrod_message_metric **metrics; 65 | }; 66 | 67 | #define CEREBROD_MESSAGE_HEADER_LEN (sizeof(int32_t) \ 68 | + CEREBRO_MAX_NODENAME_LEN \ 69 | + sizeof(u_int32_t)) 70 | 71 | #endif /* _CEREBROD_MESSAGE_PROTOCOL_H */ 72 | -------------------------------------------------------------------------------- /src/libs/util/Makefile.am: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: Makefile.am,v 1.9 2006-11-08 00:34:04 chu11 Exp $ 3 | ##***************************************************************************** 4 | 5 | noinst_HEADERS = config_util.h \ 6 | data_util.h \ 7 | network_util.h 8 | 9 | noinst_LTLIBRARIES = libutil_config.la \ 10 | libutil_data.la \ 11 | libutil_network.la 12 | 13 | libutil_config_la_CFLAGS = -I$(srcdir)/../common \ 14 | -I$(srcdir)/../debug \ 15 | -I$(srcdir)/../include \ 16 | -I$(srcdir)/../modules 17 | libutil_config_la_SOURCES = config_util.c 18 | 19 | libutil_data_la_CFLAGS = -I$(srcdir)/../common \ 20 | -I$(srcdir)/../debug \ 21 | -I$(srcdir)/../include 22 | libutil_data_la_SOURCES = data_util.c 23 | 24 | libutil_network_la_CFLAGS = -I$(srcdir)/../common \ 25 | -I$(srcdir)/../debug \ 26 | -I$(srcdir)/../include \ 27 | -I$(srcdir)/../modules 28 | libutil_network_la_SOURCES = network_util.c 29 | -------------------------------------------------------------------------------- /src/libs/util/config_util.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: config_util.h,v 1.8 2010-02-02 01:01:21 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CONFIG_UTIL_H 29 | #define _CONFIG_UTIL_H 30 | 31 | #include "cerebro/cerebro_config.h" 32 | 33 | /* 34 | * load_config 35 | * 36 | * Wrapper that calls config_load_config_module, 37 | * config_load_config_file, and 38 | * config_merge_config. 39 | * 40 | * Returns data in structure and 0 on success, -1 on error 41 | */ 42 | int load_config(struct cerebro_config *conf, unsigned int *errnum); 43 | 44 | #endif /* _CONFIG_UTIL_H */ 45 | -------------------------------------------------------------------------------- /src/libs/util/network_util.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: network_util.h,v 1.8 2010-02-02 01:01:21 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _NETWORK_UTIL_H 29 | #define _NETWORK_UTIL_H 30 | 31 | /* 32 | * receive_data 33 | * 34 | * Receive a certain amount of data 35 | * 36 | * Returns bytes read on success, -1 and errnum on error. 37 | */ 38 | int receive_data(int fd, 39 | unsigned int bytes_to_read, 40 | char *buf, 41 | unsigned int buflen, 42 | unsigned int timeout_len, 43 | unsigned int *errnum); 44 | 45 | /* 46 | * low_timeout_connect 47 | * 48 | * Setup a tcp connection to 'hostname' and 'port' using a connection 49 | * timeout of 'connect_timeout'. 50 | * 51 | * Return file descriptor on success, -1 on error. 52 | */ 53 | int low_timeout_connect(const char *hostname, 54 | unsigned int port, 55 | unsigned int connect_timeout, 56 | unsigned int *errnum); 57 | 58 | 59 | #endif /* _NETWORK_UTIL_H */ 60 | -------------------------------------------------------------------------------- /src/libs/wrappers/Makefile.am: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: Makefile.am,v 1.9 2009-10-16 23:49:25 chu11 Exp $ 3 | ##***************************************************************************** 4 | 5 | noinst_HEADERS = wrappers.h 6 | 7 | noinst_LTLIBRARIES = libwrappers.la \ 8 | libwrappers_hash.la \ 9 | libwrappers_hostlist.la \ 10 | libwrappers_list.la \ 11 | libwrappers_marshall.la \ 12 | libwrappers_pthread.la 13 | 14 | libwrappers_la_CFLAGS = -I$(srcdir)/../common \ 15 | -I$(srcdir)/../include \ 16 | -I$(srcdir)/../../../libltdl 17 | libwrappers_la_SOURCES = wrappers.c 18 | 19 | libwrappers_hash_la_CFLAGS = -I$(srcdir)/../common \ 20 | -I$(srcdir)/../include \ 21 | -I$(srcdir)/../../../libltdl 22 | libwrappers_hash_la_SOURCES = wrappers_hash.c 23 | 24 | libwrappers_hostlist_la_CFLAGS = -I$(srcdir)/../common \ 25 | -I$(srcdir)/../include \ 26 | -I$(srcdir)/../../../libltdl 27 | libwrappers_hostlist_la_SOURCES = wrappers_hostlist.c 28 | 29 | libwrappers_list_la_CFLAGS = -I$(srcdir)/../common \ 30 | -I$(srcdir)/../include \ 31 | -I$(srcdir)/../../../libltdl 32 | libwrappers_list_la_SOURCES = wrappers_list.c 33 | 34 | libwrappers_marshall_la_CFLAGS = -I$(srcdir)/../common \ 35 | -I$(srcdir)/../include \ 36 | -I$(srcdir)/../../../libltdl 37 | libwrappers_marshall_la_SOURCES = wrappers_marshall.c 38 | 39 | if !WITH_CEREBROD_NO_THREADS 40 | libwrappers_pthread_la_CFLAGS = -I$(srcdir)/../common \ 41 | -I$(srcdir)/../include \ 42 | -I$(srcdir)/../../../libltdl \ 43 | $(PTHREAD_CFLAGS) 44 | libwrappers_pthread_la_LDFLAGS = $(PTHREAD_LIBS) 45 | else 46 | libwrappers_pthread_la_CFLAGS = -I$(srcdir)/../common \ 47 | -I$(srcdir)/../include \ 48 | -I$(srcdir)/../../../libltdl 49 | endif 50 | 51 | libwrappers_pthread_la_SOURCES = wrappers_pthread.c 52 | 53 | force-dependency-check: 54 | -------------------------------------------------------------------------------- /src/modules/Makefile.am: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: Makefile.am,v 1.7 2006-11-08 00:34:04 chu11 Exp $ 3 | ##***************************************************************************** 4 | ## Process this file with automake to produce Makefile.in. 5 | ##***************************************************************************** 6 | 7 | SUBDIRS = clusterlist config event metric monitor 8 | -------------------------------------------------------------------------------- /src/modules/clusterlist/cerebro_clusterlist_genders_util.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebro_clusterlist_genders_util.h,v 1.15 2010-02-02 01:01:21 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBRO_CLUSTERLIST_GENDERS_UTIL_H 29 | #define _CEREBRO_CLUSTERLIST_GENDERS_UTIL_H 30 | 31 | /* 32 | * cerebro_clusterlist_genders_setup 33 | * 34 | * common setup function for genders and gendersllnl setup 35 | */ 36 | int cerebro_clusterlist_genders_setup(genders_t *gh, char *filename); 37 | 38 | /* 39 | * cerebro_clusterlist_genders_cleanup 40 | * 41 | * common cleanup function for genders and gendersllnl cleanup 42 | */ 43 | int cerebro_clusterlist_genders_cleanup(genders_t *gh); 44 | 45 | /* 46 | * cerebro_clusterlist_genders_numnodes 47 | * 48 | * common numnodes function for genders and gendersllnl numnodes 49 | */ 50 | int cerebro_clusterlist_genders_numnodes(genders_t gh); 51 | 52 | /* 53 | * cerebro_clusterlist_genders_get_all_nodes 54 | * 55 | * common get_all_nodes function for genders and gendersllnl get_all_nodes 56 | */ 57 | int cerebro_clusterlist_genders_get_all_nodes(genders_t gh, char ***nodes); 58 | 59 | #endif /* _CEREBRO_CLUSTERLIST_GENDERS_UTIL_H */ 60 | -------------------------------------------------------------------------------- /src/modules/clusterlist/cerebro_clusterlist_util.c: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebro_clusterlist_util.c,v 1.20 2010-02-02 01:01:21 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #if HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif /* HAVE_CONFIG_H */ 31 | 32 | #include 33 | #include 34 | #if STDC_HEADERS 35 | #include 36 | #endif /* STDC_HEADERS */ 37 | 38 | #include "cerebro_clusterlist_util.h" 39 | 40 | #include "debug.h" 41 | 42 | int 43 | cerebro_copy_nodename(const char *node, char *buf, unsigned int buflen) 44 | { 45 | int len; 46 | 47 | if (!node || !buf || !buflen) 48 | { 49 | CEREBRO_DBG(("invalid parameters")); 50 | return -1; 51 | } 52 | 53 | len = strlen(node); 54 | if ((len + 1) > buflen) 55 | { 56 | CEREBRO_DBG(("buflen too small: len=%d buflen=%d", len, buflen)); 57 | return -1; 58 | } 59 | 60 | strcpy(buf, node); 61 | 62 | return 0; 63 | } 64 | -------------------------------------------------------------------------------- /src/modules/clusterlist/cerebro_clusterlist_util.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebro_clusterlist_util.h,v 1.12 2010-02-02 01:01:21 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBRO_CLUSTERLIST_UTIL_H 29 | #define _CEREBRO_CLUSTERLIST_UTIL_H 30 | 31 | /* 32 | * cerebro_copy_nodename 33 | * 34 | * Copy a node string into a buffer, checking for length appropriately 35 | * 36 | * Returns 0 on success, -1 on error 37 | */ 38 | int cerebro_copy_nodename(const char *node, char *buf, unsigned int buflen); 39 | 40 | #endif /* _CEREBRO_CLUSTERLIST_UTIL_H */ 41 | -------------------------------------------------------------------------------- /src/modules/clusterlist/clusterlist.map: -------------------------------------------------------------------------------- 1 | { 2 | global: 3 | clusterlist_module_info; 4 | local: 5 | *; 6 | }; 7 | -------------------------------------------------------------------------------- /src/modules/config/Makefile.am: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: Makefile.am,v 1.20 2006-01-18 19:40:43 chu11 Exp $ 3 | ##***************************************************************************** 4 | ## Process this file with automake to produce Makefile.in. 5 | ##***************************************************************************** 6 | 7 | if WITH_GNU_LD 8 | CONFIG_VERSION_SCRIPT = $(srcdir)/config.map 9 | CONFIG_OTHER_FLAGS = -Wl,--version-script=$(CONFIG_VERSION_SCRIPT) 10 | endif 11 | 12 | if WITH_STATIC_MODULES 13 | noinst_LTLIBRARIES = libstaticconfigmodules.la 14 | else 15 | modulelibdir = $(CEREBRO_MODULE_DIR) 16 | endif 17 | 18 | MODULE_FLAGS = -module -avoid-version 19 | 20 | libstaticconfigmodules_la_SOURCES = 21 | libstaticconfigmodules_la_CFLAGS = -I$(srcdir)/../../libs/include \ 22 | -I$(srcdir)/../../libs/debug 23 | libstaticconfigmodules_la_LDFLAGS = $(CONFIG_OTHER_FLAGS) 24 | 25 | 26 | ../../libs/debug/libdebug.la : force-dependency-check 27 | @cd `dirname $@` && make `basename $@` 28 | 29 | force-dependency-check: 30 | 31 | EXTRA_DIST = config.map 32 | -------------------------------------------------------------------------------- /src/modules/config/config.map: -------------------------------------------------------------------------------- 1 | { 2 | global: 3 | config_module_info; 4 | local: 5 | *; 6 | }; 7 | -------------------------------------------------------------------------------- /src/modules/event/Makefile.am: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: Makefile.am,v 1.5 2008-03-28 16:18:58 chu11 Exp $ 3 | ##***************************************************************************** 4 | ## Process this file with automake to produce Makefile.in. 5 | ##***************************************************************************** 6 | 7 | if WITH_GNU_LD 8 | EVENT_VERSION_SCRIPT = $(srcdir)/event.map 9 | EVENT_OTHER_FLAGS = -Wl,--version-script=$(EVENT_VERSION_SCRIPT) 10 | endif 11 | 12 | if WITH_UPDOWN 13 | UPDOWN_MODULE = cerebro_event_updown.la 14 | UPDOWN_STATIC_SOURCES = cerebro_event_updown.c 15 | endif 16 | 17 | if WITH_STATIC_MODULES 18 | noinst_LTLIBRARIES = libstaticeventmodules.la 19 | else 20 | modulelibdir = $(CEREBRO_MODULE_DIR) 21 | modulelib_LTLIBRARIES = $(UPDOWN_MODULE) 22 | endif 23 | 24 | MODULE_FLAGS = -module -avoid-version 25 | 26 | libstaticeventmodules_la_SOURCES = $(UPDOWN_STATIC_SOURCES) 27 | libstaticeventmodules_la_CFLAGS = -I$(srcdir)/../../libs/include \ 28 | -I$(srcdir)/../../libs/common \ 29 | -I$(srcdir)/../../libs/debug 30 | libstaticeventmodules_la_LDFLAGS = $(EVENT_OTHER_FLAGS) 31 | 32 | cerebro_event_updown_la_SOURCES = cerebro_event_updown.c 33 | cerebro_event_updown_la_LDFLAGS = $(MODULE_FLAGS) \ 34 | $(EVENT_OTHER_FLAGS) 35 | cerebro_event_updown_la_CFLAGS = -I$(srcdir)/../../libs/include \ 36 | -I$(srcdir)/../../libs/common \ 37 | -I$(srcdir)/../../libs/debug 38 | cerebro_event_updown_la_LIBADD = ../../libs/common/libhash.la \ 39 | ../../libs/common/liblist.la \ 40 | ../../libs/debug/libdebug.la \ 41 | ../../libs/cerebro_error/libcerebro_error.la 42 | 43 | force-dependency-check: 44 | 45 | ../../libs/common/libhash.la : force-dependency-check 46 | @cd `dirname $@` && make `basename $@` 47 | 48 | ../../libs/common/liblist.la : force-dependency-check 49 | @cd `dirname $@` && make `basename $@` 50 | 51 | ../../libs/cerebro_error/libcerebro_error.la : force-dependency-check 52 | @cd `dirname $@` && make `basename $@` 53 | 54 | ../../libs/debug/libdebug.la : force-dependency-check 55 | @cd `dirname $@` && make `basename $@` 56 | 57 | EXTRA_DIST = event.map 58 | -------------------------------------------------------------------------------- /src/modules/event/event.map: -------------------------------------------------------------------------------- 1 | { 2 | global: 3 | event_module_info; 4 | local: 5 | *; 6 | }; 7 | -------------------------------------------------------------------------------- /src/modules/metric/cerebro_metric_loadavg.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebro_metric_loadavg.h,v 1.6 2010-02-02 01:01:21 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBRO_METRIC_LOADAVG 29 | #define _CEREBRO_METRIC_LOADAVG 30 | 31 | int cerebro_metric_get_loadavgs(float *loadavg1, 32 | float *loadavg5, 33 | float *loadavg15); 34 | 35 | #endif /* _CEREBRO_METRIC_LOADAVG */ 36 | 37 | -------------------------------------------------------------------------------- /src/modules/metric/cerebro_metric_memory.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebro_metric_memory.h,v 1.6 2010-02-02 01:01:21 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBRO_METRIC_MEMORY 29 | #define _CEREBRO_METRIC_MEMORY 30 | 31 | int cerebro_metric_get_memory(u_int32_t *memtotal, 32 | u_int32_t *memfree, 33 | u_int32_t *swaptotal, 34 | u_int32_t *swapfree); 35 | 36 | #endif /* _CEREBRO_METRIC_MEMORY */ 37 | -------------------------------------------------------------------------------- /src/modules/metric/cerebro_metric_network.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | * $Id: cerebro_metric_network.h,v 1.6 2010-02-02 01:01:21 chu11 Exp $ 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2018 Lawrence Livermore National Security, LLC. 5 | * Copyright (C) 2005-2007 The Regents of the University of California. 6 | * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). 7 | * Written by Albert Chu . 8 | * UCRL-CODE-155989 All rights reserved. 9 | * 10 | * This file is part of Cerebro, a collection of cluster monitoring 11 | * tools and libraries. For details, see 12 | * . 13 | * 14 | * Cerebro is free software; you can redistribute it and/or modify it under 15 | * the terms of the GNU General Public License as published by the Free 16 | * Software Foundation; either version 2 of the License, or (at your option) 17 | * any later version. 18 | * 19 | * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY 20 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 21 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 22 | * details. 23 | * 24 | * You should have received a copy of the GNU General Public License along 25 | * with Cerebro. If not, see . 26 | \*****************************************************************************/ 27 | 28 | #ifndef _CEREBRO_METRIC_NETWORK 29 | #define _CEREBRO_METRIC_NETWORK 30 | 31 | int cerebro_metric_get_network(u_int64_t *bytesin, 32 | u_int64_t *bytesout, 33 | u_int32_t *packetsin, 34 | u_int32_t *packetsout, 35 | u_int32_t *rxerrs, 36 | u_int32_t *txerrs); 37 | 38 | #endif /* _CEREBRO_METRIC_NETWORK */ 39 | -------------------------------------------------------------------------------- /src/modules/metric/metric.map: -------------------------------------------------------------------------------- 1 | { 2 | global: 3 | metric_module_info; 4 | local: 5 | *; 6 | }; 7 | -------------------------------------------------------------------------------- /src/modules/monitor/Makefile.am: -------------------------------------------------------------------------------- 1 | ##***************************************************************************** 2 | ## $Id: Makefile.am,v 1.13 2006-01-18 19:40:43 chu11 Exp $ 3 | ##***************************************************************************** 4 | ## Process this file with automake to produce Makefile.in. 5 | ##***************************************************************************** 6 | 7 | if WITH_GNU_LD 8 | MONITOR_VERSION_SCRIPT = $(srcdir)/monitor.map 9 | MONITOR_OTHER_FLAGS = -Wl,--version-script=$(MONITOR_VERSION_SCRIPT) 10 | endif 11 | 12 | if WITH_STATIC_MODULES 13 | noinst_LTLIBRARIES = libstaticmonitormodules.la 14 | else 15 | modulelibdir = $(CEREBRO_MODULE_DIR) 16 | modulelib_LTLIBRARIES = 17 | endif 18 | 19 | MODULE_FLAGS = -module -avoid-version 20 | 21 | libstaticmonitormodules_la_SOURCES = 22 | libstaticmonitormodules_la_CFLAGS = -I$(srcdir)/../../libs/include \ 23 | -I$(srcdir)/../../libs/debug 24 | libstaticmonitormodules_la_LDFLAGS = $(MONITOR_OTHER_FLAGS) 25 | 26 | force-dependency-check: 27 | 28 | EXTRA_DIST = monitor.map 29 | -------------------------------------------------------------------------------- /src/modules/monitor/monitor.map: -------------------------------------------------------------------------------- 1 | { 2 | global: 3 | monitor_module_info; 4 | local: 5 | *; 6 | }; 7 | --------------------------------------------------------------------------------