Skip to main content

Command Execution Mode

HCP tools provide the following two command execution modes for clients.

  • Single running mode
  • Multiple running mode

Multiple running mode is set by adding “--multi-run” option. When not added, it starts in the single running mode. Multiple running mode is useful when multiple users share the same working directories together simultaneously or running in the background is needed.

How to ececute in respective mode and precautions are below.

Single Running Mode#

This mode is for a single user operating commands sequentially in specific working directories. The command end status is acquired as the same way as the normal commands.

--Example:(Linux)[user@localhost ~]$ hcp src.txt dest.txt...[user@localhost ~]$ echo $?0(Windows)C:\Users\user> hcp src.txt dest.txt...C:\Users\user> echo %ERRORLEVEL%0--

When command execution records are not output as standard with the --hcp-out option, they are recorded with the following names in the current directory which is truncated each time they are executed.

.hcp.out (Linux)_hcp.out (Windows)

The application path is output as standard by default like below. With -l option and the specified file path, it is output in the file specified by the path.

2019/11/01 13:33:35 00007fae521a3b80:INFO :Set bandwidth outbound to unlimited since the specified value is over 5Gbps (given limit : 10000000000 bps).2019/11/01 13:33:35 00007fae521a3b80:INFO :Set bandwidth inbound to unlimited since the specified value is over 5Gbps (given limit : 10000000000 bps).2019/11/01 13:33:38 00007fae4aa4a700:INFO :A transport timeout monitor was setup (sock=5, _recv). Monitoring the timeout ...2019/11/01 13:33:38 00007fae4aa4a700:INFO :A transport timeout monitor becomes disabled (sock=5, ret=0, errno=0, _recv).

The statistics records (the application statistics and the transport statistics) are recorded with the following names in the current directory, when their destinations are not specified. These records are not truncated.

.hcp.statistics.application (Linux).hcp.statistics.transport.tcp (Linux).hcp.statistics.transport.hpfp (Linux)_hcp.statistics.application (Windows)_hcp.statistics.transport.tcp (Windows)_hcp.statistics.transport.hpfp (Windows)

With -L option, the statistics records can be output in the specified directory with the specified prefix.

--Example:[root@localhost ~]# hcp -L /var/tmp/.hcp.statistics2 ...// output directory : /var/tmp// file name prefix : .hcp.statistics2--

Multiple Running Mode#

This mode is used, when a user share the same working directories simultaneously with other users or a single user operate plural commands simultaneously using the background. The command end status is acquired by the same way as the single running mode or by referring to the EXIT parameter recorded in the result output.

--Example:[user@localhost ~]$ hcp --multi-run=/var/tmp ...2019/11/01 14:02:06 00007f35da531b80:INFO :A configuration file (/home/user/.hcp/hcp.conf) was not found. So it was skipped.2019/11/01 14:02:06 00007f35da531b80:     :Recording on multi-running is configured (ID=hcp.mr.20191101_140206_442.15279, dir=/var/tmp, out=ATR).2019/11/01 14:02:06 00007f35da531b80:INFO :Set bandwidth outbound to unlimited since the specified value is over 5Gbps (given limit : 10000000000 bps).2019/11/01 14:02:06 00007f35da531b80:INFO :Set bandwidth inbound to unlimited since the specified value is over 5Gbps (given limit : 10000000000 bps).Login as:userPassword:2019/11/01 14:02:09 00007f35d2dd8700:INFO :A transport timeout monitor was setup (sock=5, _recv). Monitoring the timeout ...2019/11/01 14:02:09 00007f35d2dd8700:INFO :A transport timeout monitor becomes disabled (sock=5, ret=0, errno=0, _recv).
[user@localhost ~]$ hcp -l hcp.log --multi-run=/var/tmp ...2019/11/01 14:04:23 00007fb04eac3b80:INFO :A configuration file (/home/user/.hcp/hcp.conf) was not found. So it was skipped.2019/11/01 14:04:23 00007fb04eac3b80:     :Logging on multi-running is configured (ID=hcp.mr.20191101_140423_458.15318, dir=/var/tmp, path=/var/tmp/hcp.mr.20191101_140423_458.15318.log).Login as:userPassword:[user@localhost ~]$ less /var/tmp/hcp.mr.20191101_140423_458.15318.log2019/11/01 14:04:23 00007fb04eac3b80:     :Recording on multi-running is configured (ID=hcp.mr.20191101_140423_458.15318, dir=/var/tmp, out=ATR).2019/11/01 14:04:23 00007fb04eac3b80:INFO :Set bandwidth outbound to unlimited since the specified value is over 5Gbps (given limit : 10000000000 bps).2019/11/01 14:04:23 00007fb04eac3b80:INFO :Set bandwidth inbound to unlimited since the specified value is over 5Gbps (given limit : 10000000000 bps).2019/11/01 14:04:26 00007fb04736a700:INFO :A transport timeout monitor was setup (sock=6, _recv). Monitoring the timeout ...
[user@localhost ~]$ cat /var/tmp/hcp.mr.20191101_140423_458.15318.out | grep -e EXITEXIT 0 REASON 0000--

In this mode, the following lock file is created in the directory specified by the --multi-run option on starting to execute the command.

hcp.mr.<YYYYMMDD_hhmmss_msec>.<pid>.lock

The following records are saved with the file name adding the strings to the prefix (the strings before “.lock”) of this lock file each time the command is executed.

  • Application statistics
  • Transport statistics
  • Result output
  • Application log

In this mode, these records are not provided, if exiting with the following error statuses. The exit status can be confirmed by the command line operation, as in Single running mode.

  • EXIT_ERROR_LOAD_ARG (181)
  • EXIT_ERROR_LOAD_CONF (182)
  • EXIT_ERROR_CLI_SETUP_FAILED (189)

When the back ground mode is used, if exiting with the status shown above, confirming the exit status is difficult. Make sure to save the configuration data in advance.

When the command execution record is output to a file according to the --multi-run option, it is recorded with the following file name.

hcp.mr.<YYYYMMDD_hhmmss_msec>.<pid>.out

When the command --hcp-out option is applied, the command execution record is not stored in the file but output as standard.

When the application log is output to a file according to the --multi-run option, it is recorded with the following file name.

hcp.mr.<YYYYMMDD_hhmmss_msec>.<pid>.log

When the statistics records (application statistics, transport statistics) are output to files according to the --multi-run option, they are recorded with the following file names.

hcp.mr.<YYYYMMDD_hhmmss_msec>.<pid>.statistics.applicationhcp.mr.<YYYYMMDD_hhmmss_msec>.<pid>.statistics.transport.tcphcp.mr.<YYYYMMDD_hhmmss_msec>.<pid>.statistics.transport.hpfp