|
EGG Host Site Setup
This is a brief and very general discussion of the
installation and operation of the egg software.
An older version gives
information about dial up connections, which we no longer
use, and it provides a few Unix/Linux commands, needed when
we had only linux software.
For clarity, I'll type computer commands inside quotes; invoke the
command by typing it without the quotes and hitting enter.
You can retrieve recent commands with the
cursor up arrow and edit them by backspacing.
If you encounter problems, take good notes on what happened
so we can do efficient troubleshooting. For
immediate help, you can reach me by email at rdnelson@princeton.edu.
Installation
The GCP software should be installed in its own subdirectory within your
primary directory, usually in the /home directory tree.
We will assume you have made an egg directory called /home/yourdir/egg.
and installed the software there.
Go there by typing "cd /home/yourdir/egg".
Type "ls" for a simple listing of files or "ls -al" for a more
informative list with dates, sizes, and more. The eggsh executable and
the .eggrc configuration file should be in the listing, and the eggsh
listing should indicate it is executable. When the system is running,
the eggsh
program will create subdirectories for data storage, using the year and
month for directory name.
Make sure the time on your computer is accurate before starting other things.
The hardware (CMOS) clock should be set to GMT (or UTC) time, and you can
check this time by typing "date -u". The local time is given if you simply
type "date". If you are root you can set the time with the command
"date -s "hh:mm:ss"" (note the quotes around the time.)
Become root using the command "su". The date command can
be used to set the whole date if necessary. Use the same format as the
you see when invoking the date command, but put it in quotes.
Do this as accurately as you can, by
getting a telephone time or other service to synchronize to. If the UTC
time is off, you can set it correctly after you have set the local time
accurately, by typing "clock -w".
Unfortunately, PC clocks lose or gain amazing amounts of time, so you
must automate the time synchronization. How to do that is described
later in the section on Keeping Correct Time.
Egg Software
There are two parts: the eggsh program to read, store, and transmit data,
and the .eggrc configuration file.
Both the program and configuration file should be installed in the
/home/yourdir/egg directory.
The eggsh program must be executable, that is it must have
appropriate permissions, which will show as "x" in the long listing.
This is the default when you download the files from the GCP
website.
The program that records, archives, and sends data is called "eggsh".
It uses a configuration file called ".eggrc". Notice the
leading . or dot. The dot is part of the filename, and
makes it a hidden file, which can only be seen in
a directory listing with a different switch "ls -a" or "ls -al".
This configuration file contains the information to specify the egg's name,
its ID number, its IP address, its basket (the server where it will send
data) and its communication parameters. This information is near the
end of the file in uncommented lines (no leading #).
You can edit it using the vi
editor, or a more user-friendly editor called joe. For the
latter, the command would be
"joe .eggrc". Then type "ctrl-k h" for a help screen with commands.
Here is a sample of the informational lines in the .eggrc:
EGG egg.name.loc 172 64.182.94.228 noosphere PERM 1
BASKET noosphere 128.112.35.133
PROTOCOL 10 10 30 200
REG PEAR 0 9600
The first line identifies your EGG by name, ID, and IP address. It says
the server is noosphere and the connection is permanent and attempts to
communicate data occur at 1-minute intervals. You will need to edit the
file to put in your egg's actual name, ID, and IP address.
The second line gives the
server name and IP address. Line three specifies the structure of the data
packets that will be sent to the server,
and the last line shows the type of REG device, which COM port it is
connected to, and its transmission speed. You may need to edit the COM
port designation. The 0 in the sample means COM1, a 1 would specify
COM2. (In Unix/Linux the first COM port is ttyS0 and the
second one is ttyS1.) The long version of the
.eggrc has explanations and more information in comments.
Keeping correct time
The eggs must all be synchronized within a small range, and it is
possible to make this within one second using programs that get
correct time from "timeservers" and keep your local clock
synchronized by
making small adjustments. Begin by setting your CMOS
(hardware) clock to UTC (also known as GMT) as indicated earlier.
The xntpd program is the preferred way to set the time, and it
must be configured in the setup. It is not installed by default is some
Linux distributions, so you may have to add it to your system.
If this works correctly, you will need only check to be sure the
time is set correctly if you reboot.
Check the time occasionally by looking at the output of the
eggsh program. If it appears to be drifting by more than a second or
two, let me know, and we will try to correct the situation.
The xntpd configuration files require specification of timeservers. You
can use the ones specified in the following, but you may prefer to use
timeservers closer to home. This configuration information
for xntpd must be available in /etc/ntp.conf
server teilhard.global-mind.org
server www.leyline.org
driftfile /etc/ntp.drift
The driftfile should be created as an empty file; it will
become the place where adjustment coefficients are written.
Useful commands
mkdir (makes a new directory called "name")
cd (change directory to "name"; cd without argument goes to
home directory (e.g. /home/yourusername
mount /dos_a (this might be /mnt/dos_a) (allows reading files from floppy disk)
umount /dos_a (unmounts floppy)
ls (lists files and subdirectories)
ls -l (long listing, gives much information)
ls -al (long listing, including hidden files)
more (displays files one screenfull at a time; space-bar to go on, q to quit)
ctrl-c (stops program and returns to prompt)
cp (copies files)
mv (moves or renames files)
locate (tells you where to find files)
df (tells disk usage)
ps aux |grep eggsh (will tell you the process number of eggsh program)
su (allows you to become another user or root, if you know password)
vi or joe (editors -- vi is arcane, but everywhere; joe is simpler
and can be used with a little experimentation)
Documentation, man pages, info
If you want terse but useful information on commands, the man pages
are excellent. Just type "man ". Be forewarned that this
is very condensed reading. There are also so-called info pages that
have broader information with hyperlinks; just type "info".
For larger-scale questions on getting things working, there is a
collection of excellent documentation in /usr/doc/HOWTO.
|