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

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

book

Article ID: 327743

calendar_today

Updated On:

Products

VMware

Environment

VMware Smart Assurance - SMARTS

Resolution

How to use the Smarts Domain Manager Control Program (DMCTL)



To use the DMCTL program please use the following steps below to log in and the table as a guide to the commands.

  1. Navigate to the <base dir>/<smarts software suite: IP, SAM, etc>/smarts/bin directory.
  2. Enter the command ./dmctl -s <Smarts Domain name.
  3. Enter user name and password that is used to log into the Smarts gui.
  4. Once the dmctl prompt appears you are logged in and may begin executing commands.

The basic command and information about these commands can be found in the table below.  Anything between a set of sqaure brackets ([,]) is considered an optional parameter. 

DMCTL CommandDescription
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.

Example:
SAM

get ICS_Notification:: NOTIFICATION-Host_25.25.25.25_DiscoveryError

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

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

The output will look 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.