Hitachi

JP1 Version 12 JP1/Integrated Management 2 - Manager Command, Definition File and API Reference


jimnodecount

Organization of this page

Function

This command counts the number of nodes managed by JP1/IM - Manager. This command also outputs a file that contains a list of managed nodes.

This command can be executed regardless of whether JP1/IM - Manager is running.

The nodes that this command can count (as nodes managed by JP1/IM - Manager) are JP1/Base on the host defined in the configuration definition information and remotely monitored hosts.

Note that JP1/Base installed on a host that is not defined in the configuration definition information is not counted as a managed node. JP1/Base on such a host must be counted by the user manually.

Format

jimnodecount[ -h logical-host-name | -m]
            [ -o output-file-name]

Execution permission

In Windows: Administrator permissions

In UNIX: Superuser permissions

Storage directory

In Windows:

Manager-path\bin\

In UNIX:

/opt/jp1imm/bin/

Arguments

-h logical-host-name

If JP1/IM - Manager is operating in a cluster system, use this option to specify which type of host (physical or logical) the nodes to be counted by the jimnodecount command are managed by.

If the -h option is specified, the command counts the nodes managed by the specified logical host.

If the -h option is not specified, the command counts the nodes managed by the logical host specified in the JP1_HOSTNAME environment variable. If no logical host name is specified in that environment variable, the command counts the nodes managed by the physical node.

If JP1/IM - Manager is not operating in a cluster system, you do not need to specify this option.

-m

If JP1/IM - Manager is operating in a cluster system, use this option to specify whether the jimnodecount command counts the total number of nodes managed by the physical host and logical host.

If the -m option is specified, the command counts the number of all managed nodes.

If the -m option is not specified, the command counts the number of nodes managed by the logical host specified in the JP1_HOSTNAME environment variable. If no logical host name is specified in that environment variable, the command counts the number of nodes managed by the physical host.

-o output-file-name

This option specifies the managed-node list file to which a list of managed nodes is to be output. If the specified file already exists, the contents of the existing file are overwritten.

The output file name can be specified as a relative path or absolute path. If a relative path is used to specify the output file name, the directory where the jimnodecount command is executed is used as the base of the relative path. If you specify a file whose name begins with a hyphen (-), to distinguish the file name from an option name, use a relative path that begins with the current directory (for example, ./-foo) or an absolute path. Note that the length of the file name you specify must not exceed 250 bytes including the length of the path.

Network paths cannot be specified as the output file name.

Also note that in Windows, the file name you specify must not include the following character strings:

  • Colon (:), question mark (?), double quotation mark ("), left angle bracket (<), right angle bracket (>), and vertical bar(|)

  • A string that completely matches one of the following strings (ignoring case): CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, or LPT9

Output format

When you execute the jimnodecount command, the number of managed nodes is output in the format below.

Note that if an error occurs during execution of the command, the number of managed nodes is not output.

number-of-managed-nodes

Note

In a cluster system configuration in which JP1/IM - Managers on multiple logical hosts manage the same host as a managed node, each logical host is counted as a single host by the jimnodecount -m command. In this case, reduce the number of managed nodes appropriately:

Return values

0

Normal termination

43

The jimnodecount command was executed while the remote configurations were being applied or the jcfimport command was being executed.

84

Argument error

85

Execution permission error

127

Other error

Format of the managed-node list file

The following describes the format of the managed-node list file. The numbers at the beginning of each line (1 to 12) indicate line numbers, which are not output in the actual file.

 1  output-time
 2  The number of managed nodes : number-of-managed-nodes
 3  M  /manager-host-name
 4  B  /manager-host-name/host-name-for-JP1/Base-on-host-defined-in-configuration-definition-information
 5  R  /manager-host-name/name-of-remotely-monitored-host
 6  BR /manager-host-name/host-name-for-JP1/Base-on-remotely-monitored-host-defined-in-configuration-definition-information
 7  B  /manager-host-name/site-manager-host-name
 8  B  /manager-host-name/site-manager-host-name/host-name-for-JP1/Base-on-host-defined-in-configuration-definition-information
 9  R  /manager-host-name/site-manager-host-name/name-of-remotely-monitored-host
10  BR /manager-host-name/site-manager-host-name/host-name-for-JP1/Base-on-remotely-monitored-host-defined-in-configuration-definition-information
11  B  /manager-host-name/relay-manager-host-name
12  B  /manager-host-name/relay-manager-host-name/host-name-for-JP1/Base-on-host-defined-in-configuration-definition-information

Lines 2 to 12 are the managed-node block, which consists of the number of managed nodes on line 2 and the managed-node list on lines 3 to 12.

Description of the elements output to the managed-node list file

output-time

The time that the jimnodecount command was executed and the managed-node list file was output is indicated here.

YYYY/MM/DD hh:mm:ss

(YYYY: year, MM: month, DD: day, hh: hour, mm: minute, ss: second)

Managed-node block

The elements of a managed-node block are as follows:

  • The number of managed nodes : number-of-managed-nodes

    The number of managed nodes counted by the command is indicated here.

  • Managed-node list

    type-of-managed-node/host-name[/host-name...]

    The strings output for type-of-managed-node are described below.

    Type

    Description

    MΔ Δ

    Manager host on which the jimnodecount command was executed

    BΔ Δ

    JP1/Base on a host that is defined in the configuration definition information and is not the Manager host on which the jimnodecount command was executed

    RΔ Δ

    Remotely monitored host

    BΔ

    JP1/Base on a remotely monitored host that is defined in the configuration definition information

    Legend: Δ: A single-byte space

The managed-node block output format differs depending on whether the -m option is specified.

If the -m option is not specified:

Only one managed-node block is output.

The following shows an example of the file output if the -m option is not specified.

Integrated manager

Site manager

Agent

Physical host (kanri)

tokyo

jp1ag1

osaka

rhost1

jp1ag2

2016/04/28 09:00:00
The number of managed nodes : 6
M  /admin
B  /admin/tokyo
B  /admin/tokyo/jp1ag1
B  /admin/osaka
R  /admin/osaka/rhost1
BR /admin/osaka/jp1ag2
If the -m option is specified:

Multiple managed-node blocks are output. The managed-node block for the physical host is output before the managed-node blocks for logical hosts. The managed-node blocks for logical hosts are output in the ascending order of logical host names.

The following shows an example of the file output if the -m option is specified.

Integrated manager

Site manager

Agent

Physical host (admin)

tokyo

jp1ag1

Logical host (adminL1)

osakaA

jp1ag2

osakaB

jp1ag3

Logical host (adminL2)

nagoyaA

jp1ag4

Logical host (adminL3)

nagoyaB

jp1ag5

2016/11/26 09:00:00
The number of managed nodes : 3
M  /admin
B  /admin/tokyo
B  /admin/tokyo/jp1ag1
The number of managed nodes : 5
M  /adminL1
B  /adminL1/osakaA
B  /adminL1/osakaA/jp1ag2
B  /adminL1/osakaB
B  /adminL1/osakaB/jp1ag3
KAVB8201-E-or-KAVB8202-E-message-text#
The number of managed nodes : 3
M  /adminL3
B  /adminL3/nagoyaB
B  /adminL3/nagoyaB/jp1ag5

#: Because the command failed to count the number of nodes managed by logical host adminL2, a message (KAVB8201-E or KAVB8202-E) was output. For details about the message, see the JP1/Integrated Management 2 - Manager Messages.