"Fossies" - the Fresh Open Source Software Archive

Member "sarg-2.4.0/documentation/log.txt" (9 Feb 2013, 2877 Bytes) of package /linux/privat/sarg-2.4.0.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "log.txt" see the Fossies "Dox" file reference documentation.

    1 /*! \file log.c
    2 \brief Program entry point
    3 */
    4 
    5 /*! \fn int main(int argc,char *argv[])
    6 Entry point of the program. See the man page for the accepted parameters.
    7 
    8 \param argc The number of arguments passed in \a argv to the program.
    9 \param argv The arguments passed to the program.
   10 
   11 This function parse and process the program's options.
   12 
   13 It also parse and read the log file to analyse.
   14 
   15 \section ReadAccessLog Reading of the access log file
   16 
   17 Sarg detects the type of log that is provided. Although sarg can process multiple
   18 log files in one pass, they must be all of the same type. You cannot mix logs from
   19 different applications in one single run.
   20 
   21 \subsection SquidAccessLog Reading the squid access.log file
   22 
   23 Sarg only understand the format of the default squid log file.
   24 
   25 \subsection IisAccessLog Reading the IIS log file
   26 
   27 Sarg recognize this type of log by the first line. It starts with
   28 the string "#Software: Mic" without the quotes. Then sarg searches for a line
   29 indicating the columns found in the file. It extracts the column number of the
   30 columns it needs to produce the report.
   31 
   32 \section UserUnsortLog Output files
   33 
   34 The data are written in files with the \c unsort extension and named after the
   35 user whose access line is processed. It contains the following columns separated
   36 by one space:
   37 
   38 \arg The day of the access.
   39 \arg The time of the access.
   40 \arg The user ID.
   41 \arg The IP address of the user.
   42 \arg The number of bytes transfered.
   43 \arg The HTTP code of the server to the request.
   44 \arg The time spent in that request.
   45 \arg The smart filter information (?).
   46 
   47 Moreover, any URL classified as a download is written in the \c download.unsort file
   48 with the following columns:
   49 
   50 \arg The day of the download.
   51 \arg The time of the download.
   52 \arg The user ID.
   53 \arg The IP address of the user.
   54 \arg The full URL of the downloaded file.
   55 
   56 Any URL returning the HTTP code 403 (forbidden access) is reported in the file
   57 \c denied.log.unsort with the following columns:
   58 
   59 \arg The day of the access.
   60 \arg The time of the access.
   61 \arg The user ID.
   62 \arg The IP address of the user.
   63 \arg The URL that was rejected.
   64 
   65 Any URL returning the HTTP code 401 (unauthorized) or 407 (?) is reported in the file
   66 \c authfail.log.unsort with the following columns:
   67 
   68 \arg The day of the access.
   69 \arg The time of the access.
   70 \arg The user ID.
   71 \arg The IP address of the user.
   72 \arg The URL that was rejected.
   73 
   74 
   75 */
   76 
   77 
   78 
   79 
   80 
   81 /*! \fn static void getusers(const char *pwdfile, int debug)
   82 Read the user ID from a passwd file and merge them in :userfile.
   83 
   84 \param pwdfile The name of the passwd file to read. The columns are separated by colons and
   85 only the first column is kept.
   86 \param debug Set to \c true to print debug informations.
   87 
   88 \bug This function is obviously intented to provide a list of user ID for get_usertab_name()
   89 but the names are not stored in a way that is usable by that function.
   90 */
   91