LogVisualizer Batch Mode

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
xcentric
Posts: 176
Joined: Sat Oct 23, 2010 4:30 pm

LogVisualizer Batch Mode

Post by xcentric »

For the first time I am attempting to use LogVisualizer to get a chart for a specific amount of days on a single test. The logs are rotated daily.

After reading the manual on LogVisualizer I came up with the following script but its not working and the LogVisualizer log file reveals nothing.

What could be wrong here? The batch file is executed from within the hm directory where it runs. The range value for the For command specifies 1 2 3 4 5 6. So that would mean the first 6 days of April right?

Code: Select all

for /L %i in (1,1,6) do logvisualizer.exe -testid:115 -batch_mode -logprofile:logvisualizer.ini -inputfile:d:\tools\hostmonitor8\logs\2011-04-0%i-log.txt -outputimage:d:\tools\hostmonitor8\1.gif
I tried to put a pause command in the script but it does not work. The script opens and closes really fast so I cannot see any errors if any.
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

LogVisualizer Batch Mode

Post by KS-Soft Europe »

The script opens and closes really fast so I cannot see any errors if any.
You may start script using cmd shell (Start menu -> Run -> type cmd). Then you will see all error messages.
for /L %i in (1,1,6) do logvisualizer.exe -testid:115 -batch_mode -logprofile:logvisualizer.ini -inputfile:d:\tools\hostmonitor8\logs\2011-04-0%i-log.txt -outputimage:d:\tools\hostmonitor8\1.gif
I think problem is in %i. Try to use double percent instead (%%i).
Also, you may type full path to each file parameter.

So script may look like:
for /L %%i in (1,1,6) do d:\tools\hostmonitor8\logvisualizer.exe -testid:115 -batch_mode -logprofile:d:\tools\hostmonitor8\logvisualizer.ini -inputfile:d:\tools\hostmonitor8\logs\2011-04-0%%i-log.txt -outputimage:d:\tools\hostmonitor8\1.gif
xcentric
Posts: 176
Joined: Sat Oct 23, 2010 4:30 pm

Post by xcentric »

Now your suggested script goes through the 6 days but no gif is created.
xcentric
Posts: 176
Joined: Sat Oct 23, 2010 4:30 pm

Post by xcentric »

Processing one file at a time seems to work without issue. Hmm...
xcentric
Posts: 176
Joined: Sat Oct 23, 2010 4:30 pm

Post by xcentric »

I believe I am a bit confused on how to get desired results here.
I really want to know how logvisualizer functions.

Should your suggested script batch_mode produce a single graph for 6 days? processing one log file per day into one graph? Or is there another step?

Can you explain what you mention in the manual about the repository? How does it work? Is it a cache? Stored locally somewhere?

Must you prepopulate this repository before any graphs can be extracted?
Is it neccessary to clear a repository before a bactch process? Or is the respository only updated with more recent log files to extract data from?

I notice that if I clear the repository and then run a normal mode script against one test and one log file the graph shows "no data". But then if I run batch_mode and then run previous script I get results. I used an inputfile parameter at this point. Was that neccessary if there is a repository? If I omit the inputfile will the script think I am using ODBC?

What is the correct process?
1. Clear repository.
2. Run batch_mode against entire logs folder. (to get updated reppository?)
3. Run normal mode against testid.

I have questions!!! lol. :P
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

for /L %i in (1,1,6) do logvisualizer.exe -testid:115 -batch_mode -logprofile:logvisualizer.ini -inputfile:d:\tools\hostmonitor8\logs\2011-04-0%i-log.txt -outputimage:d:\tools\hostmonitor8\1.gif
You are using cycle to analyze different log files but you are using the same image file in each iteration so software will overwrite the same image and store image related to last log file at the end.
Should your suggested script batch_mode produce a single graph for 6 days? processing one log file per day into one graph? Or is there another step?
There is no such mode.
Quote from the manual
==================
[-period:<chart_period>]
chart_period parameter specifies length of time frame that should be displayed and precision of the chart. There are several visualization levels available:
- DayByHours - a chart on hourly basis based on last 48 hours
- WeekByHours - a chart on hourly basis based on 1 week of data
- WeekbyDays - a chart on daily basis based on 1 week of data
- MonthByDays - a chart on daily basis based on 1 month of data
- MonthByWeeks - a chart on weekly basis based on 1 month of data
- YearByWeeks - a chart on weekly basis based on 1 year of data
- YearByMonths - a chart on monthly basis based on 1 year of data

==================
As you may see you may create single chart for a day, week or months. You cannot create chart for 6 days (unless log file stores data for 6 days only).

Also, you do not specify this parameter at all. In such case Log Visualizer uses last specified period (it can be specified by GUI as well).
I think this is Ok for interactive mode but you should use -period parameter for scripts.
Can you explain what you mention in the manual about the repository? How does it work? Is it a cache? Stored locally somewhere?
Sort of cache, stored in LogInfo subfolder.
Must you prepopulate this repository before any graphs can be extracted?
Is it neccessary to clear a repository before a bactch process? Or is the respository only updated with more recent log files to extract data from?
Normally you should not worry about these files.
Unless you modify log files manually or replace files or you are using small log files that do not cover specified period (so you should analyze several files).
Looks like this happens in your case - your log files cover just 1 day. In such case you need to analyze several files when you need a chart for a week...

Regards
Alex
Post Reply