Asked by:
Chart csv data

Question
-
User531388329 posted
THis should be soooo simple but it isn't - yet. Help!
I have a csv file which has data similar to this:
TIME,COUNTed
2006-11-09 13:51:24,3279
2006-11-09 13:56:24,3285
2006-11-09 14:01:24,3295
2006-11-09 14:06:24,3000.....I want to simply have a chart that depicts the last ten events in the log similar to
3300 | x
3200 |X X
3100 |X X
3000 |X X
2900 |X___X__________
1 6 1 6
5 5 0 0
: : : :
3 3 4 4
1 1 1 1Any ideas how to accomplish this?
Tuesday, August 21, 2007 2:21 AM
All replies
-
User531388329 posted
What are you having trouble with? The query or the chart?
The query should be something along the lines of:
SELECT TOP 10 Time, Count
FROM log
ORDER by Time DESCTuesday, November 14, 2006 9:15 AM -
User531388329 posted
Quote: What are you having trouble with? The query or the chart? The query should be something along the lines of: SELECT TOP 10 Time, Count FROM log ORDER by Time DESC
The query isn't the issue. It is the chart output format that is causing me grief.Tuesday, November 14, 2006 11:27 AM -
User531388329 posted
Quote: THis should be soooo simple but it isn't - yet. Help! I have a csv file which has data similar to this: TIME,COUNTed 2006-11-09 13:51:24,3279 2006-11-09 13:56:24,3285 2006-11-09 14:01:24,3295 2006-1...
Ok, to expand further.....
If I have the following dataset
TS,Counts,Server
2006-11-14 11:08:06,1,Server-1
2006-11-14 11:08:07,1966,Server-2
2006-11-14 11:10:00,3,Server-1
2006-11-14 11:10:00,1849,Server-2
2006-11-14 11:15:00,1,Server-1
2006-11-14 11:15:00,1436,Server-2
2006-11-14 11:20:00,4,Server-1
2006-11-14 11:20:00,1065,Server-2
2006-11-14 11:25:00,4,Server-1
2006-11-14 11:25:00,818,Server-2
2006-11-14 11:30:00,13,Server-1
2006-11-14 11:30:00,652,Server-2I would like to see if I can output a chart that would show server-1's count next to server-2's count by TS (timestamp).
Tuesday, November 14, 2006 12:03 PM -
User531388329 posted
When I try working on it I get an error of "Error: Syntax Error: <from-clause>: expecting FROM keyword instead of token 'c:\logparser\test\Chart.gif'"
logparser -i:CSV "SELECT TOP 10 Time, Count INTO c:\logparser\test\Chart.GIF FROM c:\logparser\test\log.csv ORDER by Time DESC" -charttype:bar3d
Tuesday, November 14, 2006 12:38 PM -
User531388329 posted
Quote: When I try working on it I get an error of "Error: Syntax Error: : expecting FROM keyword instead of token 'c:\logparser\test\Chart.gif'" logparser -i:CSV "SELECT TOP 10 Time, Count INTO c:\logpars...
I had to modify your query to get you further along:
logparser -i:CSV "SELECT TOP 10 TS, Counts INTO c:\logparser\test\Chart.GIF FROM c:\logparser\test\log.csv ORDER by TS DESC" -charttype:bar3d
Which results in this display.
Tuesday, November 14, 2006 1:15 PM