Change the way we see if a web server is running on a host.
Fetch http://host, and check for 2xx or 4xx status.
With this change, new server_status.php works on SETI@home.
remote_server_status.php (script for seeing if remote daemons are running)
did this by ps -C command,
and seeing if the last line of the output contained the command.
This didn't work for SETI@home, because the daemons are symbolic links in bin/.
The command that ps knows about is the file name after resolving the link.
This generally doesn't contain the original command name,
so it would look like no remote daemons are running.
Fix: look up the PID (in pid_host/xxx.pid) and use "ps PID".
This also correctly distinguishes between daemons
that use the same program on the same host.
There were a couple of issues:
- the server status page is served from a web server, say X.
A daemon is "remote" if it runs on a machine other than X.
This is not the same as having a <host> element in the daemon's
config.xml entry.
Add logic to correctly classify daemons as remote or not.
- get rid of the <uldl_host> stuff.
There can be separate upload and download servers,
and they are identified by <upload_url> and <download_url>.
They may or not be remote;
to decide this, compare the host part of the URL
with the host part of the project's master URL.
- Hosts are specified with the machine name (e.g. isaac)
or domain name (isaac.ssl.berkeley.edu).
Keep track of this distinction.
The server status page was one of the oldest and cruftiest parts of BOINC.
It flew in the face of the model/view/controller paradigm,
and had the kind of convoluted structure that beginning programmers
often produce.
Plus it didn't work with remote daemons.