You can interact with InfoHub from the shell and from within GT.M. To interact with an InfoHub from the shell, the general command is:
$gtm_dist/mumps -run InfoHub --action=<Action> [--<Action_parameters>[=values]...] [--infohub=InfoHubID|InfoHubName] [--gbldir=/path/to/globaldirectory]
<Action> is one of the following: configure, extract, jobexam, purge, restart, rundown, start, status, shutdown, usage, version, or list. The default action is status.
[--<Action_parameters>[=values]...] depends on the selected <Action>.
An InfoHub database can store multiple InfoHubs and there can be multiple databases each holding multiple InfoHubs. You can perform administration operations on only one InfoHub with any given command. The InfoHub command line interface provides the optional --infohub and --gbldir arguments to select an InfoHub. You can provide either or both these arguments to select an InfoHub. Even if these two arguments are not specified, the InfoHub logic tries using the current $zgbldir (initialized from the gtmgbldir environment variable) to select the InfoHub that was last configured for the global directory.
--gbldir is an optional argument that specifies the path of the global directory for the InfoHub database. If the argument specifies a relative path, the InfoHub API automatically converts it to an absolute path. An absolute path is necessary for two reasons. First, InfoHub uses the global directory as a possible means to unambiguously identify an InfoHub when a command does not specifically identify one. Second, because they run in a temporary directory, InfoHub JOB'd processes typically need an absolute path to the global directory.
Use the --gbldir argument when your shell environment has a different setting for the environment variable gtmglbdir or when you want to select between different InfoHub database views.
--infohub is an optional argument that specifies the InfoHub ID or InfoHub Name of an InfoHub. Use this argument when you need to perform administration operations for a specific InfoHub when a database holds more than one InfoHub.
Configuration processing stores the last global directory used to configure each InfoHub. If --infohub is not specified but $ZGBLDIR points to an InfoHub database, the InfoHub CLI automatically tries to determine an InfoHub by matching the absolute path in $ZGBLDIR, which could be set from either the gtmgbldir environment variable or the --gbldir argument, with one last used for an existing InfoHub.
If neither --infohub nor --gbldir is specified and there is no default InfoHub for the current $ZGBLDIR, configuration processing tries to select an InfoHub ID using the InfoHub Descriptor entry. If it does not find an InfoHub in the Descriptor entry, it automatically generates a random InfoHub Name and InfoHub ID for a new InfoHub.
To select an InfoHub, in most cases you would use --infohub to specify the InfoHub Name or InfoHubID or let the InfoHub API determine it automatically from the InfoHub Descriptor.
To interact with an InfoHub from within GT.M, invoke an entryref like:
<Action>^InfoHub(InfoHubID[,values])
While the shell command line interface automatically assigns suitable default options/values,the InfoHub API entry points require specified values.
InfoHubID specifies the numeric ID of an InfoHub. API users must convert InfoHub Names to numeric IDs.
All <Action> entry points in InfoHub API produce output to $IO. Future enhancement may remove this functionality.
InfoHub Internals | |
---|---|
^InfoHubConf("GlobalsDirs",$zgbldir) contains the ID of the most recently configured InfoHub. With a few exceptions, e.g the Actions is "status", "list", or "configure", the underlying mechanism for taking action on an existing InfoHub is to place information in the ^InfoHubActivity global and signal the InfoHubMain service process to invoke its $ZINTERRUPT, which in turn causes it to look in ^InfoHubActivity for instructions on which to act. The action initiating process returns to the operator once it sees an acknowledgement that the InfoHubMain service has taken over the action. Although FIS plans to maintain stability of the published CLI in future releases of InfoHub, without prior notice, FIS may change the underlying mechanism within any InfoHub release. When starting an InfoHub from the shell command line or from GT.M using the appropriate entryref, the InfoHubMain launches with a JOB command, and control returns to the invoking process once the InfoHub has successfully launched. |
InfoHub API | |
---|---|
More details about the InfoHub API are also documented in the file InfoHub/InfoHub.m. Comments before each entryref describe the input parameters and their types. |