
RCS file: /home/rgb/Src/CVSROOT/xmlsysd/xmlsysd.cvs.time,v
Working file: xmlsysd.cvs.time
head: 1.130
branch:
locks: strict
access list:
symbolic names:
	v0_2_5: 1.124
	v0_2_4: 1.122
	v0_2_2: 1.119
	v_0_2_0: 1.114
	v_0_1_7: 1.112
	v0_1_6: 1.108
	v_0_1_5: 1.108
	v_0_1_1: 1.100
	version_0_1_0_beta: 1.92
	post_hack_alpha: 1.88
	version_0_0_8: 1.83
	release_0_3alpha: 1.54
	ver0_2: 1.29
	ver0_1: 1.23
	start: 1.1.1.1
	xmlsysd: 1.1.1
keyword substitution: kv
total revisions: 131;	selected revisions: 131
description:
----------------------------
revision 1.130
date: 2004/07/22 15:18:41;  author: rgb;  state: Exp;  lines: +2 -2
Just ensuring that this is up to date at home...
----------------------------
revision 1.129
date: 2004/07/21 17:03:00;  author: rgb;  state: Exp;  lines: +2 -2
This fixes a small bug in xmlsysd.xinetd
----------------------------
revision 1.128
date: 2004/07/07 16:33:52;  author: rgb;  state: Exp;  lines: +5 -2
This is decrufting a bit.  No substantive changes.
----------------------------
revision 1.127
date: 2004/07/07 16:23:54;  author: rgb;  state: Exp;  lines: +2 -2
This fixes a minor glitch with the specfile where I was chkconfiging
the wrong thing.  Oops.  No harm done.
----------------------------
revision 1.126
date: 2004/07/07 15:57:58;  author: rgb;  state: Exp;  lines: +2 -2
OK, now we've fixed a few minor glitches associated with tabbing over
(required fixing the sed lines in tgz: in Makefile.
----------------------------
revision 1.125
date: 2004/07/07 15:40:20;  author: rgb;  state: Exp;  lines: +2 -2
This is version 0.2.5.  The major change here is that xmlsysd.spec
and Makefile are now completely rewritten to be consistent with
Velu's and Icon's specfiles -- doubtless using the "rules" for writing
them much more effectively.

The two significant changes relative to these specfiles are:

  a) I don't rewrite the CFLAGS optimization a la icon.  This is because
this is incredibly dangerous -- I have to use the -c99 flag, for
example, to get some things to work in libwulf/wulfstat.  I used to use
-ansi and am moving to -c99.  Turn this stuff off and things either
won't compile or they will break all over (using the wrong prototypes
and behavior) when they do compile.  Even altering e.g. -O3 is dangerous
if the program was developed/tested/built with it before being turned
into an RPM.  I'm happy enough to make the default optimization be (in
the development tree itself) whatever it would be set to by rpm, but
don't want its development setting overridden because of the risk of
side effects.

  b) I (obviously) don't apply Velu's patch.  However, the specfile can
easily be modified to accomodate patches.  I might need to put a hook
into the Makefile for this to be really easy -- if I should let me know
on the wulfware list or otherwise (rgb@duke.edu).

A teeny difference from both is also that I install
/etc/xinetd.d/xmlsysd set to disabled, but use %post to turn it on.
Seth'n'Icon prefer to install it off and use chkconfig "elsewhere" to
adjust configuration, but that is something they can easily do by
commenting out this one line.  I prefer the rpm to install the daemon in
a functional state, as if you don't want to run it, why install it at
all?  With yum it as easy to control state by installing/removing as it
is to use chkconfig to slave to some desired configuration.
----------------------------
revision 1.124
date: 2004/07/06 14:23:32;  author: rgb;  state: Exp;  lines: +2 -2
This seems to work.  CHANGELOG now contains all the history in the known
universe (including this little bit).

Now (as always) to put it in my household local yum repository for
distribution over my local cluster so that I can both test it
pre-release and add the long awaited new display option for wulfstat
and wulflogger that display the full command line for running tasks,
not just the name of the command.  This is essential for ME for task
monitoring -- I've got a spread of command line parameter sets spread
out on a largish cluster and I'm finding myself using shelled commands
to the whole thing over and over, a host at a time, to figure out
just where I'm running e.g. -L 16 -M 1000000 -T 1.44298 -C -z instead
of -L 32 M 250000 -T 1.44295 -C.
----------------------------
revision 1.123
date: 2004/07/06 14:10:39;  author: rgb;  state: Exp;  lines: +2 -2
This should be a full working checkin of xmlsysd.  Now to see to the
rpm mods.
----------------------------
revision 1.122
date: 2004/07/06 14:01:42;  author: rgb;  state: Exp;  lines: +2 -2
This is a bra'e new wurreld, ain't it?  Back to get_proc_pids.c, now
with cmdline separated out.  In a second we'll put back the missing
comments from the previous try, then we'll bump the revision number
and tag it.  We MIGHT tackle adding all these comments (and there will
be a conehead lot of them, but tough) to a CHANGELOG file and install
it via the RPM.  So mote it be.
----------------------------
revision 1.121
date: 2004/06/20 08:37:07;  author: rgb;  state: Exp;  lines: +2 -2
I don't know why, but THIS wan't home yet either...
----------------------------
revision 1.120
date: 2004/04/05 16:17:42;  author: rgb;  state: Exp;  lines: +2 -2
This is modified and updated to be pretty current, actually.
----------------------------
revision 1.119
date: 2004/04/05 16:05:54;  author: rgb;  state: Exp;  lines: +2 -2
This has a small patch to avoid gnome-xml in the include file, as this
has moved/obsoleted in fedora.
----------------------------
revision 1.118
date: 2004/02/23 15:18:40;  author: rgb;  state: Exp;  lines: +2 -2
Fixed a fairly nasty leak of file pointers and memory associated with
the init_state() sequence.  Now it only opens files ONCE -- before by
opening repeatedly without closing it leaked file structs.
----------------------------
revision 1.117
date: 2004/02/21 15:49:06;  author: rgb;  state: Exp;  lines: +2 -2
This is actually an important bug fix -- it keeps init_stats() from
leaking file descriptors and memory when displays are changed.
A small but important change.

While we're at it, we may as well timestamp the rest of the toplevel
tag returns for consistency, even e.g. version.
----------------------------
revision 1.116
date: 2003/10/15 12:46:01;  author: rgb;  state: Exp;  lines: +2 -2
Need to make sure that this is propagated...
----------------------------
revision 1.115
date: 2003/10/15 06:03:14;  author: rgb;  state: Exp;  lines: +2 -2
OK, this is a boost of the major number, tagged v_0_2_0, of a version
that uses libxml2.  I now no longer use libxml at all.  What a pain.

I >>think<< that this fixes a slow leak (on changing displays on
wulfstat) but it is really hard to say.  I'll have to test across
fixed/upgraded hosts at home first.

I'd like to get compression working as well.  Should be pretty
straightforward -- I >>had<< it working for a moment there.

With man proc in hand I could likely to more/better as well with e.g.
disk_io.
----------------------------
revision 1.114
date: 2003/10/15 05:59:28;  author: rgb;  state: Exp;  lines: +2 -2
This is a fairly major revision of xmlsysd, to libxml2.  Probably
worth boosting a major number.
----------------------------
revision 1.113
date: 2003/10/15 01:43:18;  author: rgb;  state: Exp;  lines: +2 -2
This is tagged version 0.1.7, with minor fixes in xmlsysd.spec (which
should be closer to what makes Seth happy, or maybe not).
----------------------------
revision 1.112
date: 2003/10/15 01:36:41;  author: rgb;  state: Exp;  lines: +2 -2
This is annoying, given that I'm gonna have to go through and redo all
these makefiles if/when intrex fixes my nameservice records.
----------------------------
revision 1.111
date: 2003/10/15 01:35:09;  author: rgb;  state: Exp;  lines: +5 -2
This should be the last round of changes as of today, which somehow
didn't get checked in.
----------------------------
revision 1.110
date: 2003/06/03 14:06:10;  author: rgb;  state: Exp;  lines: +2 -2
Well, this is still semi-broken, but we're getting there.  Truthfully,
I >>don't<< want to replace the xmlsysd line in /etc/services if it
is already there, so we'll have to fix that.  Basically we need to
search for it as a first line and leave it if we find it, otherwise
append it as we are now doing.
----------------------------
revision 1.109
date: 2003/06/03 14:16:02;  author: rgb;  state: Exp;  lines: +2 -2
This is a minor update that adds a version announcement to
xmlsysd -d port -v 1.
----------------------------
revision 1.108
date: 2003/06/02 22:55:12;  author: rgb;  state: Exp;  lines: +2 -2
This may be more recent than what I've got at home...
----------------------------
revision 1.107
date: 2003/05/13 14:51:45;  author: rgb;  state: Exp;  lines: +2 -2
Two more silly little changes.
----------------------------
revision 1.106
date: 2003/05/13 14:28:34;  author: rgb;  state: Exp;  lines: +2 -2
Tiny fix in order, irrelevant to function.
----------------------------
revision 1.105
date: 2003/05/13 14:25:58;  author: rgb;  state: Exp;  lines: +2 -2
This enables automagical installweb, under CVS.
----------------------------
revision 1.104
date: 2002/11/13 21:31:08;  author: rgb;  state: Exp;  lines: +2 -2
This fixes pernicious bug in %defattr that caused directories to be
created 644.  Better to let rpm choose.
----------------------------
revision 1.103
date: 2002/11/01 21:58:42;  author: rgb;  state: Exp;  lines: +2 -2
Getting rid of the debugging cruft.  About time to reference xml2
equivalents for this little chunk of code as well.
----------------------------
revision 1.102
date: 2002/10/31 20:07:11;  author: rgb;  state: Exp;  lines: +2 -2
Fixed a MAJOR bug in the xmlsysd build -- needed to link to libxml, not
libxml2.  Should likely convert over to minimize number of libraries
needed by overall package.
----------------------------
revision 1.101
date: 2002/10/29 13:55:59;  author: rgb;  state: Exp;  lines: +2 -2
This sends xmlsysd home with a possibly redundant v0.1.1 tag.
----------------------------
revision 1.100
date: 2002/10/17 21:24:51;  author: rgb;  state: Exp;  lines: +2 -2
This augments the minor revision number as we've surely don't enough
work to justify it.
----------------------------
revision 1.99
date: 2002/10/18 01:24:02;  author: rgb;  state: Exp;  lines: +2 -2
This fixes some REALLY annoying bugs in the Makefile/xmlsysd.spec loop.
----------------------------
revision 1.98
date: 2002/10/18 01:15:40;  author: rgb;  state: Exp;  lines: +3 -8
For some reason, some of this failed to propagate.  I'm not going to
have to be VERY careful not to screw up the new work on the laptop...
----------------------------
revision 1.97
date: 2002/08/05 17:24:48;  author: rgb;  state: Exp;  lines: +2 -2
Dunno what this is doing...
----------------------------
revision 1.96
date: 2002/07/13 02:19:21;  author: rgb;  state: Exp;  lines: +8 -2
Sending this BACK (we hope) to lucifer, merged and ready to go.
----------------------------
revision 1.95
date: 2002/07/13 02:17:48;  author: rgb;  state: Exp;  lines: +2 -2
This stuff all MUST get sent around!
----------------------------
revision 1.94
date: 2002/07/02 18:10:16;  author: rgb;  state: Exp;  lines: +2 -2
Well, this is one way to get a forced checkin.  However, we have to do
some work to get gwulfstat entered correctly still.
----------------------------
revision 1.93
date: 2002/04/30 23:13:45;  author: rgb;  state: Exp;  lines: +2 -2
Tagging the whole thing as released to the universe...
----------------------------
revision 1.92
date: 2002/04/30 21:21:31;  author: rgb;  state: Exp;  lines: +2 -2
About time!  We're finally sending this home.  This is ready to fly, BTW.
----------------------------
revision 1.91
date: 2002/04/30 17:09:56;  author: rgb;  state: Exp;  lines: +2 -2
Just making sure...
----------------------------
revision 1.90
date: 2002/04/29 13:12:43;  author: rgb;  state: Exp;  lines: +2 -2
The changes being checked in do two things.  One, they make xmlsysd version
0.1.0 BETA, as we're ready to go into full beta mode.  Whatever that means.

Two I'm trying to add/fix meminfo support in wulfstat.  This is basically
done except for the formatting.
----------------------------
revision 1.89
date: 2002/04/19 19:24:45;  author: rgb;  state: Exp;  lines: +2 -2
This checks in a major, post-hack tagging of all sources.  This is
0.0.9-alpha, and may be the last major hack before a beta release.

OTOH, it WOULD like to continue cleaning up the source and arranging
the wulfstat side, in particular, into a library plus a shell of simple
routines that call library functions plus the GUI/display and interactive
commands.

This latter  will simplify the building of additional clients.
In particular I'd like to make building the task monitoring application
as simple as possible.
----------------------------
revision 1.88
date: 2002/04/17 18:28:31;  author: rgb;  state: Exp;  lines: +2 -2
These changes SEEM to fix my close_wait problem.  I may need to do similar
things elsewhere.  If read() returns 0, the socket is dead.  Remember that.

   rgb
----------------------------
revision 1.87
date: 2002/04/17 16:45:47;  author: rgb;  state: Exp;  lines: +2 -2
We're trying to add the correct so_linger behavior for the socket,
regardless of whether the socket is inetd based or forking daemon
based.  We've been finding runaway daemons in a CLOSE_WAIT state eating
CPU and other resources, almost certainly because of incorrect
SO_LINGER settings.
----------------------------
revision 1.86
date: 2002/04/15 14:09:10;  author: rgb;  state: Exp;  lines: +2 -2
This is ready to unpack and continue at Duke...
----------------------------
revision 1.85
date: 2002/04/15 14:04:23;  author: rgb;  state: Exp;  lines: +2 -2
OK, looks like this is STILL screwed up.  release is designed/intended
for build variation, version is a semidecimal number.
----------------------------
revision 1.84
date: 2002/04/15 13:23:09;  author: rgb;  state: Exp;  lines: +2 -2
Sending the latest tagged revision to Duke
----------------------------
revision 1.83
date: 2002/04/15 01:36:09;  author: rgb;  state: Exp;  lines: +2 -2
I >>think<< that I'm now done with pid support, except for debugging.

I've now got a whole lot of controls.  The only open question is whether
I want userlist and tasklist to be AND or OR conjoined.  Now they are OR.

I suspect that this is more than enough control for most purposes.  We
can throttle the return back to no more than a handful of jobs fairly
easily, and in the most common cases -- monitoring a single job by name
or a list of (all, running, time-accumulating) jobs belonging to a
specified set of users -- it SHOULD be ok.

It should be time to start on another wulf program.  wulfmon seems like a
reasonable name.  wulfmon should be just like wulfstat EXCEPT that it
only monitors jobs and displays them something like:

hostname|  jobname  |  owner  |stat|   time   | rsize (K) | vsize (K) |
=======================================================================
g01     | OnSpin3d  |   rgb   | R  |   3:30   |   34232   |   3234    |
g02     | OnSpin3d  |   rgb   | R  |   3:30   |   34232   |   3234    |
g03     | OnSpin3d  |   rgb   | R  |   3:30   |   34232   |   3234    |
g04     | OnSpin3d  |   rgb   | R  |   3:30   |   34232   |   3234    |
...

The reason this should be something of a separate program is that it will
need its own specialized set of controls -- to add users to userlist,
add task names to tasklist, change the min_runtime to discriminate against
crap, change the running flag.

We'll see if this is enough when it works.
----------------------------
revision 1.82
date: 2002/04/15 00:25:53;  author: rgb;  state: Exp;  lines: +2 -2
This is apparently a fully working version of xmlsysd that includes both
pid monitoring and a throttle that lets us shut most of it up.

The only remaining questions are:

   a) Do we want to make userlist and tasklist logically concatenate with
and "and" operator?  (except if either is empty it is promiscuous).
   b) Do we want to make the accumulated time a user-definable cutoff?

My guess is no for a) (for starters) as "or" is broader, not narrower,
so one will get the data one seeks either way, one just might get some
unwanted data as well.  It is easily changed.  The problem is that if
tasklist is defined it should really ignore anything not on the list.
For b) I think that we do want to be able to set a cutoff, default 0
seconds (no cutoff).  If that is too noisy, the APPLICATION side can
choose to make it e.g. 10 seconds or 60 seconds or whatever.

One would like to be able to see "stuck" applications, right?

Finally, I need to make sure that state is a string, not a char -- many
proc entries are e.g. ST and not just S.  We just check the first letter
for R, but we want to send the whole thing...
----------------------------
revision 1.81
date: 2002/04/12 21:10:39;  author: rgb;  state: Exp;  lines: +2 -2
This is almost good.  Just not quite.  We can fix it easily, though.
----------------------------
revision 1.80
date: 2002/04/10 18:17:17;  author: rgb;  state: Exp;  lines: +2 -2
Sending the last few changes home...
----------------------------
revision 1.79
date: 2002/04/10 17:26:28;  author: rgb;  state: Exp;  lines: +2 -2
Sending all the latest efforts home (where I will momentarily build them
in and install them on son-of-lucifer).
----------------------------
revision 1.78
date: 2002/04/09 19:53:44;  author: rgb;  state: Exp;  lines: +2 -2
Oops, forgot to move this as well.
----------------------------
revision 1.77
date: 2002/04/09 19:53:04;  author: rgb;  state: Exp;  lines: +2 -2
These changes create a separate/reusable linked list source and include
file that might be able to stand alone.
----------------------------
revision 1.76
date: 2002/04/09 19:18:00;  author: rgb;  state: Exp;  lines: +2 -2
Sort of finished converting get_pids to use open/read/close instead of
fopen/fgets/fclose.  The key question will be whether or not I can
stat the file now...
----------------------------
revision 1.75
date: 2002/04/04 00:08:03;  author: rgb;  state: Exp;  lines: +2 -2
This now "works" for all the userlist and tasklist commands, amazingly well,
actually.

However, on pids is broken -- we need to muck about with the logic
that will actually extract and send pid task information on the basis of
the various controls I've now enabled.
----------------------------
revision 1.74
date: 2002/04/03 23:49:33;  author: rgb;  state: Exp;  lines: +2 -2
rmuser now works correctly.  Time to add delete_list().
----------------------------
revision 1.73
date: 2002/04/03 19:04:06;  author: rgb;  state: Exp;  lines: +2 -2
LOTS of stuff to check in.  I'm still working through adding linked list
management -- I can now initialize a list and add a list element, but
I'm still working on removing a list element and clearing a list.
----------------------------
revision 1.72
date: 2002/04/02 19:40:09;  author: rgb;  state: Exp;  lines: +2 -2
This still doesn't work, but it is starting to look like it MIGHT work
eventually.  We'll come back to this later.
----------------------------
revision 1.71
date: 2002/04/02 14:14:46;  author: rgb;  state: Exp;  lines: +2 -2
ANOTHER slew of changes.  Cleaned up.  Fixed debugging.  Got whitespace
removal to work.  Might even make rev 0.1.0 soon:-)
----------------------------
revision 1.70
date: 2002/04/02 07:49:26;  author: rgb;  state: Exp;  lines: +2 -2
This is a LOT of very useful changes and decruftation.  Overall, I've
managed to add a whole string of new commands, in particular "on" and "off"
which control just what is parsed and sent, if only in somewhat coarse
grained chunks.

I've also learned that compression will NOT happen unless I link in
zlib and do it myself -- I might as well try this soon to see just
how expensive it is.  There are various issues with network speed and
packet size, although I >>can<< now remove egregious whitespace and only
send precisely those blocks I'm interested in.

Still to do:  A whole set of commands to generate and remove linked-list
entries for user and task to be monitored in the pid section, and a neat
rewrite of that section.  I would like to be able to use an
instantiation of the daemon JUST to monitor particular tasks by name,
particular users' tasks by user name, or both.  Something like:

  rgb
  OnSpin3d
  running

would be lovely.


The following is an idea that I'm still not too sure of.  If I do it
this way for /proc/pid, why not do it this way for /proc/net/dev?  For
/proc/stat?  That way everything is the client's responsibility, and the
client can steal code from procps and elsewhere.  Totally extensibe in
the daemon, as it does NO processing to speak of, it just wraps things
for delivery.

The bad things about it are that it is pretty heavyweight and ugly to
boot.  It is heavyweight because you send all sorts of crap you don't
care about.  It is ugly because /proc is ugly, and you're not even
drawing a veil across its worst features.

Still, I might well want to send pretty much ALL of /proc/pid/* --
certainly stat, probably status, statm and cmdline as well, each in its
own field tag.  Only status is big and clunky.  Alas that stat doesn't
have the users uid (that I can see) in any field.

In a pinch I could just send username, cmdline and stat.

Breaking up the(se) file(s) into useable fields would then be the
responsibility of the other end.

  rgb
----------------------------
revision 1.69
date: 2002/04/01 22:39:24;  author: rgb;  state: Exp;  lines: +2 -2
THis is a BROKEN checkin, halfway through adding real controls to the
send list of xmlsysd.
----------------------------
revision 1.68
date: 2002/03/28 11:22:29;  author: rgb;  state: Exp;  lines: +2 -2
This looks like it does it.  xmlsysd NOW has the capacity to track
running processes on remote systems.  This means that we can do LOTS
of interesting displays with wulfstat and can fairly easily add real
batch/load balancing software to any system that can access the daemon.
----------------------------
revision 1.67
date: 2002/03/28 00:42:20;  author: rgb;  state: Exp;  lines: +2 -2
This is the first checkin of 0.0.6, which will include uptime, time
and some cpuinfo fields.  These will also be supported in wulfstat in
the t(imes) display.  They sort of work at this point -- they are
definitely in the xml message, but wulfstat still doesn't deal with
the time.
----------------------------
revision 1.66
date: 2002/03/28 00:13:01;  author: rgb;  state: Exp;  lines: +2 -2
I don't know why, but this doesn't seem sync'd with home...
----------------------------
revision 1.65
date: 2002/03/27 00:01:17;  author: rgb;  state: Exp;  lines: +2 -2
I send this damn thing home, I'm sure of it.  Or maybe not...
----------------------------
revision 1.64
date: 2002/03/21 20:38:32;  author: rgb;  state: Exp;  lines: +2 -2
This should do it.  We truncate the interface hostname at the first "."
----------------------------
revision 1.63
date: 2002/03/21 20:13:54;  author: rgb;  state: Exp;  lines: +2 -2
This is another very important checkin -- a tiny bug was keeping
unconfigured interfaces (like eth1 on ganesh) from being flagged as
such.  They now come back as "N/C" (not configured) with IP 0.0.0.0 (which
isn't correct, but hey).

I think that I'm going to add one more small feature, since I'm here -
let's truncate the interface name at the first period encountered to
get rid of the domain crap.
----------------------------
revision 1.62
date: 2002/03/21 13:32:04;  author: rgb;  state: Exp;  lines: +2 -2
ONE MORE TIME we'll try sending this forward...
----------------------------
revision 1.61
date: 2002/03/20 14:03:59;  author: rgb;  state: Exp;  lines: +2 -2
I just don't get it.  I never seem to actually check things in the way
I'm supposed to...
----------------------------
revision 1.60
date: 2002/03/17 13:46:35;  author: rgb;  state: Exp;  lines: +2 -2
Oops, forgot to check in this update so Duke's rpm is broken...
----------------------------
revision 1.59
date: 2002/03/14 16:31:48;  author: rgb;  state: Exp;  lines: +2 -2
This should be ready for prime time...
----------------------------
revision 1.58
date: 2002/03/13 21:06:59;  author: rgb;  state: Exp;  lines: +2 -2
This is all but the man page...
----------------------------
revision 1.57
date: 2002/03/13 19:20:17;  author: rgb;  state: Exp;  lines: +2 -2
This is now just lovely.  Even lovlier than last time.  We now use
tags like:

..
 <interface id="0" devtype="eth" devid="0">
   <name>eth0</name>
   ...
 </interface>

that can be hierarchically accessed via xpaths like:

 ../interface[@devtype="eth" @devid="0"]/name

which is good.  I think -- we'll have to just see.
----------------------------
revision 1.56
date: 2002/03/13 19:05:43;  author: rgb;  state: Exp;  lines: +2 -2
This is now just an AWESOME about of stuff that needs to be checked in.
xmlsysd now installs RPM style.  I've fixed get_proc_net so that
<interface> comes with an id tag, introduced <interface><devtype> with
an id tag so that we can count e.g. -- oops, just realized that this
should have been an attribute and devid the tag.  One moment, please...
----------------------------
revision 1.55
date: 2002/03/12 18:06:25;  author: rgb;  state: Exp;  lines: +2 -2
This checks in the whole xmlsysd package, tagged release_0_3alpha to go
with the new release.revision values.  This release WORKS -- as far as
I can tell it neither crashes nor leaks.  It is of course cruft-filled and
needs lots of features and values added, but that is straightforward at
this point.
----------------------------
revision 1.54
date: 2002/03/11 18:47:56;  author: rgb;  state: Exp;  lines: +2 -2
This one needs to go as well.
----------------------------
revision 1.53
date: 2002/03/10 15:34:07;  author: rgb;  state: Exp;  lines: +2 -2
This is a CRITICAL update.  Fixes two major leaks in xmlsysd_send_stats.c.
----------------------------
revision 1.52
date: 2002/03/09 18:55:23;  author: rgb;  state: Exp;  lines: +2 -2
Yes, the daemon leaked nastily because i DO have to free the xmlDoc,
i DO, i DO!  Hopefully it now won't.
----------------------------
revision 1.51
date: 2002/03/08 14:50:49;  author: rgb;  state: Exp;  lines: +2 -2
This is just checking it in so I can work at Duke.  Everything is totally
broken again.
----------------------------
revision 1.50
date: 2002/03/08 07:58:46;  author: rgb;  state: Exp;  lines: +2 -2
GAWDS!  OK, so we learned the very hardest of ways that one cannot free both
xpath context, and xml doc.  Indeed, it looks like we MUST free the xml doc and
not the context, as the context appears to live inside the doc.

At any rate, this FINALLY seems to work again/correctly with more than
two hosts.  We'll try four in just a second, and leave it on overnight to
see if it leaks.
----------------------------
revision 1.49
date: 2002/03/08 05:13:43;  author: rgb;  state: Exp;  lines: +2 -2
This checkin fixes a bug in meminfo -- I needed to separately tag
memory and swap values.

It is actually a "broken" vmstat checkin.  xmlFreeDoc is segviolating and
dumping core.  Don't know why.  We commented out the statement that dies
and are inserting memory tracking so we can use vmstat to monitor whether
or not memory leaks.  It may be that xml reuses the doc pointer address
and it shouldn't be freed after each cycle.
----------------------------
revision 1.48
date: 2002/03/07 23:56:35;  author: rgb;  state: Exp;  lines: +2 -2
This is a simply awesome checkin that pushes a totally ncurses-enabled
vmstat out to Duke and elsewhere.
----------------------------
revision 1.47
date: 2002/03/06 22:12:22;  author: rgb;  state: Exp;  lines: +2 -2
This now WORKS through the cpu rates.  Awesome.  We can ALMOST do vmstat!
----------------------------
revision 1.46
date: 2002/03/06 19:15:52;  author: rgb;  state: Exp;  lines: +2 -2
Oh, yes, this is looking simply lovely.  With a new xtract_attribute_by_path()
function to get the tv_sec,tv_usec attributes out we'll be able to evaluate
simply smashing rates.  Pip pip...
----------------------------
revision 1.45
date: 2002/03/06 14:47:47;  author: rgb;  state: Exp;  lines: +2 -2
This is a very important checkin (mostly for vmstat) as it chronicles
BOTH the successful (so far) port to libxml2 with its presumably working
xpath AND the renaming of xmlsysd-tools to plain old vmstat.
----------------------------
revision 1.44
date: 2002/03/05 19:24:32;  author: rgb;  state: Exp;  lines: +2 -2
Trying to convert to libxml2, but we'll have to work to get this installed at home.
----------------------------
revision 1.43
date: 2002/03/05 16:44:11;  author: rgb;  state: Exp;  lines: +2 -2
Sigh.  Lots of changes, lots of things to mess with.  Looks like we're
going to HAVE to use libxml2, so we'll have to upgrade all systems
accordingly.  My household boxes will all have to bite bullet and go for
7.2 AND have libxml2[-devel] installed.
----------------------------
revision 1.42
date: 2002/03/01 05:10:27;  author: rgb;  state: Exp;  lines: +2 -2
Just to make sure, we send this home...
----------------------------
revision 1.41
date: 2002/02/28 16:32:40;  author: rgb;  state: Exp;  lines: +2 -2
Nothing with the daemon, but we messed with timeouts and select in
vmstat_util to no avail.
----------------------------
revision 1.40
date: 2002/02/27 22:14:31;  author: rgb;  state: Exp;  lines: +2 -2
This is now just awesome.  We are in the process of converting it to totally
debuggable form AND we've got vmstat "working" on a delay loop basis
(very noisily in fully debuggable form) to get updates and extract named
paths.

It should very soon be extremely easy to produce either a table or a
struct to use in a running display.
----------------------------
revision 1.39
date: 2002/02/27 18:46:16;  author: rgb;  state: Exp;  lines: +2 -2
We're now committed to adding the debug enum.  The code will be better for
it.
----------------------------
revision 1.38
date: 2002/02/27 17:51:48;  author: rgb;  state: Exp;  lines: +2 -2
Dunno what's broken here, but we somehow got stuck without a complete
transfer to Duke.
----------------------------
revision 1.37
date: 2002/02/27 15:13:02;  author: rgb;  state: Exp;  lines: +2 -2
OK, I broke the shit out of both xmlsysd and vmstat.  However, the
breaking is likely deep bug.
----------------------------
revision 1.36
date: 2002/02/26 16:28:57;  author: rgb;  state: Exp;  lines: +2 -2
Adding commands.h (shared by both xmlsysd and vmstat).
----------------------------
revision 1.35
date: 2002/02/26 15:55:49;  author: rgb;  state: Exp;  lines: +2 -2
Some major revisions in the checkin:

 a) Introduced commands.h in xmlsysd to share with xmlsysd-tools (vmstat).
 b) Fixed and cleaned some of xmlsysd_work() while implementing this
    change.
----------------------------
revision 1.34
date: 2002/02/26 01:19:11;  author: rgb;  state: Exp;  lines: +2 -2
Fine, THIS deserves to be checked in as a tagged revision, although
I will resist (it is really vmstat that should be tagged).

In this revision we've made the daemon semi-compliant with http 1.1
by adding a header that sort-of looks like it might be the same
format as http headers, a blank line (also part of spec) and THEN
the message.  The only header we write is Content-Length, which we use
to insure reliable delivery of the message content.

We've naturally made exactly the changes in vmstat required to make
this work -- fixed readline(), added/fixed readmsg (which now calls
"Effective TCP/IP Programming"'s readn() function to get msglength
bytes after parsing the header and skipping the blank line.

At this point vmstat is happy all the way through the xml parser --
we read in the messages AND convert them into xml documents from
both hosts, including the slowest one that tends to deliver in multiple
packets.

Next:  A bit of cleanup (the code is somewhat messy) and the possible
addition of some timeout logic (already handy to be added from wget).
Then we'll go IN to the documents and parse out at least selected fields
for some sort of crude display.

At that point it will be all over but the actual work of ripping out
stats and displaying a creditable vmstat clone.  We will need (at some
point) to add ncurses capabilities if we want a "pretty" (top-like) tty
display.  Even a scrolling tty display wouldn't be too terrible, though.
----------------------------
revision 1.33
date: 2002/02/25 22:19:22;  author: rgb;  state: Exp;  lines: +2 -2
Sending home...
----------------------------
revision 1.32
date: 2002/02/21 20:25:04;  author: rgb;  state: Exp;  lines: +2 -2
This is a vaguely broken checkin -- trying hard to get the read/write
sequence to work reliably.

I wonder how telnet etc manage it.
----------------------------
revision 1.31
date: 2002/02/20 15:19:54;  author: rgb;  state: Exp;  lines: +2 -2
Need to check in since I made a very few changes...
----------------------------
revision 1.30
date: 2002/02/19 17:42:38;  author: rgb;  state: Exp;  lines: +2 -2
This is the tag checkin for ver0_2.  This appears to work very well indeed.
I think it is also something icon can live with, although I'll send
it on for him to look at.
----------------------------
revision 1.29
date: 2002/02/19 17:41:34;  author: rgb;  state: Exp;  lines: +2 -2
This should be a final pre-tag checkin.  We've cleaned up some (but far
from all:-) of the cruft.  We've fixed the id issue with <cpu>.  We've
eliminated some debugging calls (we debug differently now).  We
eliminated sendline in favor of direct use of write, which is actually
much better.

Let's tag it and start working on gui's or at least tiny/test applications.
----------------------------
revision 1.28
date: 2002/02/19 17:12:59;  author: rgb;  state: Exp;  lines: +2 -2
Added /proc/net/sockstat to the list of what xmlsysd produces.

Time to fix the use of id (that is, get rid of it entirely).  Then
we'll do a new tag and start work on the gui, or at least some interesting
command line tools.

It should be pretty easy to create a tool that connects to the socket,
sends an init, extracts a single (set of) desired values, and then
displays them -- e.g. free, vmstat.  In fact, I should be able to rewrite
a number of the procps routines to use xmlsysd instead of raw /proc to
drive them, fairly easily.
----------------------------
revision 1.27
date: 2002/02/19 16:35:18;  author: rgb;  state: Exp;  lines: +2 -2
THIS now is looking very lovely.  We have successfully added ip and
hostname information to internet devices, although it is not yet fully
ipv6 compliant.  I see how to make it so, though -- basically add in
a few conditionals to handle 6-byte addresses and use AF_INET6 instead
of AF_INET, I believe.

I think that I want to go ahead and monitor the contents of sockstat
at this time -- I want to find out whether this opening of sockets
EVERY TIME we get an ip number/name is costly in socket resources.

We may need to arrange to do this just once (at init) and save the values.
In fact, we might well want to do this with LOTS of things -- hostname,
hostip, kernel revision, and more are all essentially static, and
re-deriving them each time is wasted energy.  Perhaps I need more than
one attribute in the shadow struct set up at init:

   get="1" or "0"  (boolean) to determine if tag(children) is derived/sent
   static="1" or "0" (boolean) to determine if it needs to be rederived.

Still, making truly excellent progress.
----------------------------
revision 1.26
date: 2002/02/19 15:46:05;  author: rgb;  state: Exp;  lines: +2 -2
Icon's fix -- lo and eth are no longer tags.

Now if I can just figure out how to extract interface IP numbers...
----------------------------
revision 1.25
date: 2002/02/19 15:34:24;  author: rgb;  state: Exp;  lines: +2 -2
This fixes a slightly nasty bug in tagging where I incorrectly assumed
that transmit and receive fields were all the same.  They're not.
----------------------------
revision 1.24
date: 2002/02/18 21:44:15;  author: rgb;  state: Exp;  lines: +2 -2
Just checking in the tags...
----------------------------
revision 1.23
date: 2002/02/18 21:43:17;  author: rgb;  state: Exp;  lines: +2 -2
This finally adds a very respectable /proc/cpuinfo.  I'm running out of
things to monitor or present.

Things to leave for later:

   disk
   sensors

The former because I don't feel like figuring out the code in /proc/stat
right now, the latter because /proc/sys/sensors is the API from hell,
with every sensors module producing a new and different proc interface.

The other thing to leave for later is an interface to the equivalent of

  ps rugaww

This interface will need to scan ALL THE PID DIRECTORIES in /proc, using
isdigit to work through the pid directories and opening /proc/PID/status
and parsing out Name, State, PID, and some of the sizes iff State equals
R.

I could do it now, but FIRST I want to add a masking capability so that
I can control xmlsysd with regards to two pieces of behavior:

   a) Turning on/off compression in the transmitted xml.
   b) Being able to mask return values on and off.   For example, we
      should be able to set the daemon so that it only returns very
      specific paths.  We might do this with a hashed mask vector.  We
      might do it some other way (e.g. recursively).  However we do
      it it MUST be done eventually so we can really crank down the load
      on both cpu and network when we only are monitoring e.g. load
      average and running processes.

In any event, it is likely time to tag this version and think hard about
writing the GUI.  At least a tiny part of the GUI.
----------------------------
revision 1.22
date: 2002/02/18 20:40:30;  author: rgb;  state: Exp;  lines: +2 -2
This adds SysV IPC information (slightly cooked) to pretty much match
identically what ipcstuff.c did in procstatd.
----------------------------
revision 1.21
date: 2002/02/18 19:43:03;  author: rgb;  state: Exp;  lines: +2 -2
Added users.
----------------------------
revision 1.20
date: 2002/02/18 19:35:41;  author: rgb;  state: Exp;  lines: +2 -2
System identity now works.
----------------------------
revision 1.19
date: 2002/02/18 19:29:10;  author: rgb;  state: Exp;  lines: +2 -2
Added get_proc_version and get_proc_loadavg.  Need identity.
----------------------------
revision 1.18
date: 2002/02/18 18:58:54;  author: rgb;  state: Exp;  lines: +2 -2
Added load average back.
----------------------------
revision 1.17
date: 2002/02/18 17:53:31;  author: rgb;  state: Exp;  lines: +2 -2
Sending it home, self soon to follow.
----------------------------
revision 1.16
date: 2002/02/18 16:52:06;  author: rgb;  state: Exp;  lines: +2 -2
Oops, forgot to check this one in so I can build at Duke...
----------------------------
revision 1.15
date: 2002/02/18 14:17:24;  author: rgb;  state: Exp;  lines: +2 -2
Amazing!  Incredible!  Yes, Virginia, we can send systems values like time.

So, in something like two hours of work we've added back 2/3 of the
functionality of the old procstatd in xmlish, with no need to define any
structs or do any significant amount of cooking.

We'll have to decide whether or not to cook /proc/uptime.  Probably not.
The simplest way to proceed to is just wrap in /proc, cook a bit for
systems or other non-proc information.  We can even re-present information
derived from proc stuff in <system> tags if we like.  After all, its our
program.  And why are we speaking of ourselves in third person plural again?

Damn.  Time for coffee...
----------------------------
revision 1.14
date: 2002/02/18 13:57:33;  author: rgb;  state: Exp;  lines: +2 -2
This is just lovely.  We've actually DONE /proc/net/dev, and can add
e.g. /proc/net/sockets at any time with little hassle.
----------------------------
revision 1.13
date: 2002/02/18 13:10:37;  author: rgb;  state: Exp;  lines: +2 -2
This checks in a fully functional and debugged meminfo module.  This is
so easy!

Note well that I also updated the timestamp to use gettimeofday instead of
time().  This gives me tv_usec (microsecondish resolution) for the time
of the /proc/whatever rewind and run.  This means that we can in PRINCIPLE
whack the daemon pretty hard and still derive accurate rates further down
stream.
----------------------------
revision 1.12
date: 2002/02/18 12:44:26;  author: rgb;  state: Exp;  lines: +2 -2
Moved proc_stat.c into get_proc_stat.c by hand, fixed </proc/stat> problem.
Should be ready to rip off new get_proc_XXXXX.c sources at a furious pace.
----------------------------
revision 1.11
date: 2002/02/17 23:28:06;  author: rgb;  state: Exp;  lines: +2 -2
This now actually fully functions through /proc/stat.  It does indeed
promise to be really, really easy to write this way.  In fact, it is
almost completely written.  I just have to add each file that I want to
parse and xmlify its fields.

Whoopee.
----------------------------
revision 1.10
date: 2002/02/15 19:25:33;  author: rgb;  state: Exp;  lines: +2 -2
Adding this too since this is the model for future development.
----------------------------
revision 1.9
date: 2002/02/15 19:24:37;  author: rgb;  state: Exp;  lines: +2 -2
Sending this up...
----------------------------
revision 1.8
date: 2002/02/14 14:27:32;  author: rgb;  state: Exp;  lines: +2 -2
Working on the latest DESIGN revision.  Think I've about got it, needs
a bit of thought about the mask.
----------------------------
revision 1.7
date: 2002/02/13 04:34:35;  author: rgb;  state: Exp;  lines: +2 -2
Wow, that was easy!  OK, I now have the daemon set up so it will
create the xml document and send it.  Not totally sure that my sendline
routine is robust enough to manage a really long buffer, but time will tell.
----------------------------
revision 1.6
date: 2002/02/12 00:17:30;  author: rgb;  state: Exp;  lines: +2 -2
This is a notch closer to being debuggable.

We can now isolate several steps to all this.  First we have to learn
the basic commands required to create an xml document.  Then we have to
learn the basic commands to extract structs FROM an xml document.  Finally
we have to put them together.

The document nature of libxml may be a wee bit of a pain.  However we
will persevere.  The nicest thing would be if I could figure out how to
directly convert xml into glade widgets for display without requiring a
separate struct, but that ain't happenin'.

  rgb
----------------------------
revision 1.5
date: 2002/02/05 20:37:19;  author: rgb;  state: Exp;  lines: +2 -2
This should be everything needed to run so far.
----------------------------
revision 1.4
date: 2002/02/05 16:23:03;  author: rgb;  state: Exp;  lines: +2 -2
Forgot -- the command interface should be XML too...
----------------------------
revision 1.3
date: 2002/02/05 16:21:16;  author: rgb;  state: Exp;  lines: +2 -2
OK, THIS is a plan.  A complete rewrite is the only reasonable solution.

Now I just need to

  a) steal the daemon interface from procstatd

  b) write the path/file/field encoding logic

  c) write the system call encoding logic

  d) write the command interface (and any local rcfile constraints desired)

  e) test as best as I can as I go

It will be a GOOD IDEA to make sure that the daemon interface works
FIRST (with any old rudimentary command parser) so that I can validate
all new work as I go.
----------------------------
revision 1.2
date: 2002/02/05 15:45:34;  author: rgb;  state: Exp;  lines: +2 -2
Firing this off to Duke.  MUCH better concept, if it turns out to be
lightweight enough.
----------------------------
revision 1.1
date: 2002/02/05 15:44:44;  author: rgb;  state: Exp;
branches:  1.1.1;
Initial revision
----------------------------
revision 1.1.1.1
date: 2002/02/05 15:44:44;  author: rgb;  state: Exp;  lines: +0 -0
Initial Revision
=============================================================================
