mngsvrutil (Management Server management command)
- Organization of this page
Format
mngsvrutil [-m host-name [:port-number] [-u management-user-id] [-p management-user-password] [[-o file-name] [-h] [-t target-name] [-k target-type] [-s] [-i monitoring-time-interval] [-l maximum-monitoring-time] [-w operation-check-timeout] subcommand arguments]]
Function
This command connects to Management Server to execute the operations in management domain.
This command can be used for the following functions:
-
Collection of management domain configuration information
Collects and displays the management domain name and a list of all logical servers comprising the management domain.
-
Collection of logical server status information
Adds status information (active or inactive) to the list of logical servers comprising the management domain.
-
Collection of information on J2EE applications deployed in the logical servers
Collects and displays a list of J2EE applications.
-
Collection of logical server performance information and setting of statistical information
Collects performance information about logical servers (JavaVM, transactions, HTTP servers, HTTP server connectors, etc.). Also sets the statistical information sampling time.
-
Starting or stopping a logical server
Starts or stops a logical server.
-
Re-loading the logical server configuration file
Re-loads the configuration file used by a logical server without restarting the logical server. The configuration file of the connected host can also be reloaded on the logical J2EE server.
-
Adding or deleting a logical server
Adds or deletes a logical server
-
Management of logical server applications
Starts or stops J2EE applications and J2EE resources, and displays them in a list.
For application management operations, see 12. Managing the Logical Server Applications in the uCosminexus Application Server Management Portal User Guide.
-
Collection of a performance analysis trace
Collects a performance analysis trace from a logical performance tracer.
-
Locking or unlocking CTM queues
Locks and unlocks the schedule queues of CTM.
-
Collection of CTM statistics
Collects the statistics from CTM.
-
Dynamic change of the number of concurrently executable threads
Changes dynamically the number of Web applications that can be executed concurrently.
Arguments
- -m host-name [:port-number]
-
Specifies the host name and port number of Management Server.
-
host-name
For establishing communication with the Administration Agent, specifies either its IP address in dot notation (xxx.xxx.xxx.xxx) or a host name that can be resolved. Specify each xxx as an integer in the range 0 to 255.
-
port-number
Specifies the port number which is set for Management Server. The default value is 28080.
-
- -u management-user-id
-
Specifies the management user ID that is set with the mngsvrctl setup command.
When the functionality for omitting the admin user account is enabled and if you specify the admin user ID, the functionality will be disabled. For the functionality for omitting the admin user account, see 4.1.15(3) Settings when the management user account is not set in the uCosminexus Application Server System Setup and Operation Guide.
- -p management-user-password
-
Specifies the management user password corresponding to the management user ID set with the mngsvrctl setup command.
When no password has been set, the -p option can be omitted.
When the functionality for omitting the admin user account is enabled and if you specify the admin user ID, the functionality will be disabled. For the functionality for omitting the admin user account, see 4.1.15(3) Settings when the management user account is not set in the uCosminexus Application Server System Setup and Operation Guide.
- -o file-name
-
Specifies the name of the output destination file. The specified file will be overwritten. The file name that can be specified depends on the OS under which the command is executed. If this option is omitted, the command execution results are output to the standard output.
- -h
-
Specifies that no header is to be output.
- -f output-format
-
Specifies the output format provided with Management Server to be connected. Management Server provides the following output format.
-
csv: CSV format (default value)
-
- -t target-name
-
Specifies the name of the target (logical server or host) to which the subcommand is to be applied.
- -k target-type
-
Specifies the type of target to which the subcommand is to be applied:
-
logicalServer: Logical server
-
host: Host
If this option is omitted or if a value other than those listed above is specified, logicalServer is assumed.
-
- -s
-
Specifies to wait for completion of startup or stop of logical servers or J2EE applications.
This option is valid when start or stop is specified as the subcommand.
When this option is specified, the subcommand can be retried in order to recover from an error if an error occurs during startup or stop.
- -i monitoring-time-interval
-
Specifies the interval (in seconds) at which monitoring for completion of startup or stop processing for logical servers or J2EE applications is to be performed, as an integer in the range 0 to 2147483647 (seconds). The default value is 3 seconds.
Note that this option also sets the interval for retrying the subcommand after an error has occurred during startup or stop processing.
- -l maximum-monitoring-time
-
Specifies the maximum amount of time (in seconds) monitoring for completion of logical server or J2EE application startup or stop processing is to be performed, as an integer in the range 0 to 2147483647 (seconds).
If the logical servers or J2EE applications do not start or stop within the specified time limit, the command terminates abnormally. If 0 is set, no limit is placed on the amount of time for which the command can wait. The default value is 60 seconds.
- -w operation-check-timeout
-
Specifies an integer in the range from 0 to 2147483 as the maximum amount of time (in seconds) for which the command can wait before the command can check whether the Management Server and Administration Agent are operating.
If the command does not receive a response within the specified wait time, the command terminates abnormally.
If you specify 0, the command can wait indefinitely. A value smaller than 0 is treated as 0, and a value larger than 2147483 is treated as 2147483. The default is 0.
This option is valid only if the check subcommand is specified.
- subcommand arguments
-
Specifies a subcommand and arguments. The values that can be specified for the subcommand and arguments depend on Management Server version.
You use the arguments to specify the logical servers or hosts that are to be the targets of the subcommand.
The following subcommands can be specified:
For details on the subcommands, see 7.3 Details of subcommands of the mngsvrutil command.
Return values
- 0:
-
The command is terminated normally.
- 1:
-
An execution error is occurred.
- 2:
-
A syntax error is occurred.
Output format
- CSV format
-
Names and values are output delimited by a comma (,).
You can specify the -h option to suppress output of the header.
Configuration file
- Client-side definition file (.mngsvrutilrc)
-
You can set the default values for the mngsvrutil command options.
For details, see 8.2.14 .mngsvrutilrc (Client-side definition file of the mngsvrutil command) in the uCosminexus Application Server Definition Reference Guide.
The table below shows the values that become valid depending on the combination of the mngsvrutil.target_kind, mngsvrutil.target_name, and mngsvrutil.target_server_name properties, which are parameters of the mngsvrutilrc command, and the -k and -t options.
No.
target_kind
target_name
target_server_name
-k
-t
Specified value interpretation
1
logicalServer/--
--
--
logicalServer/--
--
No server name is specified.
2
logicalServer/--
A
B/--
logicalServer/--
--
Server whose name is A is specified.
3
logicalServer/--
--
B
logicalServer/--
--
Server whose name is B is specified.
4
logicalServer/--
A/--
B/--
logicalServer/--
C
Server whose name is C is specified.
5
host
--
--
--
--
No host name is specified.
6
host/--
--
--
Host
--
No host name is specified.
7
host
--
B
--
--
No host name is specified.
8
host/--
--
B
Host
--
No host name is specified.
9
host
A
B/--
--
--
Host whose name is A is specified.
10
host/--
A/--
B/--
Host
C
Host whose name is C is specified.
- Client-side common definition file (mngsvrutilcl.properties)
-
You can set the common default values for the mngsvrutil command options.
For details, see 8.2.16 mngsvrutilcl.properties (Client-side shared definition file of the mngsvrutil command) in the uCosminexus Application Server Definition Reference Guide.
- Server-side definition file (mngsvrutil.properties)
-
You can modify the execution environment for the mngsvrutil command.
For details, see 8.2.15 mngsvrutil.properties (Server-side definition file of the mngsvrutil command) in the uCosminexus Application Server Definition Reference Guide.
Input/output examples
-
Input example 1
Collect a list of logical servers within the management domain together with their status information:
$ mngsvrutil -m 123.45.67.89:28880 -u admin1 -p pw1 list status
-
Output example 1
logicalServerName,status,type,startingOrder,parent smplSvrName1,working,NamingService,10,- smplSvrName2,starting,SFOServer,15,- smplSvrName3,stopped,J2EEServer,20,J2EEServerCluster1 smplSvrName4,starting,J2EEServer,30,J2EEServerCluster1 smplSvrName5,stopping,WebServer,40,WebServerCluster1 smplSvrName6,abnormal ended,J2EEServer,50,- smplSvrName7,recovering,J2EEServer,60,- smplSvrName8,communication error,J2EEServer,70,J2EEServerCluster2 ... ...
-
Input example 2
Acquire a management domain name:
$ mngsvrutil -m localhost -u admin1 -p pw1 get domainName
-
Output example 2
smplDomainName
-
Input example 3
Collect information about J2EE applications: $ mngsvrutil -m 123.45.67.89 -u admin2 -t myServer get j2eeApps
-
Output example 3
index,fullyQualifiedName,name,deployedTime 1,serverName1:smplApp1,smplApp1,1234567890 2,serverName2:smplApp2,smplApp2,9876543210 ... ... 7,serverName7:smplApp7_TEST,smplApp7,7656543210
-
Input example 4
Collect information about the home interface of Stateless Session Bean:
$ mngsvrutil -m 123.45.67.89 -u admin2 -t myServer get statelessBeanHome
-
Output example 4
index,fullyQualifiedName,name,responseMaxTime,responseMinTime,responseAveTime,statisticsStartedTime,samplingTime 1,smpQfn1,smplBeanName1,300,100,123.45,67339847,600 2,smpQfn2,smplBeanName2,17,52,34.251,122343838,10 ... ...
-
Input example 5
Lock the schedule queues for all J2EE applications within a host:
$ mngsvrutil -m 123.45.67.89 -u admin2 -t hostA -k host hold queues in:-1
-
Input example 6
Release the schedule queues for all J2EE applications within a host:
$ mngsvrutil -m 123.45.67.89 -u admin2 -t hostA -k host release queues
-
Input example 7
Collect in a batch the performance analysis traces collected by all performance tracers within the management domain:
$ mngsvrutil -m 123.45.67.89 -u admin2 collect allPrfTraces
Settings for SNMP integration (In UNIX)
To specify settings for SNMP integration in UNIX:
-
Install JP1/Cm2/ESA
-
Create and edit the ~root/.mngsvrutilrc file
-
Copy the /opt/Cosminexus/manager/config/templates/.mngsvrutilrc file to ~root.
# cp /opt/Cosminexus/manager/config/templates/.mngsvrutilrc ~root/
-
Change the file permission of the ~root/.mngsvrutilrc file to 600.
# chmod 600 ~root/.mngsvrutilrc
-
Edit the ~root/.mngsvrutilrc file.
Use an appropriate editor to setup the following items.
For details on each item, see 8.2.14 .mngsvrutilrc (Client-side definition file of the mngsvrutil command) in the uCosminexus Application Server Definition Reference Guide.
mngsvrutil.connect.host
mngsvrutil.connect.userid
mngsvrutil.connect.password
mngsvrutil.output.format=snmp
mngsvrutil.target_name
mngsvrutil.target_kind
-
-
Setting up the JP1/Cm2/ESA environment
Use the extended MIB object definition file for Cosminexus (/opt/Cosminexus/manager/config/hitachi-cosmiMng-MIB#1, #2) to reconfigure the SNMP sub-agent. For reconfiguring the SNMP sub-agent, see the manual JP1/Cm2/Extensible SNMP Agent.
#1 In reality, _V-R (version) is added after hitachi-cosmiMng-MIB (Example: hitachi-cosmiMng-MIB_2-0).
#2 To use the extended MIB object definition file, use hitachi-cosmiMng-MIB_V-R_forESA.
Use the latest version of the extended MIB object definition file.
Notes
-
Specify the options and subcommands as described below.
-
Specify subcommand options and arguments at the very end of the line.
-
If the same option is specified more than once, the last one specified is valid.
-
If an invalid option is specified for a particular operation (for example, specifying the -h option for the set subcommand), that option is ignored.
-
If an option specification is omitted, the default value specified in the client-side definition file (.mngsvrutilrc) becomes valid if one has been specified.
-
If all options are omitted, the command's usage (simple usage) is displayed. If all arguments except for the -m, -u, and -p options are omitted, the detailed usage is displayed.
-
-
If the value acquired by the list or get subcommand is invalid (a statistical value when statistical information has not been collected, for example), the value -1 is displayed as 0.
-
Information collected by a subcommand is displayed in the standard output.
-
Usage and error information is output to the standard error output.
-
If you use the start and stop subcommands to start and then immediately stop, or stop and then immediately start, the same logical server, specify the -s option in the preceding subcommand. This option allows the following subcommand to start after completion of the preceding subcommand.
-
If the list subcommand is specified, the status existing when the subcommand is invoked is reflected in the information that the command returns, regardless of the execution states of other subcommands (such as start and stop). Therefore, the command might return the status working before the processing of the start subcommand is completed or the status stopped before the processing of the stop subcommand is completed.