Job Management Partner 1/Asset Information Manager Planning and Setup Guide
This subsection gives the function, format, options, return value, notes about command execution, and an execution example of jamTakeOperationLog.bat, which outputs all operation log entries using a search pattern. It also explains how to register tasks in Windows Task Scheduler and execute jamTakeOperationLog.bat on a regular basis.
Note that jamTakeOperationLog.bat is stored in the following folder:
asset-information-manager-installation-folder\exe
jamTakeOperationLog.bat outputs all applicable entries of operation logs to a CSV file using the search pattern registered by the Operation Log List job menu. For details about the provided default search pattern, see 2.7.1(2)(a) Search patterns provided as default patterns in the manual Administrator's Guide. For details about how to register or update search patterns, see 2.7.1(2)(b) Registering or updating a search pattern in the manual Administrator's Guide.
You can also register jamTakeOperationLog.bat in Windows Task Scheduler and execute it on a regular basis. For the settings required for registering jamTakeOperationLog.bat in Task Scheduler, see (7) Settings for executing jamTakeOperationLog.bat on a regular basis.
jamTakeOperationLog.bat -p "search-pattern-name" -f output-file-name -s collection-start-date [-e collection-end-date] [-x extended-output-item]
Returns one of the following return values:
Return value | Description |
---|---|
0 | Normal termination. |
2 | Invalid parameter. |
3 | The specified search pattern was not found. |
4 | JP1/Software Distribution connection error occurred. |
6 | JP1/Software Distribution connection error occurred. |
7 | Invalid environment. |
8 | DLL loading error occurred. |
9 | Error occurred in the operation log output facility. |
10 | Error occurred during registry information collection. |
11 | Error occurred during jamscript.exe execution. |
If the return value is between 4 and 9 inclusive, check the content of ASTMESn.LOG. If the return value is between 4 and 6 inclusive, a database connection error occurred. Therefore, check the content of ASTCIMn.LOG as well.
A user with administrator permissions must execute jamTakeOperationLog.bat.
In the following execution example, operation logs that match the search pattern Files copied to external media and the corresponding Group name and User name are output for the period beginning three months prior to the execution date and ending on the day before the execution date. For example, when the task is executed on October 1, 2006, operation logs for the period between July 1, 2006 and September 30, 2006 are output.
jamTakeOperationLog.bat -p "copy detected" -f c:\temp\operationlog.csv -s M3 -e D1 -x GU
The period in which to collect operation logs can also be specified using one of the formats listed below besides -s M3 -e D1.
To execute jamTakeOperationLog.bat on a regular basis, you need to register the tasks that execute jamTakeOperationLog.bat in Windows Task Scheduler. To enable the command prompt to directly interpret the execution form of jamTakeOperationLog.bat, when registering the task, you need to specify the following in Run on the Task tab in the Properties dialog box:
%COMSPEC% /D /S /C "jamTakeOperationLog.bat-execute-form"
jamTakeOperationLog.bat-execute-form is the same as that described in (2). Be sure to enclose the specification in double quotation marks (").
After registration, %COMSPEC% is replaced with the CMD.EXE execution path.
All Rights Reserved. Copyright (C) 2009, 2011, Hitachi, Ltd.