You can use the reporttool utility to generate reports of Abaqus license usage history. The report tool reads data from the Dassault Systèmes license server log file or the FLEXnet debug log file and customizes the report according to your choices.
If you have installed Abaqus products on the network where the license server resides, you can run the reporttool utility using the abaqus command, as follows:
abaqus licensing reporttool -log logfile -logtype {dsls | flexnet} [-start start_date] [-end end_date] [-type {export | query}] -accessor accessors [-list_accessors] [-filter filter] [-list_filters] [-sort sorter] [-list_sorters] [-aggregator aggregators] [-list_aggregators] [-duration bucket_size] [-output report_file] [-format output_format] [-list_formats] [-custom customization_script] [-help]For more information about the Abaqus licensing execution procedures, see “Licensing utilities,” Section 3.2.13 of the Abaqus Analysis User's Guide.
In the context of this report tool, a license session is defined as a licensed job executing on an Abaqus product feature, which has a checkout time and a checkin time.
The following command line options are available for the reporttool utility.
-log
Specify the path and file name of the log files to be read. The default location of a DSLS log file is C:\ProgramData\DassaultSystemes\LicenseServer\LogFiles\ on Windows or /var/DassaultSystemes/LicenseServer/LogFiles/ on Linux. For FLEXnet, you must specify the debug log file. If the log file is located on a remote server, you must copy it to a directory that is accessible by your local computer. This option is required.
Multiple log files can be specified in two ways:
Use the -log option multiple times: -log first.log -log second.log
Give a comma-separated list of the file names: -log first.log,second.log
-logtype
Specify the type of license server being used with Abaqus: dsls or flexnet. This option is required and is case-sensitive (must be lowercase).
-start
Specify the starting date and time for the reporting period. If the -start option is omitted, the reporting period begins with the oldest recorded item in the log files. The date and time must be specified in one of the following formats:
dd-mmm-yyyy_hh:mm:ss
For example, -start 01-jan-2012_09:00:00 indicates a starting time of 9:00 AM on January 1, 2012. Specifying a time is required, including hours, minutes, and seconds. The hour field (hh) must be entered in 24-hour format.
-xhours or -xdays
Use this format to pick a time or day in the past. For example, -start -6hours specifies a start time of six hours ago.
-end
Specify the ending date and time for the reporting period. If the -end option is not specified, the reporting period ends with the most recent recorded item in the log files. The date and time must be specified in one of the following formats:
dd-mmm-yyyy_hh:mm:ss
For example, -end 31-mar-2012_18:00:00 indicates an ending time of 6:00 PM on March 31, 2012. Specifying a time is required, including hours, minutes, and seconds. The hour field (hh) must be entered in 24-hour format.
-xhours or -xdays
Use this format to pick a time or day in the past. For example, -end -3hours specifies an ending time of three hours ago.
-type
Specify the type of report desired: export or query. If this option is omitted, the default is export. An export report provides the basic licensing session information, usually in tabular format or comma-separated values (CSV). The data can be optionally filtered or sorted. A query report lets you look at sessions in aggregate; you can operate on the raw data to calculate such things as maximum usage, peak usage, and averages. A query report divides the total time period into equal sized buckets. You choose the size of each time bucket with the -duration option. You can also use an export report to save the raw data to a CSV file, import it into an Excel spreadsheet, and perform custom calculations using your own tools.
-accessor
Comma-separated list of accessors to be read from the log data. Accessors are the fields or columns of the output report. For example: -accessor username,checkout,duration. This option is required.
-list_accessors
Use this option to obtain a list of the available report accessors. The basic accessors are as follows:
duration—duration of the license session, in seconds
username—username
checkout—checkout date
feature—Dassault Systèmes license feature (trigram); for example, QSD
quantity—number of licenses requested
project—custom project names or numbers recorded from the lmproject environment file parameter (see “License management parameters,” Section 4.1.7)
session—the internal session object that represents the licensing job; this is useful only when using the peak aggregator or designing your own custom aggregators
-filter
Filter the report data. The required format for this option is -filter accessor:value. The report output is filtered to include only data records for which accessor=value. You can include multiple accessor:value pairs in a comma-separated list; for example,
-filter username:tsmith,hostname:zuluThis example would produce a report showing license checkouts only from the user tsmith on the computer zulu. To create other filters, use the -custom option with a Python program.
-list_filters
Use this option to obtain a list of the available filters. The one built-in filter takes the form -filter accessor:value. If you create any custom filters using the -custom option, they will appear in this list.
The following command line options are available for sorting the output of the reporttool utility.
-sort
Sort the report data chronologically, from oldest to newest. The required format for this option is -sort date.
-list_sorters
Use this option to obtain a list of the available sorters. The one built-in sorter is date. If you create any custom sorters using the -custom option, they will appear in this list.
The following command line options are available for query reports from the reporttool utility.
-aggregator
Comma-separated list of aggregator functions to be applied to the accessor values in each time bucket. For example: -aggregator max,average. This option is required if -type query is used.
-list_aggregators
Use this option to obtain a list of the available aggregator functions. The basic aggregators are as follows:
max—maximum value of an accessor in each time bucket
min—minimum value of an accessor in each time bucket
sum—sum of all accessor values in each time bucket
average—average value of accessor in each time bucket
len—number of items in each time bucket
peak—maximum number of licenses in use; must operate on the session accessor
-duration
The size of each time bucket for query reports, in minutes, hours, days, weeks, or months. If this option is omitted, the default is 24 hours. Examples: -duration 1hour, -duration 2days
The following command line options are available for formatting the output of the reporttool utility.
-output
Specify the path and file name of the file to which the report will be written. If this option is omitted or -output - is used, the default is to write to standard output (showing the report in your command prompt or shell window).
-format
Specify the output format to use.
-list_formats
Use this option to obtain a list of the available output formats. The basic formats are as follows:
table—a plain table with columns for each accessor and/or aggregator selected
csv—comma-separated values
json—JavaScript Object Notation (see http://json.org)
Several examples are shown below to demonstrate different ways to use the reporttool utility.
The following example generates a simple export type of report showing checkout date, username, product feature, and quantity.
abaqus licensing reporttool -log today.log -logtype dsls -type export -accessor checkout,username,feature,quantity Checkout Date | Username | Feature | Quantity | -------------------- | -------- | ------- | -------- | 2012-Dec-10 03:05:16 | bbaggins | QEX | 50 | 2012-Dec-10 03:33:50 | gandalf | QAE | 1 | 2012-Dec-10 04:08:34 | fbaggins | QAE | 1 | 2012-Dec-10 06:27:18 | gollum | QEX | 50 |
The following example generates a query report that calculates the average number of license tokens used in each 1-hour time bucket.
abaqus licensing reporttool -log today.log -logtype dsls -type query -accessor quantity -aggregator average -duration 1hour Bucket | Average -------------------- | ------- 2012-Sep-19 12:37:53 | 25 2012-Sep-19 13:37:53 | 19 2012-Sep-19 14:37:53 | 8 2012-Sep-19 15:37:53 | 18 2012-Sep-19 16:37:53 | 13 2012-Sep-19 17:37:53 | 34
The example below adds to the query report to calculate the total number of checkouts, the average checkout quantity, and the maximum checkout quantity for all sessions in today.log, grouped into 1-hour buckets.
abaqus licensing reporttool -log today.log -logtype dsls -type query -accessor quantity,quantity,quantity -aggregator count,average,max -duration 1hour Bucket | Number of items | Average | Maximum -------------------- | --------------- | ------- | ------- 2012-Sep-19 12:37:53 | 108 | 25 | 80 2012-Sep-19 13:37:53 | 98 | 19 | 80 2012-Sep-19 14:37:53 | 46 | 8 | 66 2012-Sep-19 15:37:53 | 114 | 18 | 50 2012-Sep-19 16:37:53 | 129 | 13 | 50 2012-Sep-19 17:37:53 | 74 | 34 | 66 2012-Sep-20 07:37:53 | 49 | 49 | 66 2012-Sep-20 08:37:53 | 11 | 52 | 66 2012-Sep-20 09:37:53 | 2 | 50 | 50
The example below adds one more column to the query report to show the maximum duration of the sessions in each bucket.
abaqus licensing reporttool -log today.log -logtype dsls -type query -accessor quantity,quantity,quantity,duration -aggregator count,average,max,max -duration 1hour Bucket | Number of items | Average | Maximum | Maximum -------------------- | --------------- | ------- | ------- | ------- 2012-Sep-19 12:37:53 | 108 | 25 | 80 | 1497 2012-Sep-19 13:37:53 | 98 | 19 | 80 | 1220 2012-Sep-19 14:37:53 | 46 | 8 | 66 | 77 2012-Sep-19 15:37:53 | 114 | 18 | 50 | 482 2012-Sep-19 16:37:53 | 129 | 13 | 50 | 449 2012-Sep-19 17:37:53 | 74 | 34 | 66 | 3552 2012-Sep-20 07:37:53 | 49 | 49 | 66 | 3272