Contents
--------

	1. Compiling the sources
	2. Installing the binaries
	3. Editing your system startup files
	4. Configuration of uptimed
	5. Examining the logfiles

1. Compiling the sources
------------------------

Type './configure && make'. This should create two binaries, 'uptimed' and
'uprecords'.

If the source does not compile, send a message to
uptimed-devel@lists.capsi.com with the compile errors. Of course you are
free to send some patches as well.

2. Installing the binaries
--------------------------

As root, type 'make install'. This will create a spool directory for uptimed
and place the uptimed binary in /usr/local/sbin, and the uprecords binary in
/usr/local/bin. If you are upgrading from a previous version, read the
INSTALL.upgrade file too.

3. Editing your system startup files
------------------------------------

To start the program automatically everytime you start up your computer, add
the following lines to your computers startup file.

   echo "Creating unique uptime daemon bootid..."
   /usr/local/bin/uptimed -b

The right procedure varies per platform and distribution:

Slackware Linux:
Add it somewhere in /etc/rc.d/rc.S

RedHat Linux:
Add it somewhere in /etc/rc.d/rc.sysinit

Debian Linux:
Put it in a file in /etc/init.d/ and symlink it from /etc/rc.S

Solaris:
Put it in a file in /etc/init.d/ and symlink it from /etc/rcS.d
(unverified, is this indeed the way to run a program only at boot up?
comments please?)

HP/UX:
See README.unsupported file.

The -b flag is essential: it updates the /var/spool/uptimed/bootid file
resulting in a unique id per boottime. This must be done in rc.S and not in
rc.local to make sure the bootid stays intact even when switching runlevels. 
When using the -b flag, uptimed exits on purpose. Add the folowing lines
to your computers multiuser file:

   echo "Starting uptime daemon..."
   /usr/local/bin/uptimed
   
Linux:
Add it somewhere in /etc/rc.d/rc.local

Solaris:
Put it in a file in /etc/init.d/ and symlink it from /etc/rc2.d
(unverified, comments please?)

The reason you start the program twice is because the boottime for most
platforms is calculated as systemtime minus uptime. This, unfortunately, is
not a constant. Programs such as rdate and clock and timezone changes all
can change it, making it unreliable as a unique id. Therefore it must be set
only once, at boottime.

The actual daemon however should not be started at boottime only, because
you will want it up and running again when for example you come back from
single user mode.

So far having a -b switch and using two startup files is the only
solution I have come up with that works - apart from kernel patches to have
a constant (and not calculated) boottime entry.

4. Configuration of uptimed
---------------------------

The installation process installs a file called 'uptimed.conf-dist'. Edit
its entries to your own satisfaction and saveyour changes as 'uptimed.conf'.

Uptimed will run perfectly with default configuration values without a
'uptimed.conf' configuration file and also accepts various command-line
arguments to overwrite both default values and configuration options.

5. Examining the logfiles
-------------------------

To see the records, type 'uprecords'. The current session will be
highlighted. You will probably only see one entry the first time you run the
program. If that bothers you, reboot a few times. ;-)
