The Deployment Template creates a
generate_usage_report
batch or shell script that you
can run to generate reports from usage logs disk. The reports let you quickly
determine peak usage times and volume.
You must configure usage logging and have a set of logs against which to run the script.
The script generates the following reports:
Daily usage — This report,
dgraph-daily-usage.txt
, lists the number of Dgraph queries, the time (in seconds) for which usage logs do not exist, and the number of Dgraphs queried:#report generated for Discover on 2013-09-09T12:00:00Z #date,usage,unreported time in seconds,# dgraph 2013-08-01,30085,600,2 2013-08-02,29001,1200,2 ...
Weekly usage — This report,
dgraph-weekly-peak-usage.txt
, lists the peak Dgraph usage for each week for which usage logs are available, the time (in seconds) for which logs do not exist on the peak date, and the number of Dgraphs queried:#report generated for Discover on 2013-09-09T12:00:00Z #from date,to date,peak usage date,peak usage,unreported time in seconds on peak day,# dgraph 2013-07-28,2013-08-03,2013-08-01,30085,600,2 2013-08-04,2013-08-10,2013-08-09,28801,1200,2 ...
Yearly and monthly usage — This report,
dgraph-yearly-peak-usage.txt
, lists the peak Dgraph usage for each calendar year for which usage logs are available, the time (in seconds) for which logs do not exist on the peak date, and the number of Dgraphs queried. It also lists the same metrics for each month:#report generated for Discover on 2013-09-09T12:00:00Z #from date,to date,peak usage date,peak usage,unreported time in seconds on peak day,# dgraph 2013-01-01,2013-12-31,2013-08-01,30085,600,2 #peak usage values for each month #from date,to date,peak usage date,peak usage,unreported time in seconds on peak day,# dgraph 2013-08-01,2013-08-31,2013-08-01,30085,600,2 2013-09-01,2013-09-30,2013-09-03,34905,800,2 ...
Additionally, the script generates dailly, weekly, and yearly usage
reports for the Assembler if you are running Oracle Commerce Guided Search with
Experience Manager. These files are named
asm-daily-usage.txt
,
asm-weekly-peak-usage.txt
, and
asm-yearly-peak-usage.txt
, respectively.
To generate usage reports from log files:
Navigate to the
control
directory of your deployed EAC application on disk.For example,
Endeca\apps\Discover\control
.Run the
generate_usage_report
batch or shell script.Optionally, pass in the following command line arguments:
--usage-log-dir
— The directory where usage logs are stored. This defaults tologs/usage
.--usage-report-dir
— The directory to store usage reports. This defaults toreports/usage
.--overwrite
— Whether to override existing reports (defaults toyes
).When set tono
, the script throws an error if reports already exist in the--usage-report-dir
directory.