|
|
 |
 |
 |
 |
Log Visualizer
|
|
|
HostMonitor may store tests results in log files (DBF, HTML, Text), also it may use user-specified database to keep history of test results. The purpose of Log Visualizer is to visualize test results for certain test item on demand. The application parses content of a log file and presents test results over period of time as a variety of charts.
What is the difference between Log Visualizer and Log Analyzer? Log Analyzer provides information about all test items that are listed in the log; it creates reports for set of tests. Log Visualizer creates chart for specific test item. Log Analyzer can be used as GUI application and as command line utility while Log Visualizer is command line utility; it is designed to be started by HostMonitor or your own homemade script (nevertheless it provides some simple GUI as well). When you need a chart for single test, it's much better to use Log Visualizer because it is optimized for such tasks. Log Visualizer uses specially formatted files (repository) to store intermediate data grouped by test items on hourly, daily, weekly and monthly basis. That trick helps application to increase productivity and execution speed significantly. When you need report with charts for a large amount of test items, Log Analyzer might be preferable. Log Visualizer creates chart that shows test results over specified period of time (day, week, month, etc). Depending on command line parameters chart can be stored in specified file (GIF format) or the same chart can be displayed on screen.
|
|
|
|
|
|
Using Log Visualizer you may: compose your own documents with the charts created by Log Visualizer on regular basis; e.g. you may create HTML template with links to images and use scheduler to launch Log Visualizer to update the images on regular basis (e.g. every midnight) create shortcuts on your desktop for specific test items; then you may bring up chart for the test with easy point-and-click operation; also, if you have Log Visualizer installed, HostMonitor will provide additional option thru Test Info dialog window. HostMonitor will display button that allows you to bring up chart for the test item Log Visualizer may utilize all types of log files: HTML, Text, and DBF log files. It is also able to utilize the log records, stored in various databases using ODBC interface.
Usage and input parameters
When you use HostMonitor to start Log Visualizer, HostMonitor checks logvisualizer.ini file, adjusts parameters (e.g. ODBC data source parameters) and utilizes necessary command line switches to start utility in maintenance-free mode. So you just should click a button to see the chart for specified test item.
When you start Log Visualizer manually or you need to create your own script to launch the utility, use the following command line syntax:logvisualizer.exe -testid:<testID> -logprofile:<profile_name> [-inputfile:<log_filename>] [-outputimage:<image_filename>] [-period:<chart_period>] [-daysback:<number_of_days>] First 2 parameters are obligatory:-testidtestID - ID of the test that should be analyzed and visualized. You may use HostMonitor's Test Info dialog to find out ID of some specific test item. If you need to know ID for all test items, you may use Custom HTML report with %TestID% macro variable in the template.-logprofileprofile_name - name of the file that contains application settings. See Setup profiles section for details. You may specify filename without path when profile is located in current directory (e.g. -logprofile:logvisualizer.ini), otherwise you should provide path to the file (e.g. "-logprofile:c:\program files\hostmon\lv2.ini") Other parameters are optional:-inputfilelog_filename - HostMonitor's log file (HTML, TXT or DBF). When inputfile is not specified, Log Visualizer will check ODBC log setting. If ODBC log is specified, it will be used for analyzing. -outputimage image_filename - name of the GIF file. If this parameter is specified, Log Visualizer will create GIF file with image of the chart. Application will not display anything on screen. -periodchart_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 -daysbackThis parameter allows you to shift time interval used for the chart by certain number of days. By default, daysback is set to 0. This means chart bounds are calculated relatively to current date. If you set daysback to 1, charts bounds will be calculated from yesterday, and so on. Note: you also may specify negative values for daysback parameter. Unlike positive values, that just shift chart bounds back in time, negative values have predefined meanings that depend on chart period parameter. There is a list of special values:
If chart period is set to WeekByHours or WeekByDays, you may use the following numbers for daysback parameter -3 the beginning of the chart will be aligned to the first day of the current week -4 the beginning of the chart will be aligned to the first day of the previous week -10 two weeks shift, aligned to the first day of the week -11 three weeks shift, aligned to the first day of the week
If chart period is set to MonthByDays or MonthsByWeeks, you may set daysback parameter to using the following values: -5 the initial chart bound will be aligned to the first day of this month -6 the initial chart bound will be aligned to the first day of the previous month -9 two months shift, aligned to the first day of the month
If chart period is set to YearByWeeks or YearByMonths, you may use the following numbers for daysback parameter -7 the left chart bound will be aligned to the first day of this year -8 the left chart bound will be aligned to the first day of the last year Several examples of command line that starts Log Visualizer: logvisualizer -testid:1520 -logprofile:C:\HM\odbc_profile.ini logvisualizer -testid:1520 -logprofile:C:\HM\odbc_profile.ini -inputfile:C:\HM\Logs\log.htm logvisualizer -testid:1520 -logprofile:C:\HM\odbc_profile.ini -period:MonthByDays -outputimage:C:\HM\Images\daily_115645.gif logvisualizer -testid:1520 -logprofile:C:\HM\odbc_profile.ini -daysback:30 -outputimage:C:\HM\Images\daily_115645.gif
Batch mode
If you setup HostMonitor to change log file on regular basis (weekly, monthly, etc) and you have not used Log Visualizer for a while, you may need to start application in batch mode using the following command line: logvisualizer.exe -batch_mode -logprofile:<profile_name> -inputfile:<log_filename> [-clear_repository]-batch_modeThis parameter tells application to analyze specified log file (see -inputfile parameter) and update repository without displaying GUI and without creating GIF image for a test item-logprofileprofile_name - name of the file that contains application settings. See Setup profiles section for details. You may specify filename without path when profile is located in current directory (e.g. -logprofile:logvisualizer.ini), otherwise you should provide path to the file (e.g. "-logprofile:c:\program files\hostmon\lv2.ini")-inputfilelog_filename - HostMonitor's log file (HTML, TXT or DBF)-clear_repository When this optional parameter specified, Log Visualizer removes all records from repository before processing log fileBatch mode allows you to analyze several log files one by one and create up-to-date repository without spending time for manual setup. For example, if you setup HostMonitor using "Automatically change the log every month" option, HostMonitor creates 12 files during each year: 012007-log.htm, 022007-log.htm, 032007-log.htm, ..., 122007-log.htm. Then you may create simple BAT file to analyze all log files for 2007: for /L %i in (1,1,9) do logvisualizer.exe -batch_mode -logprofile:logvisualizer.ini "-inputfile:c:\hostmon7\logs\0%i2007-log.htm" for /L %i in (10,1,12) do logvisualizer.exe -batch_mode -logprofile:logvisualizer.ini "-inputfile:c:\hostmon7\logs\%i2007-log.htm"
Note: you should analyze log files in proper order, i.e. April log file should be analyzer before May log file.
|
|
|
|
Druckbare Version
|
|