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 February 10 1997 (version 2.0) compiled quad fat for NeXTSTEP by Panagiotis Velissariou. Please read the Readme.html and LICENSE files included with the distribution. Changes for the NeXT distribution : a) Made a few changes to make it compile without warnings on NeXT. Please read the file Analog.2.0/NeXT/README.NeXT for details. b) Made changes in the html code within analog which are not that important. Analog is installed by default in : /usr/local/etc/httpd/Analog To install it in any other location you shoud first modify the files : i) NeXT/Makefile from : ANALOGDIR = /usr/local/etc/httpd/Analog to : ANALOGDIR = New Location ii) NeXT/analhead.h from : #define DEFAULTCONFIGFILE "/usr/local/etc/httpd/Analog/conf/sample.conf" to : #define DEFAULTCONFIGFILE "New Location/conf/sample.conf" from : #define MANDATORYCONFIGFILE "/usr/local/etc/httpd/Analog/conf/mandatory.conf" to : #define MANDATORYCONFIGFILE "New Location/conf/mandatory.conf" iii) NeXT/analform.c from : #define COMMAND "/usr/local/etc/httpd/Analog/bin/analog" to : #define COMMAND "New Location/bin/analog" from : #define MANDATORYCONFIGFILE "/usr/local/etc/httpd/Analog/conf/mandatory.conf" to : #define MANDATORYCONFIGFILE "New Location/conf/mandatory.conf" and then recompile. submitted to : ftp://next-ftp.peak.org/pub/next/submissions/Analog.2.0.NIHS.tar.gz and probably will move to : ftp://next-ftp.peak.org/pub/next/apps/internet/www/Analog.2.0.NIHS.tar.gz Panagiotis Velissariou e-mail : takis@superior.eng.ohio-state.edu takis@takis2.ee.net pvelissa@postbox.acs.ohio-state.edu -------------------------------------------------------------------------------- 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 ) e) move analform.html to whatever directory you want. 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.2.0 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 ) e) move analform.html to whatever directory you want. -------------------------------------------------------------------------------- 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 "2.0" to : #define VNUMBER "2.0 (Modified by Panagiotis Velissariou)" 2) Line 212 from : #define NO_ERRS (34) to : #define NO_ERRS (43) (to include the additional error messages in the file init.c) 3) Line 213 from : #define MAXERRLENGTH (40) to : #define MAXERRLENGTH (64) 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" (this is for the analog form to find the analog program) 2) Line 92 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 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 232 : 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 : 1) Line 555 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; if (errstr != NULL && errstr[0] != '\0') { /* shouldn't occur, but be safe */ strcpy(e1, errstr); strtoupper(e1); for (i = 0; !done; i++) { strcpy(e2, errs[i]); if (strstr(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; flag done = OFF; if (errstr != NULL && errstr[0] != '\0') { /* shouldn't occur, but be safe */ strcpy(e1, errstr); strtoupper(e1); for (i = 0; !done; i++) { strcpy(e2, errs[i]); if (strstr(e1, strtoupper(e2)) != NULL) { done = ON; errors[i]++; } if (i == NO_ERRS - 1) { /* unknown error type */ done = ON; if (debug >= 2) fprintf(stderr, "E: %s\n", errstr); } } } } 11) Modified the file init.c as : 1) Line 49 Modified the char array "errs" to include FastCgi error messages 2) Line 315 from : html2 = ON; to : html2 = OFF; (to turn off the HTML 2.0 compliance, in the bottom of output.c file) 3) 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) 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.