RE: Trying to execute bat file

Jeremy Wadsack <[email protected]>
Newsgroups gmane.comp.web.analog.general
Message-ID <[email protected]>
Analog will write the report to stdout (the command window) when no other options are given (which the -G on you command list does). You've added a command in your batch file to change the configuration, but it's not reading it:

analog.exe: Warning C: No argument specified after +g command line option (or
  space wrongly left before argument)

Analog doesn't use spaces between arguments and values on the command line. So you want something like this in your batch file:

call analog.exe +g"weeklyStats.cfg" -G

You can remove the R-level warnings by adding this command to your configuration, but right now, it's helping you identify that there are problems (i.e. it's not reading your config file):

            WARNINGS -R

Finally, you probably want to change the third line of your batch file to this:

            c:

The command "cd c:" just echoes the current working directory for drive C: but that's suppressed by "ECHO OFF".

--

Jeremy Wadsack
Seven Simple Machines
________________________________
From: [email protected] [mailto:[email protected]] On Behalf Of Hanif
Sent: Tuesday, July 22, 2008 8:56 AM
To: [email protected]
Subject: [analog-help] Trying to execute bat file

This is my weeklyStats.cfg file:

# Chooses the log files included in two directories
LOGFILE W:\prdwcs-a.all\access_log*
LOGFILE W:\prdwcs-b.all\access_log*

LANGUAGE ENGLISH
OUTPUT HTML

# Outputs the report to the specified path
OUTFILE D:\webstat\analog\reports\w20080606-report.html

IMAGEDIR images/ # within the same directory as output

FROM 080706:1201
TO 080712:1159


This is my bat:

:: runAnalog.bat

@echo off
echo Processing Weekly Statistical Reports...
cd c:
cd program files
cd analog 6.0
call analog.exe +g "weeklyStats.cfg" -G



And this is the log

C:\Program Files\analog 6.0>analog.exe +g "weeklyStats.cfg" -G
analog.exe: analog version 6.0/Win32
analog.exe: Warning C: No argument specified after +g command line option (or
  space wrongly left before argument)
  (For help on all errors and warnings, see docs/errors.html)
analog.exe: Warning D: Turning all pie charts off because OUTFILE is stdout
  and CHARTDIR is unset
analog.exe: Warning L: Large number of corrupt lines in logfile
  weeklyStats.cfg: turn debugging on or try different LOGFORMAT
    Current logfile format:
      #Fields:<W3 extended format string>\n
      #%j\n
analog.exe: Warning R: Turning off empty time reports
analog.exe: Warning R: Turning off empty Request Report
analog.exe: Warning R: Turning off empty File Type Report
analog.exe: Warning R: Turning off empty Directory Report
analog.exe: Warning R: Turning off empty Domain Report
analog.exe: Warning R: Turning off empty Organisation Report
analog.exe: Warning R: Turning off empty Search Word Report
analog.exe: Warning R: Turning off empty Operating System Report
analog.exe: Warning R: Turning off empty File Size Report
analog.exe: Warning R: Turning off empty Status Code Report
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="#internalStyle" type="text/css"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Web Server Statistics for [my organisation]</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="robots" content="noindex,nofollow" />
<meta name="generator" content="analog 6.0/Win32" />
<style type="text/css" id="internalStyle">
h2 {
        background-color: #A0C0F0;
        width: 98%;
        padding: 3px 6px;
}
table {
        text-align: right;
        margin-left: 30px;
        background-color: #D0E0F0;
        border-collapse: collapse;
}
th {
        border-bottom: 1px solid #404050;
        border-right: 1px dotted #606070;
        border-top: none;
        border-left: none;
        padding: 0px 5px 1px 5px;
        font-weight: bold;
        background-color: #A0C0F0;
}
td {
        padding: 0px 5px 1px 5px;
        border-right: 1px dotted #606070;
        border-left: none;
        border-bottom: none;
        border-top:none;
}
td.x {
        font-family: monospace;
        white-space: pre;
}
.xl {
        text-align: left;
        border-right: none;
}
.xr {
        text-align: right;
        border-right: none;
}
.bar {
        text-align: left;
        border-right: none;
}
tr.sub {background-color: #C0C0FF;
        font-style: italic;
}
.repdesc {
        font-style: italic;
}
.repspan {
        font-style: italic;
}
.goto {
        font-size: small;
}
.gensumtitle {
        font-weight: bold;
}
.gototitle {
        font-weight: bold;
}
.runtimetitle {
        font-weight: bold;
}
img {
        border-style: none;
}
a:link {
        color: blue;
        text-decoration: none;
}
a:visited {
        color: purple;
        text-decoration: none;
}
a:link:hover {
        text-decoration: underline;
}
a:visited:hover {
        text-decoration: underline;
}
a:link:active {
        color: red;
        text-decoration: underline;
}
a:visited:active {
        color: red;
        text-decoration: underline;
}
</style>
</head>
<body>
<div class="header"><h1><a name="Top" id="Top" href="http://www.analog.cx/"><im
 src="images/analogo.png" alt="" /></a> Web Server Statistics for [my organisat
on]</h1>

<p class="analysisspan">Program started at Tue-22-Jul-2008 08:52.</p>
</div>
<div class="gensum"><h2><a name="gensum" id="gensum">General Summary</a></h2>
<p class="goto">(<span class="gototitle">Go To</span>: <a href="#Top">Top</a> |
General Summary)</p>
<p class="repdesc">This report contains overall statistics.</p>
<p class="gensumlines">
<span class="gensumtitle">Successful requests:</span> 0
<br /><span class="gensumtitle">Logfile lines without status code:</span> 18
<br /><span class="gensumtitle">Corrupt logfile lines:</span> 134
</p>
</div><div class="footer"><p class="credit">This analysis was produced by <a hr
f="http://www.analog.cx/">analog 6.0</a>.
<br /><span class="runtimetitle">Running time:</span> Less than 1 second.
</p>
<p class="goto">(<span class="gototitle">Go To</span>: <a href="#Top">Top</a> |
<a href="#gensum">General Summary</a>)</p>
</div>
</body>
</html>

********************************************************************************************************************************************************

Why does HTML show up in the CMD window and how can I reduce the warnings? Thanks

+------------------------------------------------------------------------
|  TO UNSUBSCRIBE from this list:
|    http://lists.meer.net/mailman/listinfo/analog-help
|
|  Analog Documentation: http://analog.cx/docs/Readme.html
|  List archives:  http://www.analog.cx/docs/mailing.html#listarchives
|  Usenet version: news://news.gmane.org/gmane.comp.web.analog.general
+------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.