« Previous Next »

Thread: Using multiples to put time or date in output file name?

Last post 01-28-2007 5:21 PM by LogParser User : allenbi. 6 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (7 items)

Sort Posts:

  • 01-26-2007, 11:28 PM

    Using multiples to put time or date in output file name?

    I am trying to get the current system date or time into my LogParser output file name. Here is the query I am trying:

    C:\PROGRA~1\LOGPAR~1.2>logparser -i:TSV -iSeparator:spaces "SELECT system_time()
    , field1 AS %Utilization INTO *chart.gif FROM xfrsGLOBAL.asc" -headerRow:off -ch
    artType:Column3d -chartTitle:"Global CPU Utilization"

    Here is the error I am getting in addition to the file name not being created like I want:

    Task completed with errors.
    Unexpected internal error calling chart object method ExportPicture:
    Exception occurred.

    Where am I going wrong. Does anyone have an example of how to do this correctly?


  • 01-27-2007, 9:15 AM In reply to

    RE: Using multiples to put time or date in output file name?

    Try simplifying your query to narrow down where the problem is.
    First, you could try removing the multiplexing and see if it fails with just field1 as %utilization then you could try it with the multiplexing, but without the percent sign. The office charting component can be a bit finicky at times.
  • 01-27-2007, 5:42 PM In reply to

    RE: Using multiples to put time or date in output file name?

    LogParser User : allenbi:
    Quote: Try simplifying your query to narrow down where the problem is. First, you could try removing the multiplexing and see if it fails with just field1 as %utilization then you could try it with the multi...

    I do know that everything works ok without the multiplexing the way it is written.  However, that is still a good idea about the % sign.  I will remove that and see if it makes the difference.  Thanks for the help.  I will post back with results.

     

  • 01-27-2007, 6:01 PM In reply to

    RE: Using multiples to put time or date in output file name?

    LogParser User : allenbi:
    Quote: Try simplifying your query to narrow down where the problem is. First, you could try removing the multiplexing and see if it fails with just field1 as %utilization then you could try it with the multi...

    Ok, I have confirmed that the query works properly without the multiplex.  Also, the % sign does not seem to make any difference.  I am beginning to think the problem is that system_time() does not return a value that is appropriate to multiplex into the INTO *chart.gif.  Does the value returned from system_time() need processed, or is there a better function to use to get the current date multiplexed into the output filename?  I have read that this is possible, but I have not seen any actual code for precisely this situation.  What do you think?

    Thanks,

    Bill

  • 01-27-2007, 8:46 PM In reply to

    RE: Using multiples to put time or date in output file name?

    LogParser User : allenbi:
    Quote: Ok, I have confirmed that the query works properly without the multiplex.  Also, the % sign does not seem to make any difference.  I am beginning to think the problem is that system_time() d...

    I find I can perform the operation I am attempting so long as the output file is not a chart type file, .gif, .jpg, etc.   I found at the bottom of the help page on the multiplex feature that it only works properly with output file types of CSV, TSV, XML, W3C, IIS, & TPL.   I suppose that is why my error is coming form the chart export function.  Is there a workaround for this? 

    Thanks,

    Bill

     

  • 01-28-2007, 2:39 PM In reply to

    RE: Using multiples to put time or date in output file name?

    Ahh, I didn't think of that. No, you aren't going to be able to use multiplexing for chart output. If you are calling LP from within a batch file and using a query file, you could create an environment variable that contains the date in the format you want then pass that variable in as a parameter to the query file.
  • 01-28-2007, 5:21 PM In reply to

    RE: Using multiples to put time or date in output file name?

    LogParser User : allenbi:
    Quote: Ahh, I didn't think of that. No, you aren't going to be able to use multiplexing for chart output. If you are calling LP from within a batch file and using a query file, you could create an environm...

    Thanks much for the feedback.  That also was the conclusion that I came to and used the batch file wrapper that I was using to do the file name processing to include the current date.

     

    Thanks again for the help,

    Bill

     

Page 1 of 1 (7 items)
Microsoft Communities