./wulfware-2.6.0/0000755000247100024710000000000010645251201011614 5ustar rgbrgb./wulfware-2.6.0/ChangeLog0000644000247100024710000003343310645251201013374 0ustar rgbrgb------------------------------------------------------------------------ r54 | rgb | 2007-07-11 17:48:36 -0400 (Wed, 11 Jul 2007) | 2 lines Sending it in to the other two svn repos. ------------------------------------------------------------------------ r53 | rgb | 2007-07-11 17:48:15 -0400 (Wed, 11 Jul 2007) | 15 lines OK, all packages are now installed and working on: i386 x86_64 single core Intel dual core with several examples of each. I do have an x86_64 dual core but I'm pretty confident that this is a go. I therefore dub this: Tag 2.6.0 and release it into the wild... ------------------------------------------------------------------------ r52 | rgb | 2007-07-11 17:09:11 -0400 (Wed, 11 Jul 2007) | 3 lines THIS is a version worth of checkin, although we don't know for sure if wulf2html is working or not yet. ------------------------------------------------------------------------ r51 | rgb | 2007-07-11 14:47:56 -0400 (Wed, 11 Jul 2007) | 12 lines This is a working 2.6.0alpha. We've fixed (I think) the multicore problem, pulling the number of cores from /proc/cpuinfo and turning them into xml and parsing them at the receiving end. Because of the silly format of /proc/cpuinfo, the parsing code is a bit ugly, but it is servicable as long as they don't reorder the fields. I have dual, dual core servers to try this on almost immediately, after an rsync. I also need to think about adding the fields to wulf2html and testing that before releasing 2.6.0. 2.6.0 will NOT be backwards compatible on dual (or quad) core systems, but all that means is that an upgrade to 2.6.x will be forced for dual core owners. ------------------------------------------------------------------------ r50 | rgb | 2007-07-11 10:06:35 -0400 (Wed, 11 Jul 2007) | 20 lines This fixes a bug I discovered on my own. The newest multicore CPUs added another line to /proc/cpuinfo: cpu cores :2 I was parsing out cpu family, and all other cpu XXX were assumed to be clock with XXX the speed. Wrongo, moose breath -- caused wulfstat to complain about multiple cpu clock tags (as it should have). The fix was easy enough -- to add another conditional in xmlsysd to check for cores before parsing for the (remaining) clock. I could parse for clock directly on MHz, but I'm fairly certain that any day now they're going to change over to GHz units, as we're rapidly approaching 10,000+ MHz clocks. Truthfully I'm surprised they haven't already. This still leaves me with the issue of how to display the number of cores on the already jammed wulfstat line. Might have to snitch part of the CPU name field. ------------------------------------------------------------------------ r49 | rgb | 2007-07-05 13:22:17 -0400 (Thu, 05 Jul 2007) | 2 lines This fixes the bug, making this an official final 2.5.1 release. ------------------------------------------------------------------------ r48 | rgb | 2007-07-05 12:56:35 -0400 (Thu, 05 Jul 2007) | 4 lines This is a small update on 2.5.1 -- basically I tested the build after eliminating the automated ./configure from autogen.sh. Generally speaking, though, it worked perfectly. ------------------------------------------------------------------------ r47 | rgb | 2007-07-05 11:23:23 -0400 (Thu, 05 Jul 2007) | 3 lines This is STILL Tag 2.5.1, but I screwed up and did a checkin as root so who knows what happened or will happen now. ------------------------------------------------------------------------ r46 | root | 2007-07-05 11:20:26 -0400 (Thu, 05 Jul 2007) | 10 lines This is Tag: 2.5.1 It actually builds rpms and builds/installs from autoconf as a beginning. In fact, it looks pretty cute. I DO need to work out a way of doing development work, but I'm guessing that my set load library path script will work for now. ------------------------------------------------------------------------ r45 | rgb | 2007-07-05 02:55:37 -0400 (Thu, 05 Jul 2007) | 4 lines Well, we'll try one more time. NOW we've actually cleaned up some of the Makefile cruft associated with the port, and I'm sort of remembering how this thing goes. ------------------------------------------------------------------------ r43 | rgb | 2007-07-05 02:40:43 -0400 (Thu, 05 Jul 2007) | 2 lines This is another way to sync it up at home. ------------------------------------------------------------------------ r42 | rgb | 2007-07-05 02:39:33 -0400 (Thu, 05 Jul 2007) | 3 lines This is really really close -- it builds ok, and even builds most of the way through an rpm. Probably two or three more hours of work... ------------------------------------------------------------------------ r41 | rgb | 2007-07-05 02:18:43 -0400 (Thu, 05 Jul 2007) | 4 lines This is well on the way to having autoconf tools installed, perhaps more parsimoniously than they are in dieharder, which is in need at this point of a good decrufting. ------------------------------------------------------------------------ r40 | rgb | 2007-07-05 02:07:25 -0400 (Thu, 05 Jul 2007) | 2 lines This is getting closer and closer to working through several levels... ------------------------------------------------------------------------ r38 | rgb | 2007-07-05 01:44:15 -0400 (Thu, 05 Jul 2007) | 3 lines Well, we'll try one more time to get this right. Note that we shouldn't be saving Makefile any more. ------------------------------------------------------------------------ r37 | rgb | 2007-07-05 01:38:22 -0400 (Thu, 05 Jul 2007) | 2 lines ALMOST configures clean... ------------------------------------------------------------------------ r36 | rgb | 2007-07-05 01:36:12 -0400 (Thu, 05 Jul 2007) | 4 lines Well, this seems to "work" in that it autoconf's right up, but alas it also fails to actually build. I need to keep adding the minimal amount from the dieharder tree required to make it all work. ------------------------------------------------------------------------ r33 | rgb | 2007-07-05 01:28:16 -0400 (Thu, 05 Jul 2007) | 2 lines This buildroot is not necessary or desireable. ------------------------------------------------------------------------ r32 | rgb | 2007-07-05 01:27:32 -0400 (Thu, 05 Jul 2007) | 2 lines This seems to work, right through Makefile.am... ------------------------------------------------------------------------ r31 | rgb | 2007-07-05 01:25:48 -0400 (Thu, 05 Jul 2007) | 2 lines This nees a quick checkin, although it isn't really "there". ------------------------------------------------------------------------ r30 | rgb | 2007-06-28 06:32:39 -0400 (Thu, 28 Jun 2007) | 5 lines I have no idea what's going on here, but either way I need to pursue/continue this. I also NEED to register dieharder as an FC project, but that's another story. Oh, and of course I need to install debian under vmware. ------------------------------------------------------------------------ r29 | rgb | 2007-02-06 08:08:09 -0500 (Tue, 06 Feb 2007) | 2 lines Making sure that this goes in and around... ------------------------------------------------------------------------ r28 | rgb | 2007-02-06 01:26:57 -0500 (Tue, 06 Feb 2007) | 11 lines I have no idea what just happened, but a few of the scripts in this package seem to get overwritten at random here and there. I ended up with a wulf2html that was, in fact, a mirror of /etc/wulfware/wulf2html.sh, which created a lovely loop that would lock my box up in about 1 second beyond repair on the recursive loop. I couldn't even zap it -- the zap command couldn't catch up. Anyway, squashed, and wulfware now DEFINITELY does NOT do this, but gee, I have no idea how or when it started in the first place and I suppose it could happen again. Thank God for subversion... ------------------------------------------------------------------------ r27 | rgb | 2007-02-05 11:21:22 -0500 (Mon, 05 Feb 2007) | 2 lines Just to make sure that this is all checked in and everything... ------------------------------------------------------------------------ r26 | rgb | 2007-02-04 22:49:40 -0500 (Sun, 04 Feb 2007) | 4 lines This is a decrufting checking. Note that I'm carefully moving the cruft into Cruft subdirectories instead of throwing it away. This just plain seems sensible. ------------------------------------------------------------------------ r25 | rgb | 2007-02-04 22:26:04 -0500 (Sun, 04 Feb 2007) | 5 lines This may, finally, be "it" -- done at last, with a working wulf2html. This is clearly the way it should have been done in the first place. I'm not certain I've got all the dependencies and so on done correctly, but it seems like they are probably all right. ------------------------------------------------------------------------ r24 | rgb | 2007-02-04 21:46:27 -0500 (Sun, 04 Feb 2007) | 2 lines OK, FIRST we check this in, as it all seems (miraculously) to work! ------------------------------------------------------------------------ r23 | rgb | 2007-02-04 20:34:19 -0500 (Sun, 04 Feb 2007) | 3 lines I have NO IDEA what I did before, but we need to check this in and make everything good. ------------------------------------------------------------------------ r22 | root | 2007-02-04 20:33:35 -0500 (Sun, 04 Feb 2007) | 3 lines Let's see if this doesn't build and install for a really functional wulf2html. ------------------------------------------------------------------------ r19 | rgb | 2007-02-03 11:35:46 -0500 (Sat, 03 Feb 2007) | 2 lines This SHOULD work, but it isn't, quite. Odd. ------------------------------------------------------------------------ r18 | rgb | 2007-02-03 11:30:59 -0500 (Sat, 03 Feb 2007) | 5 lines This should maybe build/install into ./buildroot cleanly on a make install, so that I can replace all that garbage in the specfile with a make BUILDROOT=%{buildroot} install and be done. One stop shopping, so to speak. ------------------------------------------------------------------------ r17 | rgb | 2007-02-03 09:44:34 -0500 (Sat, 03 Feb 2007) | 3 lines This is now fixed to make install through xmlsysd. Hmmm, let's do this via the toplevel make install. ------------------------------------------------------------------------ r16 | rgb | 2007-02-03 08:58:04 -0500 (Sat, 03 Feb 2007) | 12 lines This now works again through libwulf. I have to insert the buildroot trick into the other four targets and fix the specfile, but then I should be once again cooking with gas, so to speak. This is clearly the way to go -- in fact I can easily enough make buildroot point anywhere I like by default and life will be just fine, as long as I have installs that create the actual tree as required beneath it. I also want to make the build happen with a single make target, the good old "make install". That will then build everything and install it so that rpmbuild can package things up. In fact, I'm starting to grok rpmbuild a bit better -- ALL that matters is building the tree... ------------------------------------------------------------------------ r15 | rgb | 2007-02-03 08:47:19 -0500 (Sat, 03 Feb 2007) | 5 lines This MIGHT just work correctly, but we'll have to see if it builds at all. It has to build even if the buildroot tree doesn't exist (that is, the build cannot depend on buildroot/usr/include being already installed) unless it forces it to be installed FIRST. ------------------------------------------------------------------------ r14 | rgb | 2007-02-03 08:32:35 -0500 (Sat, 03 Feb 2007) | 2 lines Trying again... ------------------------------------------------------------------------ r12 | rgb | 2007-02-03 08:26:25 -0500 (Sat, 03 Feb 2007) | 7 lines Alas, we're going to have to reorganize. Looks like library/multipackage trees (and maybe even simple trees) benefit tremendously in terms of portable Makefiles from having a buildroot. make install can then build directly into it with a single BUILDROOT or PREFIX override, and the spec file will do the Right Thing. In the meantime, it becomes very easy to test. ------------------------------------------------------------------------ r9 | rgb | 2007-02-03 07:34:35 -0500 (Sat, 03 Feb 2007) | 3 lines This now builds the source, libwulf, xmlsysd, wulfstat and wulflogger rpms in a single build. Pretty cool, actually... ------------------------------------------------------------------------ r8 | rgb | 2007-02-03 07:21:00 -0500 (Sat, 03 Feb 2007) | 2 lines This actually works. Now to add the other two clients... ------------------------------------------------------------------------ r7 | rgb | 2007-02-03 06:54:43 -0500 (Sat, 03 Feb 2007) | 2 lines BEFORE I run this and maybe overwrite include, let's save this. ------------------------------------------------------------------------ r6 | rgb | 2007-02-03 06:40:30 -0500 (Sat, 03 Feb 2007) | 4 lines This is getting CLOSER to a build. I do need to get my dependencies right in the toplevel makefile, as the tgz needs to autorebuild when the rpm is made. ------------------------------------------------------------------------ r5 | rgb | 2007-02-02 20:22:18 -0500 (Fri, 02 Feb 2007) | 3 lines OK, this now actually "works" to make a tgz, we could start to work on rpms... ------------------------------------------------------------------------ r4 | rgb | 2007-02-02 20:11:30 -0500 (Fri, 02 Feb 2007) | 2 lines We'd better check this in lest we lose things... ------------------------------------------------------------------------ r3 | rgb | 2007-02-02 17:46:26 -0500 (Fri, 02 Feb 2007) | 2 lines Well, we do need to check this in before we drop anything, sigh. ------------------------------------------------------------------------ r2 | rgb | 2007-02-02 16:50:26 -0500 (Fri, 02 Feb 2007) | 3 lines OK, this checks in a completely ported libwulf that should be build/installable from the toplevel Makefile. ------------------------------------------------------------------------ r1 | rgb | 2007-02-02 15:07:43 -0500 (Fri, 02 Feb 2007) | 3 lines This should be interesting. This is a shell for the whole wulfware project... ------------------------------------------------------------------------ ./wulfware-2.6.0/wulfware.php0000644000247100024710000000036710645251201014167 0ustar rgbrgb ./wulfware-2.6.0/Makefile.am0000644000247100024710000002343310645251201013655 0ustar rgbrgb## Process this file with automake to produce Makefile.in SUBDIRS = libwulf xmlsysd wulfstat wulflogger wulf2html EXTRA_DIST = autogen.sh wulfware-config.in configure.ac \ THANKS BUGS SUPPORT wulfware.spec.in wulfware.m4 # install the man pages (nope, not doing this right yet) # man_MANS=wulfware.1 libwulfware.3 # m4datadir = $(datadir)/aclocal # m4data_DATA = wulfware.m4 # check_SCRIPTS = test_wulfware.sh # TESTS = test_wulfware.sh #======================================================================== # This is the toplevel Makefile for the wulfware project. It has # some very specialized targets: # # make alone should build the entire application # make install should build and install the entire application # make installweb installs to website for download # make installrepo installs to yum repo # # make tgz makes $(TGZ) of entire tree for standalone or rpm build # make rpm makes $(RPM) packages built by wulfware.spec # make svn does a svn commit and creates the timestamp $(SVNTIME) # make sync does a svn commit and syncs to list of svn-tree hosts # # make clean cleans the source directories #======================================================================== # This is the project name PROJECT = wulfware # These are the toplevel packages built by this project LIBRARY = libwulf LIBTIME = libwulf.time PROGRAM0 = xmlsysd P0TIME = xmlsysd.time PROGRAM1 = wulfstat P1TIME = wulfstat.time PROGRAM2 = wulflogger P2TIME = wulflogger.time PROGRAM3 = wulf2html P3TIME = wulf2html.time MANUALS = wulfware-doc MANTIME = wulfware-doc.time # The destination on a remote webserver, used as: # $(HOME)/public_html/$(WDIR) # on that server, and the name of an ssh-accessible login server # that contains the public_html path. WLOGIN = login.phy.duke.edu WDIR = Beowulf SVNTREE = $(HOME)/Src/svn-tree SVNPATH = $(SVNTREE)/$(PROJECT) SVNTIME = $(PROJECT:=.svn.time) #======================================================================== # This is revision information that MUST be set here and ONLY here. # It will automagically set the related information in $(SPEC) and the # subsidiary Makefiles in the source subdirectories. #======================================================================== #======================================================================== # This is revision information, automagically set from autoconf. The # actual version information is set ONLY in configure.ac #======================================================================== VERSION=@VERSION@ RELEASE=@RELEASE@ ABS = $(PROJECT).abs PHP = $(PROJECT).php # RPM/tarball target objects. We need rules for all of these. PROJECTDIR = $(PROJECT)-$(VERSION) TAR = $(PROJECTDIR).tar TGZ = $(PROJECTDIR).tgz SPEC = $(PROJECT).spec #======================================================================== # List of variants one can make. all is the default. We always # presume the simplest of dependencies and remake if includes change # for example. #======================================================================== all: $(LIBTIME) $(P0TIME) $(P1TIME) $(P2TIME) $(P3TIME) # This is not, actually, a particularly useful toplevel target. To # work correctly it also would require a full parsing of all # lower level dependencies. I'm leaving it in for the moment just # to have a default target at the toplevel that CAN be used to test. $(LIBTIME): (cd $(LIBRARY); \ make) $(P0TIME): (cd $(PROGRAM0); \ make) $(P1TIME): (cd $(PROGRAM1); \ make) $(P2TIME): (cd $(PROGRAM2); \ make) $(P3TIME): (cd $(PROGRAM3); \ make) $(ABS): Makefile cat $(ABS) | \ sed -e 's/^\(

Version \)\(.*\)/\1$(VERSION)<\/H2><\/center>/' > /tmp/$(ABS).$$ mv /tmp/$(ABS).$$ $(ABS) #======================================================================== # This is a required target for both its own sake and to support the # rpm build. It has to run unconditionally when called. Note that we # make PRECISELY what we need in terms of the source directories, # excluding all restricted material and irrelevant data. #======================================================================== tgz: Makefile COPYING Copyright NOTES README $(SPEC) $(ABS) $(PHP) ( rm -rf $(TAR) $(TGZ) $(PROJECTDIR); \ mkdir -p $(PROJECTDIR); \ cd $(LIBRARY); \ make clean; \ cd ..; \ cp -r $(LIBRARY) $(PROJECTDIR); \ cd $(PROGRAM0); \ make clean; \ cd ..; \ cp -r $(PROGRAM0) $(PROJECTDIR); \ cd $(PROGRAM1); \ make clean; \ cd ..; \ cp -r $(PROGRAM1) $(PROJECTDIR); \ cd $(PROGRAM2); \ make clean; \ cd ..; \ cp -r $(PROGRAM2) $(PROJECTDIR); \ cd $(PROGRAM3); \ make clean; \ cd ..; \ cp -r $(PROGRAM3) $(PROJECTDIR); \ cp -r include $(PROJECTDIR); \ mkdir -p $(PROJECTDIR)/lib; \ cp $(ABS) $(PROJECTDIR); \ cp $(PHP) $(PROJECTDIR); \ cp Makefile.am $(PROJECTDIR); \ cp configure $(PROJECTDIR); \ cp $(SPEC).in $(PROJECTDIR); \ cp autogen.sh $(PROJECTDIR); \ cp config.guess $(PROJECTDIR); \ cp config.sub $(PROJECTDIR); \ cp missing $(PROJECTDIR); \ cp install-sh $(PROJECTDIR); \ cp mkinstalldirs $(PROJECTDIR); \ cp ltmain.sh $(PROJECTDIR); \ cp configure.ac $(PROJECTDIR); \ cp Copyright $(PROJECTDIR); \ cp COPYING $(PROJECTDIR); \ cp INSTALL $(PROJECTDIR); \ cp AUTHORS $(PROJECTDIR); \ cp NEWS $(PROJECTDIR); \ cp ChangeLog $(PROJECTDIR); \ cp README $(PROJECTDIR); \ cp NOTES $(PROJECTDIR); \ tar -cvpf $(TAR) \ --exclude=.svn \ --exclude=Cruft \ --exclude=Exclude \ --exclude=*.tar \ --exclude=*.tgz \ --exclude=*.rpm \ ./$(PROJECTDIR); \ gzip $(TAR); \ mv $(TAR).gz $(TGZ); \ rm -rf $(PROJECTDIR)) #======================================================================== # rpm target special stuff # # To work in userspace, add the following: # %_topdir /home/rgb/Src/redhat # to your personal $(HOME)/.rpmmacros after building # yourself a private copy of the /usr/src/redhat directory structure. # # RPM_TOPDIR=/usr/src/redhat RPM_TOPDIR=$(HOME)/Src/rpm_tree # This is needed to get the right library and binary rpm. ARCH=`uname -i` # ARCH=i386 # These are the three rpms automagically built by the spec SRPM = $(PROJECT)-$(VERSION)-$(RELEASE).src.rpm LIBWULF_RPM = libwulf-$(VERSION)-$(RELEASE).$(ARCH).rpm XMLSYSD_RPM = xmlsysd-$(VERSION)-$(RELEASE).$(ARCH).rpm WULFSTAT_RPM = wulfstat-$(VERSION)-$(RELEASE).$(ARCH).rpm WULFLOGGER_RPM = wulflogger-$(VERSION)-$(RELEASE).$(ARCH).rpm WULF2HTML_RPM = wulf2html-$(VERSION)-$(RELEASE).$(ARCH).rpm $(TGZ): tgz $(SRPM): rpm $(LIBWULF_RPM): rpm $(XMLSYSD_RPM): rpm $(WULFSTAT_RPM): rpm $(WULFLOGGER_RPM): rpm $(WULF2HTML_RPM): rpm #======================================================================== # One stop shop. Basically we build this every time, we hope. rpm: Makefile $(TGZ) $(SPEC) cp $(TGZ) $(RPM_TOPDIR)/SOURCES cp $(SPEC) $(RPM_TOPDIR)/SPECS rpmbuild -ba --target=$(ARCH) $(RPM_TOPDIR)/SPECS/$(SPEC) cp $(RPM_TOPDIR)/SRPMS/$(SRPM) . cp $(RPM_TOPDIR)/RPMS/$(ARCH)/$(LIBWULF_RPM) . cp $(RPM_TOPDIR)/RPMS/$(ARCH)/$(XMLSYSD_RPM) . cp $(RPM_TOPDIR)/RPMS/$(ARCH)/$(WULFSTAT_RPM) . cp $(RPM_TOPDIR)/RPMS/$(ARCH)/$(WULFLOGGER_RPM) . cp $(RPM_TOPDIR)/RPMS/$(ARCH)/$(WULF2HTML_RPM) . svn: echo "New Checkin `date`" >> $(SVNTIME) # Will force a commit and increment revision svn commit . cat $(SVNTIME) | \ sed -e '/^New Checkin/d' >> $(SVNTIME).tmp mv $(SVNTIME).tmp $(SVNTIME) sync: echo "New Checkin `date`" >> $(SVNTIME) # Will force a commit and increment revision svn commit . # Do the commit rsync -avz --delete $(SVNPATH) login.phy.duke.edu:/home/einstein/prof/rgb/Src/svn-tree rsync -avz --delete $(SVNPATH) uriel:$(SVNTREE) cat $(SVNTIME) | \ sed -e '/^New Checkin/d' >> $(SVNTIME).tmp mv $(SVNTIME).tmp $(SVNTIME) #======================================================================== # A standard cleanup target #======================================================================== clean : - (cd $(LIBRARY); \ $(MAKE) clean; \ cd ..; \ cd $(PROGRAM0); \ $(MAKE) clean; \ cd ..; \ cd $(PROGRAM1); \ $(MAKE) clean; \ cd ..; \ cd $(PROGRAM2); \ $(MAKE) clean; \ cd ..; \ cd $(PROGRAM3); \ $(MAKE) clean;) installweb : $(TGZ) $(LIBWULF_RPM) $(XMLSYSD_RPM) $(WULFSTAT_RPM) \ $(WULFLOGGER_RPM) $(WULF2HTML) $(SRPM) $(ABS) $(PHP) (ssh $(WLOGIN) mkdir -p public_html/$(WDIR)/$(PROJECT);\ rsync -avz $(TGZ) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ rsync -avz $(SRPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ rsync -avz $(LIBWULF_RPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ rsync -avz $(XMLSYSD_RPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ rsync -avz $(WULFSTAT_RPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ rsync -avz $(WULFLOGGER_RPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ rsync -avz $(WULF2HTML_RPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ rsync -avz $(ABS) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \ rsync -avz $(PHP) $(WLOGIN):public_html/$(WDIR)/) REPOSERVER = uriel REPOPATH = /var/www/html/fc/6/local/ installrepo : $(TGZ) $(LIBWULF_RPM) $(XMLSYSD_RPM) $(WULFSTAT_RPM) \ $(WULFLOGGER_RPM) $(WULF2HTML) (ssh $(REPOSERVER) mkdir -p $(REPOPATH);\ rsync -avz $(TGZ) root@$(REPOSERVER):$(REPOPATH);\ rsync -avz $(LIBWULF_RPM) root@$(REPOSERVER):$(REPOPATH)/SRPM;\ ssh $(REPOSERVER) mkdir -p $(REPOPATH)/$(ARCH);\ rsync -avz $(XMLSYSD_RPM) root@$(REPOSERVER):$(REPOPATH)/$(ARCH);\ rsync -avz $(WULFSTAT_RPM) root@$(REPOSERVER):$(REPOPATH)/$(ARCH);\ rsync -avz $(WULFLOGGER_RPM) root@$(REPOSERVER):$(REPOPATH)/$(ARCH);\ rsync -avz $(WULF2HTML_RPM) root@$(REPOSERVER):$(REPOPATH)/$(ARCH)\; ssh root@$(REPOSERVER) "cd $(REPOPATH)/$(ARCH);createrepo .") #======================================================================== # We give all generic rules below. Currently we only need a rule for # objects. #======================================================================== %.o:%.c $(INCLUDES) $(CC) -c $(CFLAGS) $< ./wulfware-2.6.0/wulfware.abs0000644000247100024710000001045710645251201014146 0ustar rgbrgb

Wulfware: A LAN/Cluster/Beowulf Monitoring Suite

Version 2.6.0

Robert G. Brown (rgb)

This is the official website for the Wulfware suite of LAN or cluster monitoring tools. These tools all build from a single source rpm, or alternatively one can build them from the source tarball.

This project has a mailing list here. This is a (currently) very low traffic list devoted to bug reports, development announcements, feature requests and little else.

Submit bug reports, etc. to

rgb at phy dot duke dot edu
./wulfware-2.6.0/include/0000755000247100024710000000000010645251201013237 5ustar rgbrgb./wulfware-2.6.0/include/wulfware/0000755000247100024710000000000010645251201015073 5ustar rgbrgb./wulfware-2.6.0/include/wulfware/wulfware_version.h.in0000644000247100024710000000004510645251201021251 0ustar rgbrgb#define WULFWARE_VERSION "@VERSION@" ./wulfware-2.6.0/include/wulfware/libwulf_copyright.h0000644000247100024710000000124110645251201020776 0ustar rgbrgb/* * * Copyright (c) 2003 by Robert G. Brown, rgb@phy.duke.edu * GPL version 2b (b for beverage) granted as given * in the file COPYING in this distribution. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. * */ ./wulfware-2.6.0/include/wulfware/libwulf_prototypes.h0000644000247100024710000001060210645251201021217 0ustar rgbrgb/* *======================================================================== * $Id: libwulf_prototypes.h 90 2004-09-30 17:38:02Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ #include /* *======================================================================== * Subroutine Prototypes * * The organization of the following is straightforward. * hosts.c creates, clears/zeros, destroys a Host. * connect.c creates, manages, shuts down a Host connection * init.c initializes Host data via a live connection * update.c updates Host data via a live connection * send.c manages sending commands to single hosts or all hosts * wulfhosts.c opens and parses a wulfhosts file * xml_xtract.c contains xml utility routines for parsing xml * parse.c contains parsing utility routines * util.c contains non-xml, non-parsing utility routines. * *======================================================================== */ /* connect.c */ void connect_to_all_hosts(Connectlist *connectlist); int connect_to_host_by_ptr(Host *hostptr); void send_command_to_host_by_ptr(Host *hostptr, char *cmd); void send_command_to_all_hosts(char *cmd); /* placeholders that don't do anything yet */ int disconnect_from_host_by_ptr(Host *hostptr); void disconnect_from_all_hosts(); /* hosts.c */ void clear_values(Host *hostptr); void clear_host_values(List *hostlist); /* init.c */ void init_values(Host *hostptr); void init_identity(Host *hostptr); void init_time(Host *hostptr); void init_users(Host *hostptr); void init_cpuinfo(Host *hostptr); void init_loadavg(Host *hostptr); void init_meminfo(Host *hostptr); void init_net(Host *hostptr); void init_stat(Host *hostptr); void init_sysvipc(Host *hostptr); void init_uptime(Host *hostptr); void init_version(Host *hostptr); void init_pids(Host *hostptr); void init_host_values(List *hostlist); void send_userlist(Host *hostptr,List *userlistptr); void send_tasklist(Host *hostptr,List *tasklistptr); void init_state(Host *hostptr); /* update.c */ void update_values(Host *hostptr); void update_identity(Host *hostptr); void update_time(Host *hostptr); void update_users(Host *hostptr); void update_cpuinfo(Host *hostptr); void update_meminfo(Host *hostptr); void update_net(Host *hostptr); void update_stat(Host *hostptr); void update_sysvipc(Host *hostptr); void update_uptime(Host *hostptr); void update_version(Host *hostptr); void update_pids(Host *hostptr); void update_loadavg(Host *hostptr); void update_host_values(List *hostlist); /* from wulfhosts.c */ void allocate_hostlists(); int read_wulfhosts(char *hostfile); /* from wulfhosts_util.c */ void parse_hostrange(xmlXPathContextPtr xp_hostdoc); int validate_hostrange(List *hostrangelistptr); void validate_host(Host *hostptr); void parse_iprange(xmlXPathContextPtr xp_hostdoc); int validate_iprange(List *iprangelistptr); void parse_hosttag(xmlXPathContextPtr xp_hostdoc); void add_localhost(); int validate_hosttag(List *hosttaglistptr); void parse_tasktag(xmlXPathContextPtr xp_hostdoc); void parse_usertag(xmlXPathContextPtr xp_hostdoc); void parse_roottag(xmlXPathContextPtr xp_hostdoc); /* from xmlsysd_util.c */ int recv_xmlDoc(Host *hostptr,char *msgbuf); void create_xmlsysd_xpath(Host *hostptr,char *msgbuf); void destroy_xmlsysd_xpath(Host *hostptr); /* from xml_xtract.c */ int xtract(int type, void *dest, char *xpath, xmlXPathContextPtr xp_doc); int xtract_attribute(int type, void *dest, char *xpath, char *attribute, xmlXPathContextPtr xp_doc); /* util.c */ int readn_from_hostptr(Host *hostptr, char *msgbuf, size_t len); int readn(int fd, char *bp, size_t len); int readline(int fd, char *msgbuf, int maxstrlen); int readline_from_hostptr(Host *hostptr,char *msgbuf, size_t maxstrlen); int select_fd (int fd, int seconds, int microseconds); int wgetread(int fd, char *buf, int len); void make_uptime(double total_secs,char *uptime); char *scale_k(long unsigned int k,long unsigned int width,long unsigned int unit); /* parse.c */ char **allocate_fields(size_t maxfields,size_t maxfieldlength); int parse(char *inbuffer,char **outfields,int maxfields,int maxfieldlength); int split(char *inbuffer,char **outfields,char *delim, int maxfields,int maxfieldlength); ./wulfware-2.6.0/include/wulfware/libwulf_wulfhost.h0000644000247100024710000000756310645251201020656 0ustar rgbrgb/* *======================================================================== * $Id: libwulf_wulfhost.h 90 2004-09-30 17:38:02Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ #include /* libxml includes */ /* * COMPAT using xml-config --cflags to get the include path this will * work with both */ #include #include #include /* We use these for certain buffer sizes */ #define K 1024 #define K4 4096 #define K64 65536 /* * This defines some flags to control just what the daemon sends and how. * Each is sort of documented in place. */ typedef struct { int compress; /* Do we compress xml output? */ int whitespace; /* Do we squeeze out whitespace? */ /* * All the following toggle various components of the return. Some of * these are only needed "once" in a typical monitoring session anyway * and can be pulled from the init return (which always sends * "everything"). Future developers should note the 1:1 correspondance * between many of these flags and "init_XXXX.c" and "update_XXXX.c" * sources and calls. */ /* system call stuff */ int identity; /* Do we update system identity? */ int time; /* Do we update system time? */ int users; /* Do we update system pids? */ /* proc-derived stuff */ int cpuinfo; /* Do we update proc cpuinfo? */ int loadavg; /* Do we update proc loadavg? */ int meminfo; /* Do we update proc meminfo? */ int net; /* Do we update proc net? */ int stat; /* Do we update proc stat? */ int sysvipc; /* Do we update proc shared memory stuff? */ int uptime; /* Do we update proc uptime? */ int version; /* Do we update proc (kernel) version? */ /* Processes (in /proc/XXXXX where XXXXX is a pid) */ int pids; /* Do we update pids at all? */ int pidstats; /* (unused) for pidstats */ int cmdline; /* Do we get the cmdline in pids? */ int running; /* Running PIDs or all? */ int root; /* Including those owned by root? */ List *userlist; /* A linked list of usernames to watch */ List *tasklist; /* A linked list of tasknames to watch */ } Dctl; /* * This struct contains all per-host state information: * hostname * host IP number (character and binary) * port number * file descriptor of socket * flag to indicate active connection * xmlDocPtr to xmlDoc struct containing the as yet * unparsed xml returned by a command. Note that this * space is allocated by the xml parser on EACH call and * must be freed when we've extracted as much or as little as * we need. Note also that this CLIENT will have a nontrivial * memory footprint when run on very large numbers of hosts * because xmlDocs are lavishly provided with information. * Value val is the struct containing most values of interest. * * Note that the first four values are set by the various * wulfhost parsing blocks from , and * tags. */ typedef struct { char hostname[K]; char hostip[K]; unsigned long inetaddress; int port; int client_fd; int connected; xmlDocPtr doc; xmlXPathContextPtr xp_doc; Value val; /* * To avoid having to re-malloc this every time we clear values * OR kludge something horrible to preserve the allocated memory, * we put the linked list for pid's in this struct, not the val * struct. We still clear its CONTENTS when we clear values. */ List *pidlist; Dctl dctl; } Host; /* * In order to be able to deal with variable numbers of hosts (add * and delete hosts, for example) hosts are stored in a linked list * so that we can freely add or delete them. This means that we * have to walk the list whenever we loop over all hosts. */ List *hostlist; ./wulfware-2.6.0/include/wulfware/libwulf_wulfhosts.h0000644000247100024710000000300410645251201021023 0ustar rgbrgb/* *======================================================================== * $Id: libwulf_wulfhosts.h 90 2004-09-30 17:38:02Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ #include /* We use these for certain buffer sizes */ #define K 1024 #define K4 4096 #define K64 65536 /* Default xmlsysd port */ #define XMLSYSD_PORT 7887 /* * This flag says "connect to localhost only" and skips parsing * of wulfhosts files in any location. */ int localhosts_only; /* * The following structs exist only to allow and * blocks of hosts to be read in and saved all at once. */ typedef struct { char hostname[K]; char hostip[K]; unsigned long inetaddress; int port; } Hosttag; typedef struct { char hostfmt[K]; int imin; int imax; int port; } Hostrange; typedef struct { int ipmin[4]; int ipmax[4]; int port; } IPrange; /* * We keep linked lists of host tags and host ranges and ip ranges * for parsing wulfhosts. */ List *hosttaglist; List *hostrangelist; List *iprangelist; /* * We'll also want a couple of linked lists for users and tasks to be * monitored. */ List *userlist; List *tasklist; /* * Needed by connect_to_hosts() since it is always a threaded routine * and hence needs at most one argument */ typedef struct { List *hostlist; int connect_delay; } Connectlist; ./wulfware-2.6.0/include/wulfware/libwulf_commands.h0000644000247100024710000000661610645251201020602 0ustar rgbrgb/* *======================================================================== * $Id: libwulf_commands.h 87 2004-09-28 17:31:03Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ /* * Needed to define List below (linked list interface). */ #include /* * The following enumerates and defines all the base * commands recognized by xmlsysd. * * init - opens all /proc files and does a sendall. Note that * toggling a proc-derived field group does NOT cause the * files to be closed -- they just aren't rewound and * processed and sent on a "send" command. This command * should therefore be the first thing sent to the daemon. * sendall - sends all non-PID fields, regardless of the state of their * toggle controls. PID fields are sent according to their * controls, which may be in their default (running, no root) * state. * send - sends an update of all fields according to the state of * their controls. * on fgrp1 [fgrp2 fgrp3...] * - turns the control toggle for a given list of field groups * "on" (send if available). * off fgrp1 [fgrp2 fgpr3...] * - turns the control toggle for a given list of field groups * "off" (do NOT send). * adduser X - causes user X to be added to the user list. If this list * is not empty, only processes belonging to users on this * list are monitored. * rmuser X - removes user X from the user list, if they are there to * begin with. * clrusers - clears user list. * addtask X - causes task X to be added to the task list. If this list * is not empty, only processes whose name matches an entry on * this list are monitored. * rmtask X - removes task X from the task list, if it is there to be * removed. * clrtask - clears task list. * * Note that user/task controls are combined with an "and" * operator to facilitate task exclusion over inclusion. * If both lists are non-empty, only tasks matching one of * the task names belonging to users matching one of the * user names are monitored. However, if either list is * empty, only the other list is used -- a null list is * is promiscuous. * * compress - short for off whitespace;on compress (minimum packet size). * expand - short for on whitespace;off compress (easiest to read). * * verbose N - controls verbosity (for debugging only). * quit - causes this instance of xmlsysd to exit. */ typedef enum { INIT, SENDALL, SEND, ON, OFF, ADDUSER, RMUSER, CLRUSER, ADDTASK, RMTASK, CLRTASK, COMPRESS, EXPAND, VERBOSE, QUIT, N_COMMANDS } Commands; /* * if you add new commands that share leading characters (like sendall and * send) be sure the LONGEST one is first or the shorter one will match * accidentally in the parsing loop. */ static char *commands[] = { "init", "sendall", "send", "on", "off", "adduser", "rmuser", "clruser", "addtask", "rmtask", "clrtask", "compress", "expand", "verbose", "quit", "n_commands" }; ./wulfware-2.6.0/include/wulfware/libwulf_values.h0000644000247100024710000002337010645251201020274 0ustar rgbrgb/* *======================================================================== * $Id: libwulf_values.h 90 2004-09-30 17:38:02Z rgb $ * * See copyright in copyright.h and the accompanying file COPYING *======================================================================== */ #include /* We use these for certain buffer sizes */ #define K 1024 #define K4 4096 #define K64 65536 /* * structs and enums to hold value(s) vector(s). */ typedef struct { /* * These are the raw values, and will also serve as the * last values in the evaluation of the rates below. */ long int user; long int nice; long int sys; long int idle; long int tot; /* * These are the rates that we actually display. */ double user_rate; double nice_rate; double sys_rate; double idle_rate; double tot_rate; } Cpu; typedef struct { /* * Interface identifiers */ char devtype[K]; char devid[K]; char name[K]; char host[K]; char ip[K]; /* * Receive numbers. Note all these are UNSIGNED long ints... */ unsigned long long int rx_bytes; unsigned long long int rx_packets; unsigned long long int rx_errs; unsigned long long int rx_drop; unsigned long long int rx_fifo; unsigned long long int rx_frame; unsigned long long int rx_compressed; unsigned long long int rx_multicast; /* * Transmit numbers */ unsigned long long int tx_bytes; unsigned long long int tx_packets; unsigned long long int tx_errs; unsigned long long int tx_drop; unsigned long long int tx_fifo; unsigned long long int tx_collisions; unsigned long long int tx_compressed; /* * These are the rates that we actually display. We can add the rest * if we ever want to build a display to show them. */ double rx_bytes_rate; double rx_packets_rate; double rx_errs_rate; double tx_bytes_rate; double tx_packets_rate; double tx_errs_rate; } Interface; /* * The following struct holds the "interesting" information about * a running task (pid). */ typedef struct { int pid; char taskname[128]; char cmdline[K]; char state[128]; char user[128]; int uid; char time[128]; int nice; char vsize[128]; char rss[128]; } Pid; /* * May not ever use this. Eliminate if/when cruft. */ typedef enum { COUNT, /* just count them, ignore the type */ STRING, CHAR, INT, LONG, UNSIGNED_LONG, UNSIGNED_LONG_LONG, FLOAT, DOUBLE, N_TYPES } Types; /* * I don't think there is a "good" way to do this. Every way I can * think of has elements that won't scale well, in part because like * it or not, much of what we wish to present is made by a "recipe" * from ingredients in /proc or elsewhere. Sure, some values are * presentable raw, others are static and don't need to be re-extracted * after the init, but we pretty much need individual, per-host indexed * storage for field we plan to use in a recipe (or at least for the * result of applying the recipe itself to fields directly extracted from * the xml document(s)). * * SO, we're going to at least start by creating a massive "values" struct * some of the elements of which (e.g. cpu, eth) are themselves structs * or struct vectors. We can then allocate the whole damned thing at * once in startup(). * * Note that there is considerable redundancy in the values below. For * example, hostname is defined in the parent host struct (used to contact * the host), again in , and yet again in a . * This is really unavoidable. Memory is cheap, and even the CPU required * to fill it isn't that costly. We'll start this way, at any rate. * * Perhaps the experience of doing this will help us learn a more portable * and scalable way of doing this for a future revision. * * In the meantime, we may as well start at the top xmlsysd and work down. * We'll triply echo the tag structure -- Value, enum and path, * plus we'll add attributes and auxiliary variables to Value as required. * * All strings MUST be of K length so we have an idea of how long to make * the returns... */ typedef struct { /* tags under */ /* */ unsigned long int identity_tv_sec; unsigned long int identity_tv_usec; char hostname[K]; char hostip[K]; /*