Admin CLI for ActiveSpaces Administration
Administrative tasks for TIBCO ActiveSpaces are performed through a utility called as-admin, or the Administration Command Line Interface (Admin CLI). These tasks include connecting to a metaspace, creating a space, and displaying information about existing spaces and members.
To start the TIBCO ActiveSpaces Admin CLI, you must:
- Set environment variables for TIBCO ActiveSpaces
For information on setting the required environment variables, see the TIBCO ActiveSpaces Installation document.
- Launch the Admin CLI, in a command prompt window
Additional Characteristics of the Admin CLI
- Arrow keys and the tab key function in the command window as in typical advanced shells.
- You can invoke a shell command by using the escape character ’!’, for example, !dir or !ls to list the files in the current directory.
- Field names and String literals must be enclosed in single or double quotes.
- In most cases, you will start using the Admin CLI by first using the connect command to connect to a metaspace.
- The default discovery mechanism is PGM. If RV discovery or TCP unicast discovery is needed, you must specify the appropriate discovery URL.
For more information on discovery, see the TIBCO ActiveSpaces Developer’s Guide.
The Execute Method
Admin CLI administrative commands (for example defining a space) can be executed directly from within an application. This is done by using the Metaspace object's execute method and passing it a string representing the Admin CLI command. A string is returned containing the output resulting from executing the command.
- Launching the Admin CLI
- Using a Script File to Pass Arguments
Using a script file, you can pass commands for the Admin CLI to begin executing when you launch the Admin CLI. - alter space
Use alter space command to add a field to an existing space definition, or to add or drop an index from a space definition. - clear
The clear command is used to remove all lines of text from the command window except for a single Admin CLI prompt. - clear | set password
Use the clear password command to create a new policy file without a password or a new token file without a password. Use the set password command to create a new policy file or a new token file with a new password. - close
The close command is used in conjunction with the open command which connects to a metaspace through the listen port of another metaspace member. - connect
connect is used to connect to a metaspace. Connecting to a metaspace is a necessary initializing step for the Admin CLI to begin working with ActiveSpaces, just as it is for an ActiveSpaces application. The Admin CLI can only be connected to one metaspace at a time. - define | create safe_password
Passwords can be used in different contexts in ActiveSpaces. Depending on the configuration of the security domains, token files, and user authentication requirements, there are different options. The define | create safe_password command allows you to create safe passwords for different situations. - define | create security_policy
Use the define|create security_policy command to create a security policy file. - define | create security_token
Use the define | create security_token command to create a security token for deployment to ActiveSpaces requestor nodes. - define | create space
Used to create a space. - disconnect
Disconnects the invoking metaspace member from the metaspace to which it is currently connected. - drop space
Drops the named space. - execute on member
You can use the execute on member command to cause the execution of a specified Admin CLI command on a specified member of the metaspace. The results of the command are returned to the member that originally invoked the execute on member command. - execute on members
You can use the execute on members command to execute a specified Admin CLI command on all of the members in the metaspace, all peer members, or all remote client members. - add proxy
The add proxy command is used to add a proxy URL to the discovery list specified. This command is applicable only on remote clients. This command is used to dynamically maintain the list of proxies for remote clients without having to restart the remote client members. - execute on proxy (deprecated)
Use the execute on proxy command to execute a specified Admin CLI command on the metaspace member acting as a proxy for the invoking member. This is when the invoking member is connected to a metaspace as a remote client. - drop proxy
The drop proxy command is used to drop a proxy URL from the discovery list specified. This command is applicable only on remote clients. This command is used to dynamically maintain the list of proxies for remote clients without having to restart the remote client members. - export metaspace
Exports the definitions for the metaspace and its spaces (if any are currently defined) to a designated text file or to the screen. - help
Provides a complete list of Admin CLI commands and their syntax. - join space
Use the join space command to cause the as-admin metaspace member to join an existing space. If the space name does not exist, an error is returned. - leave space
Use the leave space command to cause the as-admin metaspace member to leave a space. An error is displayed if as-admin is not already a member of the space. - open
The open command is used to connect to a metaspace through the listen port of another metaspace member. Any Admin CLI commands issued while that connection is open will be executed on the other metaspace member. Use the close command to close this type of metaspace connection. - quit | exit | bye
Exits the Admin CLI. - recover metaspace
Used to restore all of the spaces of a metaspace when shared-nothing persistence is used. - recover space
The recover space command is used when all of the members of a metaspace have stopped and you are restarting those members. The recover space command allows you to control how persisted data for an individual space is restored. - resume space
This command is used when shared-all persistence is specified for the space. Use this command on spaces that are in a SUSPENDED state to help them resume writing to the persister. - cleanup datastore
This command provides you the ability to clean up the datastore for one or many spaces. With this command, all the old files and INVALID files get deleted. - suspend persistence
This command suspends writes to shared-nothing files in case of disk or a file system failure such as, a longer or extended outage. - resume persistence
This commands resumes writes to shared-nothing files after a disk or a filesystem failure is fixed by the system administrator. - commit transaction
Commits an uncommitted transaction for a specified space member or for all metaspace members. - rollback transaction
The rollback transaction command attempts to roll back the uncommitted transaction(s) for the metaspace member on which the command is invoked, provided the member is still connected to the cluster. - set event_log
Use the set event_log command to enable or disable event logging. - set file_log
Use the set file_log command to enable or disable event logging. - show | describe console_log
Use the show | describe console_log command to indicate the current setting for console logging. - show | describe member
Presents information and statistics about the specified member. - show | describe members
Presents a short summary for each matching member connected to the metaspace including remote members. - show | describe metaspaces
The show | describe metaspaces command displays basic information about the metaspaces that a process is currently connected to. - show | describe space
Provides information about the space specified with the name parameter. - show | describe space entries
Lists the entries in a specified space. - show | describe space locks
Provides information about each entry in a space that is locked, including which member of the space has locked the entry and the entry's field values. - show | describe space size
Lists the number of seeded entries in a space. - show | describe space query
Provides information on cost of execution of each seeder. The cost of a query execution can be measured by the time taken to execute a query. If there are indexes, the cost of execution is measured by the number of entries. If not, it is measured by the time taken to execute the query. - show | describe query
Displays information about queries in the metaspace. - show | describe spaces
Lists all spaces defined for the metaspace. - show | describe transactions
Lists all spaces defined for the metaspace. - show | describe event_log
Use the show | describe event_log command to indicate the current setting for event logging. - show | describe file_log
Use the show | describe file_log command to indicate the current setting for file logging. - show | describe member stats
If performance monitoring is enabled, displays system performance statistics for the specified member. - show | describe system stats
If performance monitoring is enabled, displays system performance statistics for all of the members of the space. - abort query
Allows for canceling running queries. On aborting the query, the application gets a REQUEST_CANCELED error message. - unlock
The unlock command is used to force the unlocking of entries in a space. Entries can be unlocked using either the lock_id parameter or the all parameter. The lock ID of a space entry can be discovered using the show space <space_name> locks command. - validate policy_file
Use the validate policy_file command to validate the syntax and settings in a specified security policy file. - validate token_file
Use the validate token_file command to validate a security token file that you have generated by using the define | create token_file command. - validate truststore
Use the validate truststore command to validate a specified security certificate file. - as-admin Commands for Cross-site Replication
The as-admin utility offers some commands for cross-site replication.