Hitachi

JP1 Version 12 JP1/IT Desktop Management 2 Distribution Function Administration Guide


14.4 dcmcoll.exe (collecting files)

This section describes the dcmcoll command, which collects files.

You can check the result of a job executed by this command in the Job Status window of the managing server.

Function

This command creates and executes the following jobs related to remote collection:

This command also unarchives collected archive files.

Format

dcmcoll.exe [processing-key] [/G] [/Z] [/s]
            /i parameter-file-1 [parameter-file-2]
            [/o output- file-name]

Arguments

Correspondence between the specification contents of parameter file and command arguments

The contents of the parameter file for this command can also be specified in command arguments. The following table shows the specification contents of the parameter file and the command arguments corresponding to them.

Table 14‒4: Correspondence between parameter file contents and command arguments (dcmcoll command)

Specification content of parameter file

Content

Whether to specify

Command argument

Tag

Parameter

JOB_DESTINATION

group

Host group name

Y#1

/g value

host_name

Host name

Y#1

/h value

JOB_DESTINATION_ID

destination_id

ID name

Y#1

/X value

FILE_COLLECTION

source_path

Name of file to be collected

Y#2

/y value

dmz_path

Storage folder for collected file (for collection) or file/folder to be unarchived (for restoration)

Y#3

/z value

unarc_path

Storage folder for unarchived file

Y#4

/r value

JOB_ATTRIBUTE

job_generator

Job name

Y/N#5

/j value

jobno

Job number

N

--

job_folder

Path name of job storage folder

Y/N

/l value

unsuspended

Whether to distribute during suspension

N

--

JOB_SCHEDULE

job_entry_date

Job registration date and time

Y/N#6

/jst value

job_execution_date

Job execution date and time

Y/N#6

/jsx value

job_expiration_date

Job expiration date

Y/N#6

/jsp value

SCHEDULE

expiration_date

Expiration date of package storage on relay computer

N

--

expiration_days

The relay computer holds relayed packages for

N

--

installation_date_and_time

Installation date and time

N

--

installation_timing

Installation (collection) timing

Y/N

/tS or /tN

OPTION

compress

Whether to compress

Y/N

/uY or /uN

restore

Whether to restore at upgrade

N

--

reboot

Computer restart after installation

N

--

processing_dialog

Whether to display processing message during installation

N

--

USER_PROGRAM_INSTALLATION_CONDITIONS

external_program_executed_before_installation

External program to be started before installation (collection)

Y/N

/b value

external_program_executed_after_installation

External program to be started after installation (collection)

Y/N

/a value

external_program_error_handler

External program to be started at installation (collection) error

Y/N#7

/e value

external_program_handler

External program to be started

N

--

exit

How to report the processing result of external program

N

--

action

Action to take when processing result is error

N

--

wait

Monitoring method

N

--

timeout

Monitoring time

N

--

wait_code

Monitoring code

N

--

Legend:

Y: The parameter must be specified.

Y/N: The parameter can be omitted.

N: The parameter is not necessary (is ignored even when specified).

--: The content cannot be specified by using a command argument.

#1

You cannot specify the JOB_DESTINATION tag together with the JOB_DESTINATION_ID tag. Also, you cannot specify /g and /h together with /X. You must specify only either JOB_DESTINATION or JOB_DESTINATION_ID or either /g and /h or /X.

When the processing key is NETM_COLTOM or NETM_COLRESET, only the ID group registered as an ID-management relay computer can be specified as the job destination.

When the processing key is NETM_UNARC, this parameter is ignored even if specified.

#2

When the processing key is NETM_COLLECT or NETM_COLTOS, you must specify this parameter.

#3

When the processing key is NETM_COLLECT, NETM_COLTOS, or NETM_UNARC, you must specify this parameter.

#4

When the processing key is NETM_UNARC, you must specify this parameter.

#5

When the job_generator parameter (or the argument /j) is omitted, processing key and job execution date and time is automatically set as the job name. Therefore, if multiple commands with the same processing key are executed concurrently, their job names might be duplicated, and their jobs might not be executed correctly. We recommend that, when executing multiple commands with the same processing key concurrently, you specify different job names for the commands by using job_generator (or /j).

#6

When the processing key is NETM_UNARC, this parameter is ignored even if specified.

#7

You cannot specify this parameter when you collect files from UNIX computers.

Command formats without using any parameter file

The following shows the command formats to be used when you specify only command arguments without using a parameter file.

To collect files from managed computers:
dcmcoll.exe {[NETM_COLLECT]|NETM_COLTOS} [/s]
            {[/g host-group- name] [/h host-name]|/X ID-name}
            /y name-of-file-to-be-collected /z path-name-of-storage-folder-for-the-files-to-be-collected
            [/j job-name] [/l path-name-of-job-storage-folder]
            [/jst job-registration-date-and-time] [/jsx job-execution-date-and-time]
            [/jsp job-expiration-date]
            [{/tS|/tN}] [ {/uY|/uN}]
            [/b external-program-to-be-started-before-file-collection]
            [/a external-program-to-be-started-after-file-collection]
            [/e external-program-to-be-started-at-file-collection-error]
            /o output-file-name
To collect or delete files collected on a relay system or management relay server:
dcmcoll.exe {NETM_COLTOM|NETM_COLRESET} [/s]
            {[/g host-group- name] [/h host-name]|/X ID-name}
            [/j job-name] [/l path-name-of-job-storage-folder]
            [/jst job-registration-date-and-time] [/jsx job-execution-date-and-time]
            [/jsp job-expiration-date]
            /o output-file-name
To unarchive files:
dcmcoll.exe NETM_UNARC [/G] [/Z]
            /z file-or-folder-to-be-unarchived
            /r storage-folder-for-unarchived-file

Return codes

The following table lists the return codes that are output when the dcmcoll command is executed:

Code

Meaning

Action to be taken

0

The managing server started the job, or restoration of archive file ended normally.

None

1

The parameter file cannot be opened, or the file format is incorrect.

Check the specification of the parameter file or its description format.

2

An invalid value was specified in a command argument or the parameter file.

Check the values specified in command arguments and the parameter file.

3

Connection to the database failed.

Check database settings in the setup of the managing server.

4

The output file cannot be opened.

Check the specification of the output file.

5

Connection to the JP1/IT Desktop Management 2 service failed.

Check whether the service of JP1/IT Desktop Management 2 - Manager has started.

7

Restoration of one or more archive files failed.

Check the path name of each archive file.

The full path name of the archive file might exceed 259 single-byte characters. (The full path name consists of the name of the storage directory for unarchived file, name of file creation directory (name of the storage directory for archive file), and name of unarchived file or directory.)

12

Other error occurred.

Reference the event log.

Notes

Example

The following example shows use of this command to collect files from the directories SDerror.dir, SDerror2.dir, and SDerror3.dir under the directory C:\temp on the hosts dmp491 and dmp492 on which JP1/IT Desktop Management 2 - Agent (agent) is running. The parameter file defines operations to start collection when the managed computer starts, and to activate an external program before and after collection, and if a collection error occurs.

Creating the parameter file

Specify the hosts and the attributes of the files to be collected as shown below, and then save the parameter file under any name.

** dcmcoll Parameter File Sample
 
JOB_DESTINATION{
host_name=dmp492.soft.hitachi.co.jp
host_name=dmp491
group = \grp\gname1
group = \grp\gname2;\grp\gname3
}
SCHEDULE{
installation_timing = S
}
OPTION{
compress=Y
}
USER_PROGRAM_INSTALLATION_CONDITIONS{
external_program_executed_before_installation = "C:\test B.exe"
external_program_executed_after_installation = C:\testA.exe -x "a aa"
external_program_error_handler = "C:\test E.exe"
}
FILE_COLLECTION{
source_path= C:\temp\SDerror.dir
source_path= C:\temp\SDerror2.dir;C:\temp\SDerror3.dir
dmz_path= C:\temp\collection
}
Executing the command

To store the created parameter file as C:\Dmbat\dcmcoll.txt and acquire the output file as C:\Dmbat\out.txt, specify the command as follows:

dcmcoll.exe /i C:\Dmbat\dcmcoll.txt /o C:\Dmbat\out.txt /j tempcollection
Checking the output file

When the command ends normally, the job name, job number, and path name of job storage folder are output to the file C:\Dmbat\out.txt as follows:

JOB_ATTRIBUTE{
job_generator= NETM_COLLECT_03_12_11_13_34_36
jobno= JB03121113315383
job_folder= \
}