\newcommand{\hes}[0]{{\em Hesiod}}

\section{\hes: How do I find stuff?}

%%% insert witty quote about the name hesiod here...

\hes\ is the mechanism by which objects at Athena are given simple
names. For example, your home directory locker is given a simple name
(which happens to be the same as your username).  This locker is a
``filesystem'' which is a type of object. Filesystem is abbreviated
filsys, which is a \hes\ type. When you attach a filesystem (or when
login attaches it for you) the name and type are looked up and the
information needed to actually mount the filesystem are returned.

\subsection{What is in there?}
Other types of information are stored in \hes. The types available
are:\par\noindent
\begin{center}
\begin{tabular}{|l|p{2.75in}|l|l|} \hline
Type & description & used by & example \\ \hline
cluster & generic information about the cluster a machine is in & getclusterinfo & w20-575-10.cluster \\
filsys & filesystem type, mount point, and server name & attach & eichin.filsys \\
gid & /etc/group entry, by gid instead of group name & & 101.gid \\
group & /etc/group entry, with group name and number & & eichin.group\\
grplist & the list of groups you are in with numbers, for /etc/groups & login & eichin.grplist\\
passwd & /etc/passwd entry, with finger information & login, finger & eichin.passwd\\ 
pcap & Full /etc/printcap entry for a printer & lpr & linus.pcap \\
pobox & post office box or mail address for user & mh, movemail & eichin.pobox\\ 
prcluster & a list of printers in a printer cluster & & bldge40.prcluster \\
prclusterlist & a list of print clusters & & *.prclusterlist \\
service & /etc/services entries && talk.service \\
sloc & server location for special programs & zhm & zephyr.sloc \\ 
uid & /etc/passwd entry, by uid instead of username & & 0.uid \\ \hline
\end{tabular}
\end{center}

\subsection{How to find things yourself}
There is a simple program you can use to look up \hes\ entries. {\em
Hesinfo\ } takes two arguments: a name and a type.  For example, to
look up what file server my home directory is on:
\begin{verbatim}
%hesinfo eichin filsys
AFS /afs/athena.mit.edu/user/e/i/eichin w /mit/eichin
\end{verbatim}
This says it is an NFS filesystem that is stored on priam. The other
examples in the table work in similar ways.

\subsection{Why \hes\ at all?}
In the past, many configuration files needed to be stored on each
workstation. These were difficult to update. For example, the {\it
/etc/passwd} file (which contains both finger information and your
userid for internal use) would be approximately 850K if it included
all the current Athena accounts, in order to allow everyone to log
in anywhere. Multiply this by approximately 900 workstations, and you
have nearly 800 Megabytes of data to update every time a new account
is created. This is obviously impractical; so would updating all of
the other files ({\it /etc/services\/}, {\it /etc/groups\/}, {\it
/etc/printcap\/}, and others) even though they might change less
often.

\subsection{What happens (the icky part)}
With \hes, all of the data is stored on one of several {\em nameservers\/}.
Each of these machines is updated every night with the changes made
that day. When a program you run asks for a name, it converts it to a
network name of the form Name.Type.ns.athena.mit.edu, the same form as
a normal network hostname (such as w20-575-10.mit.edu). When it asks
for the value of that name, it gets back a string in answer. The -b
option to hesinfo prints out this network name before printing the answer:
\begin{verbatim}
%hesinfo -b eichin filsys
eichin.filsys.ns.Athena.MIT.EDU
AFS /afs/athena.mit.edu/user/e/i/eichin w /mit/eichin
\end{verbatim}
The first line is the name that gets looked up, and the second is the
answer that comes back. A program called a ``name daemon,'' stored in
\verb+/etc/named+, actually figures out which machine to ask for the
information. The name daemon saves values it has seen recently, in
case you ask for them again right away.  If the name daemon crashes, it
will not restart automatically, making the workstation difficult to
use. Usually restarting it (as root) will solve such problems.
Since there are several \hes\ nameservers, it is unlikely that you
will not be able to reach at least one of them.
