icegridadmin Command Line Tool
12 min read
12 min read
12 min read
12 min read
12 min read
12 min read
12 min read
12 min read
12 min read
The icegridadmin utility is a command-line tool for administering an IceGrid domain. Deploying an application with this utility requires an XML file that defines the descriptors.
Usage
The IceGrid administration tool supports the following command-line options:
Usage: icegridadmin [options]Options:-h, --help Show this message.-v, --version Display the Ice version.-e COMMANDS Execute COMMANDS.-d, --debug Print debug messages.-s, --server Start icegridadmin as a server (to parse XML files).-i, --instanceName Connect to the registry with the given instance name.-H, --host Connect to the registry at the given host.-P, --port Connect to the registry running on the given port.-u, --username Login with the given username.-p, --password Login with the given password.-S, --ssl Authenticate through SSL.-r, --replica NAME Connect to the replica NAME.The -e option causes the tool to execute the given commands and then exit without entering an interactive mode. The -s option starts icegridadmin in a server mode that supports the IceGrid::FileParser interface; a proxy for the object is printed to standard output. If neither -e nor -s is specified, the tool enters an interactive mode in which you issue commands at a prompt.
To communicate with the IceGrid registry, icegridadmin establishes an administrative session. The tool uses SSL authentication if you specify the -S option or define its equivalent property IceGridAdmin.AuthenticateUsingSSL. Otherwise, icegridadmin uses password authentication and prompts you for the username and password if you do not specify them via command-line options or properties. If you want icegridadmin to establish its session using a Glacier2 router, define Ice.Default.Router appropriately.
If specified, the following command-line options override their property equivalents:
| Option | Property |
|---|---|
-i, --instanceName | IceGridAdmin.InstanceName |
-H, --host | IceGridAdmin.Host |
-P, --port | IceGridAdmin.Port |
-u, --username | IceGridAdmin.Username |
-p, --password | IceGridAdmin.Password |
-S, --ssl | IceGridAdmin.AuthenticateUsingSSL |
-r, --replica | IceGridAdmin.Replica |
icegridadmin determines its target registry as follows:
- Connect via a Glacier2 router if
Ice.Default.Routeris defined. - Otherwise, if
Ice.Default.Locatoris defined, connect to the specified registry. - Otherwise, if a host is defined via the
-Hor--hostoptions or the equivalent property, connect to the registry at the specified host. If no port is defined via the-Por--portoptions or the equivalent property,icegridadminuses the standard IceGrid TCP (4061) or SSL (4062) port. - Otherwise,
icegridadminattempts to locate a registry by issuing a UDP multicast discovery request. If the tool discovers more than one registry, it presents a list and asks you to select one.
Once it has connected to the registry and successfully established a session, icegridadmin displays its command prompt. The help command displays the following usage information:
helpPrint this message.exit,quitExit this program.CATEGORY helpPrint the help section of the givenCATEGORYCOMMAND helpPrint the help of the givenCOMMAND.
The tool's commands are organized by category. The supported command categories are shown below:
applicationnoderegistryserverserviceadapterobjectserver templateservice template
You can obtain more information about each category using the help command:
>>> application helpApplication Commands
application add DESC [TARGET ... ] [NAME=VALUE ... ]Add applications described in the XML descriptor fileDESC. If specified the optional targets are deployed. Variables are defined using theNAME=VALUEsyntax.application remove NAMERemove the application namedNAME.application describe NAMEDescribe the application namedNAME.application diff [-s | --servers] DESC [TARGET ...] [NAME=VALUE ...]Print the differences between the application in the XML descriptor fileDESCand the current deployment. If-sor--serversis specified, print the the list of servers affected by the differences. Variables are defined using theNAME=VALUEsyntax.application update [-n | --no-restart] DESC [TARGET ...] [NAME=VALUE ...]Update the application in the XML descriptor fileDESC. If-nor--no-restartis specified, the update will fail if it would require restarting one or more servers. Variables are defined using theNAME=VALUEsyntax. Use thediff --serverscommand to discover which servers would be affected by an update, including those that would require a restart.application listList all deployed applications.
Node Commands
node listList all registered nodes.node describe NAMEShow information about nodeNAME.node ping NAMEPing nodeNAME.node load NAMEPrint the load of the nodeNAME.node sockets [NAME]Print the number of processor sockets for nodeNAME. IfNAMEis omitted, print the number of processor sockets for each node. (The IceGrid.Node.ProcessorSocketCount property allows you to explicitly set this value for systems where the number of sockets cannot be obtained programmatically.)node show [OPTIONS] NAME [log | stderr | stdout]Print the Ice log messages of the node (withlog), or print the text from the node's standard error or standard output (withstderrorstdout). The supported options are shown below:-f,--followWithlog, create a remote logger that prints each new log message. Withstderrorstdout, wait for new text to be available in the file wherestderrorstdoutis redirected.-t,--tail NPrint the lastNlog messages (forlog) or N lines of text (forstderrorstdout)-h,--head NPrint the firstNlines of text (invalid option withlog).
node shutdown NAMEShutdown nodeNAME.
Registry Commands
registry listList all registered registries.registry describe NAMEShow information about registryNAME.registry ping NAMEPing registryNAME.registry show [OPTIONS] NAME [log | stderr | stdout]Print the Ice log messages of the registry (withlog), or print the text from the registry's standard error or standard output (withstderrorstdout). The supported options are shown below:-f,--followWithlog, create a remote logger that prints each new log message. Withstderrorstdout, wait for new text to be available in the file wherestderrorstdoutis redirected.-t,--tail NPrint the lastNlog messages (forlog) or N lines of text (forstderrorstdout)-h,--head NPrint the firstNlines of text (invalid option withlog).
registry shutdown NAMEShutdown registryNAME.
Server Commands
server listList all registered servers.server remove IDRemove serverID.server describe IDDescribe serverID.server properties IDGet the run-time properties of serverID.server property ID NAMEGet the run-time propertyNAMEof serverID.server status IDGet the status of serverID.server pid IDGet the process ID of serverID.server start IDStart serverID.server stop IDStop serverID.server signal ID SIGNALSendSIGNAL(such asSIGTERMor15) to serverID.server stdout ID MESSAGEWriteMESSAGEon serverID's standard output.server stderr ID MESSAGEWriteMESSAGEon serverID's standard error.server show [OPTIONS] ID [log | stderr | stdout | LOGFILE]Print the Ice log messages of the server (withlog), or print the text from the server's standard error, standard output or the log file LOGFILE (withstderr,stdoutorLOGFILE). The supported options are shown below:-f,--followWithlog, create a remote logger that prints each new log message. Withstderr,stdoutandLOGFILE,wait for new text to be available in the file.-t,--tail NPrint the lastNlog messages (forlog) or N lines of text (forstderr,stdoutorLOGFILE)-h,--head NPrint the firstNlines of text (invalid option withlog).
server enable IDEnable serverID.server disable IDDisable serverID. A disabled server cannot be started on demand.
Service Commands
service start ID NAMEStarts serviceNAMEin IceBox serverID.service stop ID NAMEStops serviceNAMEin IceBox serverID.service describe ID NAMEDescribes serviceNAMEin IceBox serverID.service properties ID NAMEGet the run-time properties of serviceNAMEfrom IceBox serverID.service property ID NAME PROPERTYGet the run-time propertyPROPERTYof serviceNAMEfrom IceBox serverID.service list IDList the services in IceBox serverID.
Adapter Commands
adapter listList all registered adapters.adapter endpoints IDShow the endpoints of adapter or replica groupID.adapter remove IDRemove adapter or replica groupID.
Object Commands
The object command operates on well-known objects.
object add PROXY [TYPE]Add a well-known object to the registry, optionally specifying its type.object remove IDENTITYRemove a well-known object from the registry.object find TYPEFind all well-known objects with the typeTYPE.object describe EXPRDescribe all well-known objects whose stringified identities match the expressionEXPR. A trailing wildcard is supported inEXPR, for example "object describe Ice*".object list EXPRList all well-known objects whose stringified identities match the expressionEXPR. A trailing wildcard is supported inEXPR, for example "object list Ice*".
Server Template
server template instantiate APPLICATION NODE TEMPLATE [NAME=VALUE ...]Instantiate the requested server template defined in the given application on a node. Variables are defined using theNAME=VALUEsyntax.server template describe APPLICATION TEMPLATEDescribe a server templateTEMPLATEfrom the given application.
Service Template
service template describe APPLICATION TEMPLATEDescribe a service templateTEMPLATEfrom the given application.