Job Management Partner 1/Software Distribution Administrator's Guide Volume 1

[Contents][Glossary][Index][Back][Next]

6.7.5 Executing the jamOperationLogAddUp (adding up operation logs) command

This subsection describes the jamOperationLogAddUp command, which is used to add up operation logs, in terms of its function, format, options, and return values. Also provided are command execution notes and examples of executing the command.

The command executable file is stored in the following folder:

JP1/Software-Distribution-installation-folder\jp1asset\exe

The jamOperationLogAddUp command can be saved for execution repetitively by registering it as a task in Windows Scheduled Tasks. To register a task, from the task's properties dialog box, add the following content in Run under the Task tab.

-f JP1/Software-Distribution-installation-folder\jp1asset\exe\jamOperationLogAddUp.exe -p "search-pattern" [-s base-point-day-for-totaling-data] [-d number-of-days-for totaling-data] [-k number-of-days-whose-totaled-results-are-to-be-maintained]

Note
If you execute the commands of Asset Information Manager Subset on a 64-bit OS, you must use a 32-bit command prompt. For details about the execution procedure, see 10.11(2) Notes on executing commands and tasks on a 64-bit OS in the manual Setup Guide.
Organization of this subsection
(1) Function
(2) Format
(3) Option
(4) Return value
(5) Command execution notes
(6) Execution example

(1) Function

Adds up operation logs.

(2) Format

jamOperationLogAddUp -p "search-pattern" [-s base-point-day-for-totaling-data] [-d number-of-days-for-totalling-data] [-k number-of-days-whose-totaled-results-are-to-be-maintained]

(3) Option

-p "search-pattern"
Specify a search pattern name as the search condition. You must specify a registered search pattern name; this option must be specified. You can specify more than one search pattern name. To specify multiple search pattern names, delimit them with a space. For example -p "Copy detections" "Files copied to external media" "Files prevented from being copied to external media".
If a double quotation mark is included in a search pattern name, specify the double quotation mark twice in succession. For example, for the search pattern name "Copy as plain text", specify -p """Copy as plain text""".

-s base-point-day-for-totaling-data
Specify in yyyymmdd format (where yyyy is an integer in the range from 2000 to 9999) the base day (base-point day for totaling data) for adding up operation logs. This option can be omitted, in which case the day before the command execution day is assumed as the base-point day for totaling data.

-d number-of-days-for-totalling-data
Specify the period to be counted, in -d Dx format, where x is an integer in the range from 0 to 2,192 indicating the number of days prior to the base-point day. Operation logs for the number of days, equaling x +1 including the operation log on the base-point day, are added to determine the totaled data. This option can be omitted, in which case data is added up beginning with the 6th day prior to the base-point day. If you wish to add up data as of May 1, and the base-point day for totaling data is May 4, you would specify -d D3.

-k number-of-days-whose-totaled-results-are-to-be-maintained
Specify the period whose totaled results are to be saved, in Dy format, where y is an integer in the range from 0 to 2,192 indicating the number of days prior to the base-point day. The count results before the specified date will be deleted. This value must be equal to or greater than the number of days for which data is to be totaled. This option can be omitted, in which case the count results are saved beginning with the 6th day prior to the base-point day. Count results before the specified date are deleted.
If you specify a large value for the number of days for maintaining count results, the size of the Asset Information Manager Subset database will become large. You must be careful when you specify this option.

(4) Return value

The following are the return values that are set:

Return value Description
0 Normal termination
1 Normal termination (no count results)
2 Invalid parameter
3 The search pattern does not exist.
4 An error occurred during connection with JP1/Software Distribution.
5 Invalid environment
6 A DLL load error occurred.
7 An error occurred in the operation log totaling function.
8 An error occurred while registry information was being obtained.
9 An error occurred while jamscript.exe was executing.

(5) Command execution notes

(6) Execution example

Example 1
jamOperationLogAddUp - p "Files copied to external media" -d D2 -k D6
In this example, the day before the day the command is executed is specified as the base-point day for totaling data, and the operation logs until two days before the base-point day for totaling data are added up. Also, past count results prior to 6 days before the base-point day for totaling data are deleted.
For example, when the command is executed on May 10, operation logs for the three days from May 7 through May 9 are added up and the count results prior to May 3 are deleted.
The following figure shows the details of execution example 1.

Figure 6-43 Details of execution example 1

[Figure]

Example 2
jamOperationLogAddUp - p "Files copied to external media" -d D2 -k D3
In this example, the count period overlaps a past count period.
For example, when the command is executed on May 10 for the first count, the operation logs for the three days from May 7 through May 9 are added up. Next, the command is executed on May 12 for the second count, with the operation logs for the three days from May 9 through May 11 being added up. At this time, the count result of May 9 is overwritten. By executing the command for the second time, count results before May 8 are deleted, and the count result of May 7, which was included during the first count, is deleted.
The result of May 8 by the first count and the result from May 9 to May 11 by the second count have been saved as the count results.
The following figure shows the details of execution example 2.

Figure 6-44 Details of execution example 2

[Figure]