Operations
You can refer to the list of operations provided here.
event
Use this option to send custom notification events to a particular server. All listeners registered for the particular event receive this notification. This allows IBM® Security Verify Directory Integrator administrators to trigger listener
applications based on planned custom events.
The usage for the event operation is:
tdisrvctl [general_options] -op event -e event_name [-s source ] [-d data]
where:
-e event_name | The name of the event to send. |
-s source | The name of the source invoking the event (default "tdisrvctl"). |
-d data | The data to be passed to an event listener (default is null). |
Example:
To send an event "user.process.X.completed" from "admin".
tdisrvctl -h itditest -op event -e "process.X.completed" -s admin -d "Admin triggered event"
Note: All events sent from tdisrvctl using the -e option are prefixed by "user."
prop
The "prop" option exposes the properties of a config via the TDI-p. It allows the user to get / set / view the properties of a particular config.
The usage for the prop operation is:
tdisrvctl [general_options] -op prop -c config_name
[ [-l ] |
[
-o property_store]
[
-g key | all] |
[
-s key=value] [-e] |
[
-d key] ]
where:
-c config_name | Name the config to work with. |
-l | List all the property stores configured. |
-o property_store | Name the property store to work with. |
-g key | Get the value of the specified key (or keyword 'all' implying get all keys). |
-s key=value | Set the "key" to the specified "value." |
-e | Encrypt the value when putting in the store (can be used with -s option only). |
-d key | Delete the specified "key" from the store. |
Note:
-
The '-l', '-g', '-s', '-d' options are mutually exclusive, and cannot be used together.
-
The '-e' option can only be used with the '-s' option.
-
Managing properties stored in the password store is NOT supported.
-
While specifying the "-c" option specify the COMPLETE configuration file path on the remote server, or give a path relative to the "configs" folder. To see the relative paths use the "report" option of tdisrvctl:
tdisrvctl -op report -l
Examples:
To see a list of all the property stores for config C1.xml
tdisrvctl -op prop -c C1.xml -l
To get a list of all the properties for config C1.xml
tdisrvctl -op prop -c C1.xml -g all
To get a list of all the properties for config C1.xml from store MyStore
tdisrvctl -op prop -c C1.xml -o MyStore -g all
To set a property MY_PROP to value MY_VALUE for config C1.xml in store MyStore and mark it as protected:
tdisrvctl -op prop -c C1.xml -o MyStore -s MY_PROP=MY_VALUE -e
queryop
The queryop option returns the list of AL operations exposed in an AssemblyLine.
This option is useful in a scripting environment. An IBM® Security Verify Directory Integrator solution developer can develop a script to automatically query for exposed operations and then use the result to start an AssemblyLine with a specific operation using the start operation's -r -alop flag. The output of this operation is such that it can be grepped for or tokenized easily in a scripted environment.
The usage for the queryop operation is:
tdisrvctl [general_options] -op queryop -c <configFile> -r <ALname>
where
configFile | Config file name |
ALName | Name of the AssemblyLine |
Output:
ALOp:{attr_1;attr_2...attr_n;}
Note: While specifying the "-c" option specify the COMPLETE configuration file path on the remote server, or give a path relative to the "configs" folder. To see the relative paths use the "report" option of tdisrvctl:
tdisrvctl -op report -l
Examples:
To query for operations exposed in an AL:
tdisrvctl -h itditest -T trust.kdb
-W secret -op queryop
-c examples/ADCustomConnector.xml
-r ADAssemblyLine
Example Output:
$initialize: {ldapurl;loginPasswd;loginUserName}
reload
This option can be used to reload running Configs on a particular server.
The usage for reload operation is:
tdisrvctl [general_options] -op reload -c [config_list]
where:
config_list | Comma separated list of Configs to reload. |
Note: While specifying the "-c" option specify the COMPLETE configuration file path on the remote server, or give a path relative to the "configs" folder. To see the relative paths use the "report" option of tdisrvctl:
tdisrvctl -op report -l
Example:
To reload Configs C1.xml, C2.xml and C3.xml on remote host itditest:
tdisrvctl -h itditest -T trust.jks -W secret -op reload -c C1.xml,C2.xml,C3.xml
report
This option can be used for generating a report for a particular config or for listing the configs available on the remote server's config folder.
The config report lists details of the particular config. The details are AssemblyLines, Connectors and Parsers in each AssemblyLine, Connector library, Parser library, Script library, Function Library. This option gives a one shot view of all the details of a particular config.
The config listing option helps the user in finding out the list of configs available on the remote server and what their exact names are. Of course, only those configs can be seen that are in the "config" folder of the remote server (see global.properties file for property api.config.folder). This command cannot obtain list of configs located "anywhere" on the system.
The usage for the report operation is:
tdisrvctl [general_options] -op report [-c config | -l]
where:
-c config | Name of the Config whose report is to be generated. |
-l | The Configs in the remote server's config folder. |
The displayed details for each connector or function component part of an AssemblyLine look like this:
Name : count
Mode : Iterator
State : Enabled
Debug : Disabled
Template : system:/Connectors/ibmdi.Timer
Parser : [parent]
Comment : None
Note:
- The specified config must be already loaded on the remote server.
- Only one of the '-c' or '-l' option is allowed. Not both.
- While specifying the "-c" option specify the COMPLETE configuration file path on the remote server, or give a path relative to the "configs" folder.
- The argument to the -c option is case-sensitive, and must match the name of the config file exactly as known by the server instance, reported by for example "tdisrvctl -op status".
Examples:
To get a complete listing of the details of C1.xml on remote server:
tdisrvctl -h remoteserver -op report -c C1.xml
To get a list of the configs available in the "config" folder of the remote server:
tdisrvctl -h remoteserver -op report -l
shutdown
This option can be used to shut down the IBM® Security Verify Directory Integrator server.
The format for this command is:
tdisrvctl [general_options] -op shutdown [-o return_code] [-f]
where:
-o return_code | The return code with which the remote IBM® Security Verify Directory Integrator server should exit. |
-f | Force a controlled shutdown and exit all AssemblyLines. |
Examples:
To shut down the local IBM® Security Verify Directory Integrator server:
tdisrvctl -op shutdown
To shut down the local IBM® Security Verify Directory Integrator server, with a controlled shutdown of all AssemblyLines:
tdisrvctl -op shutdown -f
To shut down the server running on remote host itditest which is configured for SSL (server-auth only)
tdisrvctl -h itditest -T trust.kdb -W secret -op shutdown
srvinfo
This option is used to display the information of an IBM® Security Verify Directory Integrator server.
The usage of the command is:
tdisrvctl [general_options] -op srvinfo
Example:
To view the server information for an IBM® Security Verify Directory Integrator server running on localhost
tdisrvctl -h localhost -op srvInfo
status
This option can be used to view status of AssemblyLines.
The usage for status operation is:
tdisrvctl [general_options] -op status -c [config_list | all]
-r [AL_list | all]
-listen
where:
config_list | Comma-separated list of Configs or keyword "all". |
AL_list | Comma-separated list of ALs or keyword "all". |
-listen | indicates to start receiving the logs of a running Config or AssemblyLine. |
Note:
-
At least one of the options ('-c' or '-r') must be specified. -
-
The keyword "all" indicates all configs or AssemblyLines.
-
The -listen option requires exactly one Config or AssemblyLine to be specified.
-
While specifying the "-c" option specify the COMPLETE configuration file path on the remote server, or give a path relative to the "configs" folder. To see the relative paths use the "report" option of tdisrvctl:
tdisrvctl -op report -l
Examples:
To see the status of all configs and ALs:
tdisrvctl [general_options] -op status -c all -r all
You can also write
tdisrvctl [general_options] -op status
To see the status of AL1, AL2:
tdisrvctl -h itditest -op status -c c1.xml -r AL1,AL2
Output:
(Component Type # Component Name # RUNNING / STOPPED # Statistics):
1 # AL1 # RUNNING # [get:571] [add:571] [del:3] [requests:2333]....
1 # AL2 # STOPPED #
The Component Types are:
- 0 for Config
- 1 for Assembly line
The Statistics contain the following details (valid for AssemblyLines only):
- Attribute "add" - total number of "add" operations performed
- Attribute "mod" - total number of "modify" operations performed
- Attribute "del" - total number of "delete" operations performed
- Attribute "get" - total number of "getNext" (Iterations®) performed
- Attribute "request" - total number of requests accepted when there is a Server mode Connector in the AssemblyLine.
- Attribute "callReply" - total number of "callReply" operations performed
- Attribute "err" - total number of errors encountered
- Attribute "skip" - total number of 'skip' operations performed
- Attribute "lookup" - total number of "lookup" operations performed
- Attribute "ignore" - total number of "ignore" operations performed
- Attribute "reconnect" - total number of "reconnect" operations performed
- Attribute "exception" - the exception text if the component terminated with an exception
To see the details of Configs (running and stopped) on a particular server:
tdisrvctl -h itditest -op status -c all
To see the details of a running AssemblyLine on a particular server and start receiving its logs:
tdisrvctl -h itditest -op status -c rs.xml -r al1 -listen
start
This option can be used to start a config or AssemblyLines.
The usage for the start operation is:
tdisrvctl [general_options] -op start -c [config]
-e [password]
-r [AL_list | all] -alop <alop_Name> [{requiredAttr_1;
requiredAttr_2; ... requiredAttr_n}] | [-f filename]
-s [Simulate mode]
-m [run name] -o [propStore1=filename1,propStore2=filename2...]
-t [temp config instance]
-listen
-sync
where
-c config | Name of config to start. |
-e password | Password of config file if it is encrypted. |
-r AL_list | Comma-separated list of ALs to start or keyword 'all'. |
-o property file list | comma separated list of property store names and values |
-alop operName | The specific AL operation and list of list required attributes for the specified operation. |
-f filename | Name of the file where the input attributes and their values are configured for the operation. |
-s Simulate mode | Run the specified AssemblyLines in simulate mode |
-m multi-instance | Run multiple instances of same Config with different run names |
-t temp config instance | Start temp config instance from the XML in the config file specified |
-listen | receive the logs of the specified Config or AssemblyLine |
-sync | execute AssemblyLine synchronously |
Note:
- The '-c' option is mandatory. -
- The keyword "all" indicates all AssemblyLines.
- Required attributes list is mandatory with -alop option.
- -alop option cannot be used with -r all option. It works only with a specific AL.
- When running a temp config with solution or run name it is not possible to check if another config with the same name is already running on the server. If this happens an exception will occur. You could check the running config instances using the status command.
- The -t option expects the Config specified in the -c option to be located on the client machine.
- If the -t option is used and the config specified in the -c option is relative then it will be searched in the current folder.
- The -listen option requires exactly one Config or AssemblyLine to be specified.
- The -listen option executes an AssemblyLine synchronously. There is no need to combine it with the -sync option.
- The -sync option requires exactly one AssemblyLine to be specified.
Examples:
-
To start assembly line AL1 and AL2 of config C1 on remote server itditest:
tdisrvctl -h itditest -T trust.kdb -W secret -op start -c C1.xml -r AL1,Al2
The -r option requires that -c option should also be specified. This is because the AssemblyLines mentioned in the command must belong to one of the Configs in the -c option.
-
To start assembly line AL1 on remote server itditest with AL operation:
tdisrvctl -h itditest -T trust.kdb -W secret -op start -c examples/ADCustomConnector.xml -r ADAssemblyLine -alop $initialize {ldapurl:ldap://9.182.190.149:390;loginPasswd:password;loginUsrname:cn=root}
-
To start AssemblyLine AL1 on remote server itditest with AL operation update:
tdisrvctl -h itditest -T trust.kdb -W secret -op start -c examples/ADCustomConnector.xml -r ADAssemblyLine -alop search {$init.ldapurl:ldap://9.182.190.149:390;$init.loginPasswd:password; $init.loginUsrname:cn=root;searchBase:o=ibm,c=us}
Note: All initialization attributes are to be prefixed with $init.
-
tdisrvctl -h itditest -T trust.kdb -W secret -op start -c examples/ADCustomConnector.xml -r ADAssemblyLine -alop search -f inputFile
Input file format:
Key1:value1
Key2:value2 -
Command to run an AssemblyLine AL1 in simulate mode:
tdisrvctl -h itditest -T trust.kdb -W secret -op start -c examples/ADCustomConnector.xml -r AL1 -s
-
Command to load multiple config instances:
tdisrvctl -op start -c C1.xml -m test -f PropertyStorename=TestProp.properties, PropStore2=propfile2 ... -r AL1,AL2
-
Command to run temp config instance:
tdisrvctl -op start -c C1.xml -t -r AL1
-
Command to start a config on a particular server and receive its logs:
tdisrvctl -h itditest -op start -c rs.xml -listen
-
Command to start an AssemblyLine on a particular server and receive its logs:
tdisrvctl -h itditest -op start -c rs.xml -r AL1 -listen
-
Command to execute an assembly line synchronously on a particular server:
tdisrvctl -h itditest -op start -c rs.xml -r AL1 -sync
-
Command to designate a property file or a list of property files at the time of AssemblyLine startup:
tdisrvctl -h itditest -op start -c SyncTDS -o A=c:\temp\abc.properties
In this scenario you want the
A
store to use the file c:\temp\abc.properties.You must use the -o parameter of the -op start operation to declare a list of property files. When declaring the -o, you must specify a
key=value
pair for the UserPropertyStore and property file respectively:-o <UserPropertyStore declared in xml project>=<Location of Properties File>
You must use a comma to separate the key value pairs.
The following example is applicable in a scenario where you want the
A
store to use the file c:\temp\abc.properties and another property store B to use another file C:\temp\def.properties:tdisrvctl -h itditest -op start -c SyncTDS -o A=c:\temp\abc.properties,B=C:\temp\def.properties
For example:
tdisrvctl -K serverapi\testadmin.jks -P administrator -T testserver.jks -W server -op start -c SyncTDS -o SyncTDSProp=c:\SyncTDS.properties,SyncADProp=c:\SyncAD.properties -r SyncData
stop
The usage for the stop operation is:
tdisrvctl [general_options] -op stop -c [config]
-r [AL_list | all]
where:
-c config | Name of Config. |
-r AL_list | Comma-separated list of ALs to stop or keyword "all." |
-f | Force a controlled shutdown of AssemblyLines. |
Note:
-
The '-c' option is mandatory.
-
While specifying the "-c" option specify the COMPLETE configuration file path on the remote server, or give a path relative to the "configs" folder. To see the relative paths use the "report" option of tdisrvctl:
tdisrvctl -op report -l
-
The keyword "all"' indicates all AssemblyLines.
-
The -r option requires that -c option should also be specified. This is because the AssemblyLines mentioned in the command must belong to one of the Configs in the -c option.
-
The -f option is optional.
-
The argument to the -c option is case-sensitive, and must match the name of the config file exactly as known by the server instance, reported by for example "tdisrvctl -op status".
Example:
To stop assembly line AL1 and AL2, of Config C1 on remote server itditest:
tdisrvctl -h itditest -T trust.jks -W secret -op stop -c C1.xml -r AL1,Al2
tombstone
This option can be used to view tombstone details of previously run Configs, AssemblyLines and EventHandlers (historical).
The usage for the tombstone operation is:
tdisrvctl [general_options] -op tombstone -c [config]
[
-r [AL_name] ]
[-age n]
[[attribute_list] | all ]
where:
-age n | Tombstone record for the last 'n' days (default is 1 day). |
-c config | Name of Config. |
-r AL_name | Name of AssemblyLine. |
all | Tombstone attributes: show all. |
attribute_list:
-ct | Component type. |
-cn | Component name. |
-guid | Tombstone entry's guid |
-et | Event type. |
-ex | Exit code. |
-stime | Component's start time. |
-ctime | Tombstone create time. |
-desc | Error description. |
-um | User message. |
-stat | Statistics (valid for ALs only). |
Note:
-
The '-c' option is mandatory.
-
While specifying the "-c" option specify the COMPLETE configuration file path on the remote server, or give a path relative to the "configs" folder. To see the relative paths use the "report" option of tdisrvctl:
tdisrvctl -op report -l
-
The argument to the -c option is case-sensitive, and must match the name of the config file exactly as known by the server instance, reported by for example "tdisrvctl -op status".
Examples:
-
To see the last 2 days tombstone entries (all attributes) for config C1.xml
tdisrvctl [general_options] -op tombstone -c C1.xml -age 2 all
-
To see tombstone entries for config C1 for the past 3 days:
tdisrvctl -h itdiserver -op tombstone -c C1 -age 3 all
-
To see tombstone entries for config C1 for the last 24 hours (specific attributes):
tdisrvctl -h itdiserver -op tombstone -c C1 -ct -ctime -cn -um
-
To see the tombstone entry for AL1 of "rs.xml"
tdisrvctl -h itdiserver -op tombstone -c C1 -r AL1
deletetombstone
This option can be used to delete tombstone entries for previously run AssemblyLines.
The usage for the delete tombstone operation is:
tdisrvctl [general_options] -op deletetombstone -guid <GUID number>
where
-guid "GUID number" is the unique identifier for the tombstone to be deleted. The GUID for a tombstone can be obtained by viewing the contents of the tombstone; see the entry about the tombstone option for details as to how to obtain the GUID.
debug
This option can be used to set the Debug mode values of connectors and function components of a running AssemblyLine. When you set the Debug mode of a connector with specified parser, the Debug mode of the parser is also initialized
with the same value.
The usage for the debug operation is as follows:
tdisrvctl [general_options] -op debug -c config
-r assembly_line
[
-alc al_component]
-on/off
where:
-c config | Name of Config. |
-r assembly_line | Name of AssemblyLine. |
-alc al_component | name of the AssemblyLine component. |
-on | flag to enable debug. |
-off | flag to disable debug. |
Note:
-
The '-c' and '-r' options are mandatory and require exactly one Config/AssemblyLine to be specified.
-
While specifying the "-c" option specify the COMPLETE configuration file path on the remote server, or give a path relative to the "configs" folder. To see the relative paths use the "report" option of tdisrvctl:
tdisrvctl -op report -l
-
The argument to the -c option is case-sensitive, and must match the name of the config file exactly as known by the server instance, reported by for example "tdisrvctl -op status".
-
If the -alc option is not specified all components in the specified AssemblyLine will be affected.
Examples:
-
To view the Debug mode value of the components in the AssemblyLines of a specified Config:
tdisrvctl -op report -c C1
-
To enable the debug mode for all components in the running AssemblyLine al2:
tdisrvctl -op debug -c C1-r al2 -on C1-r al2 -on
-
To disable the debug mode for specified components in the running AssemblyLine al3:
tdisrvctl -op debug -c C1-r al3 -alc comp1,comp2 -off
Other points to note
- If the user specifies the -T option or the -K option, it means the command line utility must use SSL.
- If no -h (host) option is specified, the command line interface searches for the environment variable TDI_RSRV. If TDI_RSRV is not set or empty, then it uses "localhost" as default. This is also the case for the -p (port) option: if -p is not specified then it searches for TDI_RPORT, and if that is not specified either, it uses the default of "1099".
- The tdisrvctl command will return an exit code of zero if the operation is successful and non-zero if the operation fails. Possible reasons for operation failure are:
- A connection cannot be established to the remote Server.
- The remote Server reported an error (probably related to the operation that was executed).
- An AssemblyLine, which is executed synchronously, failed (see the "-sync" option of the "start" operation).
- The tdisrvctl command line utility will use Log4J logging APIs for logging error messages. The Log4J configuration file is specified in the startup script (the .bat or .sh) file. The command uses a file called tdisrvctl-log4j.properties to set up the Log4J logging. If the solution directory is specified the command sets an environment variable for pointing to the log configuration file in the solution directory. If the solution directory is not specified then the command uses the log configuration file present in the installation directory.
- The tdisrvctl-log4j.properties file has the complete path of location where the logs are to be created. The log files are created in the TDI_install_dir/logs directory by default. The location can be customized as needed.
- All reported error and warning messages are displayed with an error code prefix. This error code can be used to search the Messages for an explanation of the error message and operator response.