Smarts: How to use the Smarts Domain Manager Control (DMCTL) program
search cancel

Smarts: How to use the Smarts Domain Manager Control (DMCTL) program

book

Article ID: 331802

calendar_today

Updated On:

Products

VMware Smart Assurance

Environment

VMware Smart Assurance - SMARTS

Resolution

This article explains how to access the Smarts DMCTL program and how to construct and run DMCTL commands




To run the commands available in the Smarts Domain Manager Control (DMCTL) program
  1. From a command line, change (cd) to the /bin directory for your Smarts product installation:
<BASEDIR>/<Smarts product directory (IP, SAM and so on)>/smarts/bin
  1. Enter the following command
./dmctl -s <Smarts Domain name>
  1. At the prompt, enter the user name and password that is used to log into the Smarts console interface.
  2. When the dmctl prompt appears, you are logged in and may begin executing commands as described in the following section.
DMCTL command syntax and usage
The basic command syntax and usage information to construct and run DMCTL commands is listed in the following table. Anything in the table that is between a set of sqaure brackets ([,]) is considered an optional command parameter.

DMCTL Command Syntax DMCTL Command Usage
get <class>::<instance>[::<property>]

This command gets the properties of the class instance that is specified. The get command also retrieves just the value of the property that is specified in the optional segment of the command. Examples:

Smarts SAM
get ICS_Notification:: NOTIFICATION-Host_25.25.25.25_DiscoveryError

get ICS_Notification:: NOTIFICATION-Host_25.25.25.25_DiscoveryError::CausedBy

Smarts IP
get Host::25.25.25.25

get Host::25.25.25.25::InstrumentedBy

getClasses

getclasses

This command lists all of the different Classes in the domain that are viewable in the domain manager control program (dmctl).

getInstances [<class>]

getI [<class>]

geti [<class>]

This command will list all of the instances of the different classes viewable in the SAM topology, but not the instances of all classes.  If a class is provided it will list the instances of that specific class only. 

For example, if a getI is executed in the SAM all the instances of the classes that can be seen in the topology will be listed but instance of classes such as ICS_Notification will not be listed.

getProperties <class> This command will list the different properties/attributes of a class and the corresponding data types associated with the property/attribute.

getOperations <class>

getoperations <class>

This command will list the different operations that can be called an instance when issuing an invoke command.  The output of this command will be a list of operations.  Operations can have parameters that are required in order to execute.

Each operation will be preceded by the data type of the return value between a < >.

invoke <class>::<instance> <op> [<arg1>  ] This command is used to run the operations listed in getOperations.  There can be multiple arguments for the operations (<arg1>  ).  Where <op> is one of the operations from the getOperations command.
insert <class>::<instance>::<property> <value>

This command allows you to set the values of relationship set type properties.  Some properties cannot be modified by this command.  The only way to find which properties can be updated via insert is by trial and error.

Example:
Using the following commands the router router.example.com can be modified in the Smarts IP domain.

insert Router::router.example.com::VirtualHostsAccessPoints IP::IP-10.9.255.16

insert Router::router.example.com::VirtualHostsAccessPoints IP::IP-10.9.255.16

To see the results of these commands run a get against the instance of the router and the particular property that was modified with the following command:

get Router::router.example.com::VirtualHostsAccessPoints

This command will have output like:

{ IP::IP-255.255.255.255 IP::IP-25.25.25.25 }

findInstances <class-regexp>::<instance-regexp>

 

findinstances <class-regexp>::<instance-regexp>

This command can be used in conjunction with regular expressions to find the particular instance of an object.

Example:

findInstance .*out.*::.*xamp.*

This will give you the result:

Router::router.example.com

put <class>::<instance>::<property> <value1> [<value2> ...]

The put command is used to set the values of a property.  Unlike the insert command the put command operates on all data value types except relationship set data types, while the insert command works only on relationship set data types.  The put command also has no means of deleting a value from a property.  Instead to change a value you just overwrite it with a new value.

 

Example:

 

Set the service name on a router

 

put Router::router.example.com::ServiceName FakeServiceName

 

Clear the service name on a router

 

put Router::router.example.com::ServiceName FakeServiceName    

remove <class>::<instance>::<property> <value> This command is the opposite of the insert command.  It is used to remove data from a relationship set.  It follows the exact pattern as the insert command.