analog.1.93.beta compiled quad fat for NeXTSTEP by Panagiotis Velissariou.
In the NeXT version I have fixed two bugs I found and made few changes
to make it compile without warnings on NeXT.
(I had e-mail exchanges with the author about the bugs and will be
fixed in the new release of analog)
The other changes involve the html code within analog and are not
important.
submitted to : ftp://next-ftp.peak.org/pub/next/submissions/Analog.1.93.tar.gz
and probably will move to :
ftp://next-ftp.peak.org/pub/next/apps/internet/www/Analog.1.93.tar.gz
Panagiotis Velissariou
e-mail : takis@superior.eng.ohio-state.edu
takis@takis2.ee.net
pvelissa@postbox.acs.ohio-state.edu
--------------------------------------------------------------------------------
This is the HTTP Log Analysis program "analog" for NCSA/Apache (and others?) servers.
It is the very latest version of the program as of January 20 1997
(version 1.93.beta) compiled quad fat for NeXTSTEP
Please read the Readme.html and LICENSE files included with the distribution.
A) Steps required to install the binaries
------------------------------------------
a) Run make as :
make install
( The binaries, conf files, etc. will be installed as :
/usr/local/etc/httpd/Analog/bin : analog
/usr/local/etc/httpd/cgi-bin : analform.cgi
/usr/local/etc/httpd/Analog/conf : configuration files
/usr/local/etc/httpd/Analog/images : the *.gif used by the program
)
b) Go to /usr/local/etc/httpd/Analog/conf directory and modify
the sample.conf, mandatory.conf files to fit your needs
c) Go to /usr/local/etc/httpd/conf directory and modify the
srm.conf of your httpd server by adding the alias
Alias /AnalogImages/ /usr/local/etc/httpd/Analog/images/
d) make form
( To create the analform.html )
B) Steps required in order to compile and install this program for NeXT
-----------------------------------------------------------------------
a) First edit the files you want in the NeXT directory (optional)
Please read the file README.NeXT in the NeXT directory.
( You may even want to replace my modified files in the NeXT directory
with the ones from the original directory )
b) Then run the "makedist" script as :
makedist next
( this script copies all the files from the NeXT directory to the main
Analog.1.93 directory. )
( running : makedist original
reverses the above process by copying all the files from the original
directory and restoring the original distribution of the program )
b) make
( to make the binaries )
c) make install
( to install binaries, conf files, etc. to the destination directories )
By default the files are installed in /usr/local/etc/httpd/Analog as :
/usr/local/etc/httpd/Analog/bin : analog
/usr/local/etc/httpd/cgi-bin : analform.cgi
/usr/local/etc/httpd/Analog/conf : configuration files
/usr/local/etc/httpd/Analog/images : the *.gif used by the program
( Please edit the Makefile to make any changes to the above settings )
Further configuration of "analog" is done through the "default" and
"mandatory" configuration files.
Edit the srm.conf file to tell htpd where to find the analog images.
d) make form
( To create the analform.html )
--------------------------------------------------------------------------------
NeXT MODIFICATIONS TO THE ORIGINAL DISTRIBUTION
-----------------------------------------------
1) Modified the original Makefile for NeXT (in NeXT/Makefile)
2) Wrote the makedist sh script that just copies the files for the distribution
chosen (original, next, ...)
3) Modified the file alias.c as follows (to avoid warnings) :
i) Line 53
from : const char *addrp;
to : #if defined(NeXT)
char *addrp;
#else
const char *addrp;
#endif /* NeXT */ /* P. Velissariou */
ii) Line 58
from : addrp = (const char *) &addr;
to : #if defined(NeXT)
addrp = (char *) &addr;
#else
addrp = (const char *) &addr;
#endif /* NeXT */ /* P. Velissariou */
(to avoid warning from the compiler for gethostbyaddr)
4) Modified the file analhead.h as follows :
1) Line 33
from : #define DEFAULTCONFIGFILE "/usr/local/etc/httpd/analog/analog.cfg"
to : #define DEFAULTCONFIGFILE "/usr/local/etc/httpd/Analog/conf/sample.conf"
2) Line 37
from : #define MANDATORYCONFIGFILE "none"
to : #define MANDATORYCONFIGFILE "/usr/local/etc/httpd/Analog/conf/mandatory.conf"
The above two parameters can not be defined from within the configuration file but,
using the command analog +g/usr/local/etc/httpd/Analog/conf/sample.conf you tell
analog from the command line what DEFAULTCONFIGFILE to use.
Here I just compile into "analog" the above configuration parameters.
5) Modified the file analhead2.h (according to file LICENSE)
1) Line 12
from : #define VNUMBER "1.93beta"
to : #define VNUMBER "1.93beta (Modified by Panagiotis Velissariou)"
6) Modified the file analform.c as :
1) Line 14
from : #define COMMAND "/usr/local/etc/httpd/analog/analog"
to : #define COMMAND "/usr/local/etc/httpd/Analog/bin/analog"
2) Line 91
from : extern void exit();
to : #if defined(NeXT)
extern volatile void exit(int);
#else
extern void exit();
#endif /* NeXT */ /* P. Velissariou */
7) Modified the file analog.c as :
1) Line 769
from : fprintf(stderr, "F: Opening stdout as DNS cache output file\n",
dnsfile);
to : fprintf(stderr, "F: Opening stdout as DNS cache output file\n");
(e-mail exchange with the author about this)
2) Line 792
(e-mail exchange with the author about this)
from : fprintf(lf, "%d %s %s\n", dnsp -> altimecode, dnsp -> number,
(dnsp -> alias == NULL)?"*":(dnsp -> alias));
to : fprintf(lf, "%ld %s %s\n", dnsp -> altimecode, dnsp -> number,
(dnsp -> alias == NULL)?"*":(dnsp -> alias));
(time_t is defined as long, this one to avoid warning messages)
8) Added the file putenv.c in the NeXT directory
1) The function putenv is needed from analogform.cgi
The file was taken from the GNU libc distribution (glibc-1.09.1)
9) Modified the file formgen.c as :
1) Line 72
from : fprintf(outf, "<h1><img src=\"%s\" alt=\"\"> Analog form interface for %s</h1>\n",
logourl, hostname);
to : fprintf(outf, "\n<center>\n<h1><img src=\"%s\" alt=\"\"><br>\nAnalog form interface for<br>\n%s</h1>\n",
logourl, hostname);
2) Line 75
fprintf(outf, "<h1><img src=\"%s\" alt=\"\"> Analog form interface for<br>\n<a HREF=\"%s\">%s</a></h1>\n",
logourl, hosturl, hostname);
to : fprintf(outf, "\n<center>\n<h1><img src=\"%s\" alt=\"\"><br>\nAnalog form interface for <a HREF=\"%s\">%s</a></h1>\n",
logourl, hosturl, hostname);
3) Added line 78
fprintf(outf, "</center>\n\n");
4) Line 227 : Commented out the following
fprintf(outf, "<P> <A HREF=\"http://www.webtechs.com/html-val-svc/\">\n");
fprintf(outf, "<IMG SRC=\"http://www.webtechs.com/html-val-svc/images/valid_html.gif\" ALT=\"HTML 2.0 Compliant!\"></A>\n");
5) Replaced all occurences of <hr>
from : <hr>
to : <hr width=\"100%%\" SIZE=\"2\" noshade>
9) Modified the file output2.c as :
1) Replaced all occurences of <hr>
from : <hr>
to : <hr width=\"100%%\" SIZE=\"2\" noshade>
2) Line 1092
from : fprintf(outf, "<hr>");
to : fprintf(outf, "<hr width=\"100%%\" SIZE=\"3\" noshade>\n");
10) Modified the file hash.c (the buggy function adderr) :
(e-mail exchange with the author about this)
1) Line 550
from :
/*** And one to add an error to the list of errors ***/
void adderr(char *errstr)
{
extern char errs[NO_ERRS][MAXERRLENGTH];
extern int errors[NO_ERRS];
extern int debug;
char e1[MAXLINELENGTH], e2[MAXSTRINGLENGTH];
int i;
flag done = OFF;
for (i = 0; !done; i++) {
strcpy(e1, errstr);
strcpy(e2, errs[i]);
if (strstr(strtoupper(e1), strtoupper(e2)) != NULL) {
done = ON;
errors[i]++;
if (debug >= 2 && i == NO_ERRS - 1) /* unknown error type */
fprintf(stderr, "E: %s\n", errstr);
}
}
}
to :
/*** And one to add an error to the list of errors ***/
void adderr(char *errstr)
{
extern char errs[NO_ERRS][MAXERRLENGTH];
extern int errors[NO_ERRS];
extern int debug;
char e1[MAXLINELENGTH], e2[MAXSTRINGLENGTH];
int i;
strcpy(e1, errstr); /* This one need to be evaluated just once */
for (i = 0; i < NO_ERRS; i++) {
strcpy(e2, errs[i]);
if (strstr(strtoupper(e1), strtoupper(e2)) != NULL) {
errors[i]++;
break;
}
if(i == NO_ERRS - 1) {
errors[NO_ERRS - 1]++; /* unknown error type */
if(debug >= 2)
fprintf(stderr, "E: %s\n", errstr);
}
}
}
11) Modified the file init.c as :
(e-mail exchange with the author about this)
1) Line 2885 - 2895
from :
printf(" Requests %6d\n", rhashsize);
printf(" Directories %6d\n", ihashsize);
printf(" File types %6d\n", thashsize);
printf(" Hosts %6d\n", Shashsize);
printf(" Referrers %6d\n", fhashsize);
printf(" Browser summary %6d\n", bhashsize);
printf(" Browser report %6d\n", Bhashsize);
printf(" Subdomains %6d\n", Ohashsize);
#ifndef NODNS
if (dnsq)
printf(" DNS cache %6d\n", dnshashsize);
#endif
to :
printf(" Requests %6ld\n", rhashsize);
printf(" Directories %6ld\n", ihashsize);
printf(" File types %6ld\n", thashsize);
printf(" Hosts %6ld\n", Shashsize);
printf(" Referrers %6ld\n", fhashsize);
printf(" Browser summary %6ld\n", bhashsize);
printf(" Browser report %6ld\n", Bhashsize);
printf(" Subdomains %6ld\n", Ohashsize);
#ifndef NODNS
if (dnsq)
printf(" DNS cache %6ld\n", dnshashsize);
#endif
(size_t is defined as long)
12) Modified the file output.c as :
In case you want to use the original output.c file just copy it from
the original directory to the NeXT directory.
1) Line 133
from : fprintf(outf, "<body>\n<h1><a NAME=\"Top\">");
to : fprintf(outf, "<body>\n<center>\n<h1><a NAME=\"Top\">");
2) Line 137
from : fprintf(outf, "\" alt=\"\"> ");
to : fprintf(outf, "\" alt=\"\"></a><br>\n");
3) Line 140
from : fprintf(outf, "Web Server Statistics</a> for ");
to : fprintf(outf, "Web Server Statistics for<BR>\n");
4) Line 143
from : fprintf(outf, "Statistiques du Serveur Web</a> pour ");
to : fprintf(outf, "Statistiques du Serveur Web pour<BR>\n");
5) Line 145
from : fprintf(outf, "WWW-Server Statistiken</a> für ");
to : fprintf(outf, "WWW-Server Statistiken für<BR>\n");
6) Line 147
from : fprintf(outf, "Estadísticas del Servidor Web</a> de ");
to : fprintf(outf, "Estadísticas del Servidor Web de<BR>\n");
7) Line 149
from : fprintf(outf, "Web Server Statistik</a> for ");
to : fprintf(outf, "Web Server Statistik for<BR>\n");
8) Line 151
from : fprintf(outf, "Statistiche del Web Server</a> per ");
to : fprintf(outf, "Statistiche del Web Server per<BR>\n");
9) Line 153
added : fprintf(outf, "</center><br>\n");
10) Line 156
from : fprintf(outf, "Web Server Statistics</a> for <a HREF=\"");
to : fprintf(outf, "Web Server Statistics for<BR>\n<a HREF=\"");
11) Line 158
from : fprintf(outf, "Statistiques du Serveur Web</a> pour <a HREF=\"");
to : fprintf(outf, "Statistiques du Serveur Web pour<BR>\n<a HREF=\"");
12) Line 160
from : fprintf(outf, "WWW-Server Statistiken</a> für <a HREF=\"");
to : fprintf(outf, "WWW-Server Statistiken für<BR>\n<a HREF=\"");
13) Line 163
from : fprintf(outf,
"Estadísticas del Servidor Web</a> de <a HREF=\"");
to : fprintf(outf,
"Estadísticas del Servidor Web de<BR>\n<a HREF=\"");
14) Line 165
from : fprintf(outf, "Web Server Statistik</a> for <a HREF=\"");
to : fprintf(outf, "Web Server Statistik for<BR>\n<a HREF=\"");
15) Line 167
from : fprintf(outf, "Statistiche del Web Server</a> per <a HREF=\"");
to : fprintf(outf, "Statistiche del Web Server per<BR>\n<a HREF=\"");
16) Line 173
from : fprintf(outf, "</h1>\n\n");
to : fprintf(outf, "</h1>");
17) Line 174
added : fprintf(outf, "\n</center><br>\n\n");
18) Line 211
from : fprintf(outf, "<hr>\n");
to : fprintf(outf, "<hr width=\"100%%\" SIZE=\"3\" noshade>\n");
19) Line 1584
from : comment out -> if (html2)
to :
20) Replaced all occurences of <hr>
from : <hr>
to : <hr width=\"100%%\" SIZE=\"3\" noshade>
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.