Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 4ebd93c81c10296e00d7067f84abe0d0 > files > 8

uptimed-0.1.6-2mdk.i586.rpm

Contents
--------

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

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

Type 'make'. This should create two binaries, 'uptimed' and 'uprecords'. If
the source does not compile try hacking it and send me some patches, or
complain to me and wait for a next release.

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

As root, type 'make install'. This will create a spool directory for uptimed
and place the binaries 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 -boot

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 -boot 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 -boot 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 -boot 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. 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. ;-)


4. 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. ;-)