4 cimcli \- command line WBEM Client
6 .B cimcli [operation] [OperationTarget] [options] [valueParameters]
8 cimcli is available for all platforms that support the Pegasus CIM Server.
13 is a command line test tool for executing CIM client operations. It
14 implements all of the DMTF CIM operations except for the modify and create
15 class/instance operations and includes several other operations that are
16 useful in testing CIM Servers including getting all namespaces and
17 enumerating all instances in a namespace.
19 Each execution of cimcli invokes one or more CIM Operations with the command
20 parameters equivalent to the CIM Operations defined in the CIM Operations over
23 In addition to the basic CIM Operations defined in the DMTF specification
24 (DMTF DSP 0200), cimcli implements a number of other
25 operations that support testing and querying CIM servers (ex. an
26 operation to query for namespaces and another to get all instances in a
27 namespace) which require multiple CIM Operations. The additional
31 Enumerate namespaces (ns) - Returns a list of the namespaces available
35 Enumerate all instance names (niall) - Returns a list of all instance
36 names in the defined namespace.
39 Turn CIM Server statistics on and off (DEPRECATED) - Turns the statistics flag
40 in the Server CIMObjectManager Class on or off for the OpenPegasus server.
41 This enables and disables execution of statistics gathering in the server.
42 This command is retained for compatibility but is DEPRECATED and will be
43 removed when a real alternative is included in the Pegasus release.
45 NOTE: This operation may be CIMServer type specific since not all CIMServers
46 implement the statistics functions.
49 Test commands (ti) - A cimcli operation that executes tests of the
50 characteristics of an instance requeste from the CIM Server. This
51 operation extend the capabilities of cimcli to actually compare
52 information from the server with information in the command line input.
54 The format of the cimcli command is generally:
56 .B cimcli [Operation] [OperationTarget] [options] [ValueParameters]
58 Note that options may be interspersed with the [OperationTarget] parameter but
59 that a) the ordering of [Operation] [OperationTarget] is fixed and any [value
60 parameters] MUST occur after the [OperationTarget] parameter.
64 Defines the operation to be executed. cimcli executes all of the DMTF
65 CIM Operations (ex. getclass) and a set of compound operation
66 (enumeratenamespaces). There are two forms for each [Operation]
67 definition, a short form typically two characters (i.e. gc) and the
68 long form which is the full name of the operation (i.e. getclass). The complete
69 set of operations can be viewed by calling cimcli with the option -hc.
72 The [OperationTarget] is the name of the object for which the the operation is
74 This parameter is operation dependent. For example, with the getClass
75 operation the [OperationTarget] is a CIM class name. With the getInstance operation
76 the object is a CIM instance name. Note that some of the commands do not
77 require an [OperationTarget] parameter. Thus, for example, the [OperationTarget]
78 is optional with the enumerateClasses operation as it is with the
79 equivalent enumerateClassNames CIM operation. Normally this is either a
80 CIM class name or an instance name (classname plus keybindings). In some
81 operations one or the other is required. In other operations, the
82 behavior of the operation is dependent on whether class name or instance
85 The format for instance name is defined as the model path in the CIM
86 Specification and has the form:
88 <classname>.<keyPropertyName1>=
89 <value1>[,<keypropertyNamex>=<valuex>]*
91 <valuex> is either a numeric value or a string value
92 (enveloped in quotes). The quote marks surrounding
93 string values are required.
95 However, to make inputting command line object names, cimcli offers a second
96 option for inputting the object name as [OperationTarget]. In this second
97 case, the [OperationTarget] Object is simply the class name and value
98 parameters are used to define the keypropertyName/value pairs. In this case,
99 the quotation marks around string property values are optional and are required
100 only in the case where quotation marks would be required to define a value
101 such as a string that includes quotation marks.
103 Thus, as an example, the input for a getInstance might be:
105 cimcli gi TennisPlayer.first="Patrick",last="Rafter"
107 cimcli gi TennisPlayer first=Patrick last=Rafter
109 In the second case, cimcli gets the class from the CIM Server and uses the
110 parameters to form a correct CIMObjectPath. In the first case, generally cimcli
111 uses the input path directly without getting the class from the server.
115 Options are identified on the command line with the - or -- notation. They
116 are identified in a cimcli config file with the form <name>=value where name
117 is a long name for the option. Each cimcli option has both a short name
118 for command line use and a long name for configuration file use.
119 There are several types of options:
123 Execution Modification Options - A set of options that are universal and
124 modify or define the execution of the command or the form of the return.
125 This includes options like setting the output format for object responses
126 or requesting only summary operation.
130 Connection Options - Options that define the connection for the operation.
131 This includes options for defining the CIMServer address, namespace, and
132 security options such as user name, password and SSL settings.
135 Operation Parameter Options - A set of options that represent the optional
136 input parameters for selected operations. The [operation] defines the CIM
137 Operation that will be executed and the options define the optional
138 request parameters. Typical context options might be -n namespace (used
139 on most but not all operations)or -niq which sets includequalifiers to
140 false for operations that use the includeQualifiers optional parameter.
143 Help Options - A set of options to display help (-h, --help, --ho to get a
144 list of all options, and -hc to get a list of all commands). When these
145 options are requested, no operation is executed.
147 .B [value-parameters]
148 Some of the operations allow or require extra parameters, for example
149 to supply property value definitions for create and modify instance. These are
150 typically keywords or keyword/value pairs and are defined as part of
151 the particular operation that use them.
153 Any extra parameter entities on the command line that occur after the
154 [Operation] and [Operation Target] and are not proceeded by "-" to
155 indicate an option are considered value parameters. These are used in some
156 of the operations to provide additional information required or optionally
157 desired by the operation. See each operation definition to determine if
158 extra parameters are required or allowed. These may be either
159 keyname/value pairs in some cases or simply strings depending on the
162 NOTE: cimcli does not protect the user against inputting extra options
163 or parameters. Since the options are heavily dependent on the
164 operation to be executed, it simply ignores those options that are not
165 used with a particular operation. Thus, entering the -r option (role)
166 with a getClass operation is syntactically allowed but cimcli ignores
171 .SS Connection Options
173 There is a set of options which are general to all of the CIM
174 Operations and most of the compound operations and which provide
175 parameters for the initiation or execution of the operations (ie. identify
176 the target server and set connection security parameters.
180 Namespace name for this operation (ex. -n root). The default namespace
181 is root/cimv2 if this parameter is not entered
184 Host name or IP address and optionally port for this operation. The
185 default for this command if the -n option is not used is to use
186 the OpenPegasus connectLocal() function to connect to the server. Note
187 that this means that a command like cimcli gc CIM_Door may not work
188 when trying to connect to a server other than Pegasus on the same
189 system. If cimcli is to be used to connect to a CIM Server other than
190 Pegasus on the same system use -l localhost or -l 127.0.0.1 or the
191 actual name or IP address. This will force cimcli to make the
192 connection in the normal way, not using connectLocal()
195 The user name to be used in the connection to the CIM server for the
199 The password to be used in the connection to the CIM server for the
204 Connect with SSL - Boolean option that specifies that cimcli should
205 attempt to connect over a secure connection using SSL. This option
206 causes cimcli to modify the client connect call to set the SSLContext
207 option to the certificate defined with the --cert and --key options. If
208 this option is set but neither the --cert or --key options are included,
209 the SSLContext for the connect call is submitted with the Cert and key
212 NOTE: Since SSL is a compile cimcli compile option, the following
213 options may not even exist in a Pegasus environment that was compiled
214 with the SSL capabilities disabled.
217 .B \--cert [certificate file path]
218 Defines the file name of a certificate to be used with the client connect
219 if the -s option is set. This is optional and used only with the -s and
223 .B \--key [client key file path]
224 Defines the file name of a Client private key. This is optional and only
225 has an effect on connections made over HTTPS using -s
227 .SS CIMCLI OPERATION MODIFICATION OPTIONS
229 There is a set of options that modifies the manner in
230 which the command is executed or the display of information on
231 response including the following:
235 Measure time for the operation to be completed and report it upon
236 command completion. If this option is set, the time for the operation
237 is recorded upon completion of the operation. In addition, the client
238 infrastructure is queried to determine if the operation execution
239 times optionally measured in the infrastructure and at the server are
240 available. If so, they are displayed also. This would allow the
241 user to see a) time spent in the server, b) round trip time for the
242 operation, c) application round trip time for the operation. Note that
243 when combined with the repeat option, the output includes maximum,
244 minimum, and average times for the operation. There are a specific
245 operations in cimcli to turn control statistics generation (See son
246 and soff operations) at least for the Pegasus cimserver.
250 A boolean option that requests cimcli to sort the returned entities for
251 multi-entity operations (ex enumerate, reference, associator). Whereas
252 the order of returned entities is random from most CIM Servers setting
253 this option outputs the objects in a defined order. The order is based
254 on the Name element for classes and qualifier declarations and on the
255 object path returned for instances and CIM objects.
258 .B \--r [repeat_count]
259 Repeat the operation repeat_count times. This repeats the operation
260 without disconnecting. This option is useful for setting up tests that
261 load the server with repeated calls and also for getting average times
262 for an operation by taking the average of a number of calls ( when
263 used with the summary information option and the measure time option).
267 Delay count seconds between connect and operation.
271 Present only summary information, not full output. Generally cimcli
272 presents counts of objects returned in place of the names or objects
276 .B \--count [object_count]
277 Defines an expected count of objects to be returned in the response.
278 cimcli is terminated with an error exit if the number of objects returned does
279 not match the object_count supplied with the option.
280 This test can be used in batch files to test for number of
281 objects returned by an operation. In addition to the error status code, a
284 "Failed count test. Expected= xx. Received= yy"
290 cimcli en CIM_ManagedElement -count 100
292 If the count of instances returned is not equal to 100,
293 cimcli exits with error code 60 and the Failed count test
298 .B \--timeout [seconds]
299 Set the connect timeout to some time other than the default timeout.
302 .B \-o [ "xml" | "mof" | "table"]
303 Output type for commands that output objects. Used with commands that
304 present CIM objects in their response. Presents the output in the form of
305 xml corresponding to DMTF CIM/XML specification, mof, or for instances a
306 table of the data in each property.
310 Displays details on the options and execution for the execution
314 .B \--setRtnHostNames [SubstituteHostName]
315 String option with a required parameter that set a substitute host name
316 which cimcli will insert into returned objects to replace host names
317 returned from the server. This option was defined because the object
318 paths/references returned by the CIM Server may include the host name as
319 part of the returned object path which makes it difficult to compare the
320 returned paths to a defined path. Using this option forces any returned
321 host names to be changed to the string parameter supplied with the option.
323 .SS OPERATION PARAMETER OPTIONS
325 There is a set of options that define request parameters for
326 specific cimcli Operation requests. These are typically optional parameters
327 on the CIM operation request that modify the behavior of the server to the
328 request. This includes things like requesting localonly, deep
329 inheritance, etc. Note that the actual behavior
330 may be dependent on the particular operation request type. The full
331 definition of these options is below here and their use with each specific
332 cimcli operation is defined with the operations.
335 .B \-pl [propertylist]
336 Set the propertylist parameter for those operations that allow this parameter.
337 The propertylist value for this parameter is a comma-separated list of
338 class properties. This sets the propertylist optional parameter on those CIM
339 operations that allow this parameter including: getClass, getInstance,
340 modifyInstance, enumerateInstances, associators, and references. If this
341 option is not defined on the execution of one of these operations, cimcli
342 sets the propertylist parameter to NULL indicating that all properties
345 If a comma-separated list of one or more properties is defined as the value
346 for this option, a propertylist with these values is set on the CIM request
349 Since this CIM request parameter specifically allows 3 options: 1) list of
350 properties, 2) NULL which is the indicator that all properties are to be
351 returned, and 3) Empty which is the indicator that no properties are to be
352 include in the response, the cimcli options specifically allows defining
353 the empty option by setting propertylist to either "" or \"\". cimcli
354 accepts either an input that the command processor interprets as an empty
355 string or as a string consisting of two quotation marks.
357 The syntax of propertylist is:
359 <propertyName>[,<propertyName>]* | ""
363 cimcli gc CIM_ManagedElement -pl Caption
364 cimcli gc CIM_ManagedElement -pl Caption,Description
365 cimcli gc CIM_ManagedElement -pl ""
369 Boolean (not_include_Qualifiers) that sets the operation parameter for
370 include_qualifiers to false. Note that this form is required because the
371 default for this option in the DMTF CIM Operations is true (include
372 qualifiers). Not including this option sets the request to include
373 qualifiers on those commands to which this option applies.
377 Boolean that defines whether properties from superclasses are included in
378 the response. the -nlo option turns this parameter off. The default if
379 this parameter is not included is to request that the server return only
380 local properties and ignore those from superclasses.
384 Boolean to set the deep inheritance CIM operation parameter to true.
388 Boolean parameter sets the CIM operation parameter classOrigin in the
389 operation request to true. the CIMServer is expected to return classOrigin
390 information as part of the response.
393 .B \-ac [assocatonClassName]
394 String defining the association Class parameter for the CIM Operation.
395 Used with reference and association operations.
398 .B \-rc [resultClassName]
399 String defining the resultClass parameter for the CIM Operation
403 String defining the role parameter for the CIM Operation
407 String defining the resultrole parameter for the CIM Operation
410 This section defines the individual operations supported by cimcli.
411 Note that the either the names (ex. EnumerateInstances) or the shortcut (ei)
412 may be used in inputting an [operation] on the command line
413 and they are case independent.
417 This cimcli operation requests that the server create an instance by
418 building the properties of an instance from a combination of the class
419 name and value parameters provided with the input. The command issues the
420 CIM operation createInstance with an instance built from the parameters
421 provided. It requires the [OperationTarget] parameter defining the class
422 for which the instance is to be created and also allows for an optional
423 set of name=value parameters that define properties to be provided in the
424 created instance in the following format:
428 where value may be either a scalar for scalar properties
429 or an array for array properties.
438 The detailed form for value input is defined as follows:
441 Scalar property values - The string form of the property similar
442 to MOF input of constant values is used to input scalar values.
443 The scalarvalue input includes all CIM Types. Numeric values may
444 be input in hex, octal, decimal or binary in the same form as
445 the DMTF specification for MOF. Quotations are not required surrounding
446 values unless the value includes spaces. Quote marks can be embedded
450 Array property values - Array property values are defined by defining a string
451 that is comma-separated scalarvalue entities.
455 {scalarvalue1[,scalarvalue.n]*}
458 The array MUST NOT include any spaces between the scalarvalue
459 entities. It must appear to cimcli as a single input parameter.
460 In addition, array value can be input by repeating the complete parameter
461 so that values input will be appended to an already created array.
464 If the propertyName parameter is provided with no value, the
465 default value or NULL if there is no default value is inserted.
468 String property values are special because there are actually
469 two concepts that must be covered when there is no value,
471 2. NULL/default value. These are different for CIM Strings.
473 When a property that requires an empty string is to be input,
474 the user will specify it with no value after the = sign.
475 If, a NULL or default value is desired, the = sign terminator
476 is replaced with the ! (exclamation mark).
479 The value defined in the name/value pair must be decodable into the
480 CIMType of the CIMClass for which the instance is being created.
482 The execution of this operation first accesses the CIMServer for the class
483 definition and uses this information to build the proper value types and
484 values for the instance. This means that values that cannot be decoded with
485 values to match the CIM Type in the class will be rejected.
487 This command builds the instance with all of the properties for which
488 name/value pairs representing the properties of the class are input.
489 It does not include any properties that are not defined on the command line.
491 To create an instance with less than the full set of properties,
492 supply only those properties that are to be submitted to the CIM Server.
494 The command will be rejected if the class does not exist in the namespace or
495 if the input includes property names that are not in the class.
499 cimcli ci CIM_xxxx ID=abc size=32 age=O12
500 Creates an instance of CIM_xxxx with
501 property ID value = abc,
502 property size with value 32
503 property age with value octal 012
505 cimcli ci CIM_xxxx ID=grrrr \\
506 arrayParam={abc,def,ghi,"jkl mno" \\
508 Creates an instance of CIM_xxxx with
509 property ID with value = grrr
510 property arrayParam (a String array property)
516 property numArray (Uint32 array) with
517 the values 1, 2, 3, 4
519 cimcli ci CIM_xxxx ID=blah
520 numArray=1,2,3 numArray=4,5
521 Creates an instance with the ID property and
522 the numArray property having the values
525 Returns the object path of the created instance if the call to the CIM
526 server was executed successfully. Otherwise it returns the exception received
531 This operation allows the modification of existing instances in the
532 target server by building the properties from a combination of the
533 target Class and properties provided with the input. The command
534 issues the CIM operation modifyInstance with an instance built from
535 the parameters provided. It requires the [OperationTarget] parameter defining
536 the class for which the instance is to be created and a set of
537 value parameters that define properties to be provided in the created
538 instance in the format defined for CreateInstance above.
540 In the same manner as the createInstance, this command first acquires
541 the class definition for the server and uses the property type
542 information from the class to properly crate the property value types
543 from the input property values.
545 For a detailed definition of the name/value input see the createInstance
548 In addition to the property definitions, this command allows the
549 property list options (-pl) that defines a property list to be
550 supplied to the target server with the modifyInstance CIM Operation.
554 cimcli mi CIM_xxxx name=abc size=zyx
555 cimcli mi CIM_xxxx name=abc arrayParam= \\
556 {abc,def,ghi,"jkl mno" \
561 .B ec EnumerateClasses
562 Issues the enumerateClasses CIM operation which enumerates the class
563 hierarchy starting at the level defined by <classname>.
565 The syntax for this operation is:
567 .B cimcli ec [classname] [options]
569 where classname is not required. If it is omitted, cimcli inserts an
570 empty classname into the CIM operation which tells the CIM Server to
571 start at the top of the class inheritance tree. The possible options
572 that represent the parameters of the enumerateClasses operation are:
576 Boolean (not_include_Qualifiers) that sets the operation parameter
577 for include_qualifiers to false.
580 Boolean that defines whether properties from superclasses
581 are included in the response. the -nlo option turns this parameter off
584 Boolean parameter sets the operation parameter includeClassOrigin in the
585 operation request. the CIMServer is expected to return classOrigin
587 information as part of the response.
589 .B \-pl [propertyList]
590 Optional property list for the operation.
593 cimcli ec CIM_ManagedElement -di -nlo
596 .B nc EnumerateClassNames
597 The EnumerateClassNames cimcli operation issues the enumerateClassNames
600 The syntax for this operation is:
602 .B cimcli nc [<classname>] [options]
604 The classname parameter optional and the default it is not
605 provided is to return the class names of the top level classes.
607 The options specific to this operation include;
610 set the operation deepInheritance parameter = true
616 Issue getClass CIM Operation for the class CIM_Door.
620 .B ni EnumerateInstanceNames
621 Execute the enumerateInstanceNames CIM Operation. The syntax for this
624 .B cimcli ni [classname] [options]
628 classname - classname for which instance names are to be enumerated.
630 It displays the instances names that were returned by the CIM server
631 in response to the enumerateInstances CIM operation with the defined
632 input parameters. If the --sum option is set it returns only the count of
637 cimcli ni CIM_ManagedElement -p password -n name\
638 -n root/PG_Interop --sort
640 Execute the enumerateInstanceNames operation on
641 CIM_ManagedElement class in the root/PG_Interop namespace.
642 Sort the returned list of instance paths.
644 cimcli ni CIM_Door --sum
645 Execute the enumerateInstanceNames operation on the class
646 CIM_Door and return the count of instance paths returned.
649 .B ei EnumerateInstances
650 Execute the CIM operation enumerateInstances. The syntax for this operation is:
652 .B cimcli ei [className] [options]
654 This operation requests instances from the CIMServer and displays the returned
655 instances in a user selected format.
657 The following options represent specific parameters for this operation
660 not local only operation parameter to false. Note that this negative form
661 for the option is used because the default for local only parameter is
662 true. Thus, not including this parameter means that the parameter is not
666 Boolean (include_Qualifiers) that sets the operation parameter for
667 include_qualifiers to true,
670 Boolean to set include class origin operation parameter to true.
673 Set deep inheritance operation parameter to true.
675 .B \-o [xml|mof|table]
676 Set the output format for the instances to display the returns as mof
678 .B \-pl [propertyList]
679 optional property list for the operation
681 It returns the instances found either as MOF,XML or a table of property
682 values with each property a column in the table depending on the
683 output options parameter.
687 cimcli ei CIM_ComputerSystem -niq -di
688 This example enumerates CIM_ComputerSystem in the
689 namespace root/CIMV2 (default) requesting without
690 qualifiers (-niq) with deepInheritance (-di).
694 .B niall enumerateallinstanceNames
695 Execute an enumerateinstancenames on all classes to get all class
696 names within the defined namespace. This function searches the
697 complete namespace using the CIM getClass operation to get the classes
698 and the enumerateInstanceNames command to enumerate all of the
699 instances for each class. It returns the list of all of the instance
700 names found in the namespace.
702 The syntax for this operation is:
704 .B cimcli niall [options]
706 where the options include any of the universal options (ex. namespace,
711 cimcli niall -n test/testproviders
713 Returns all instancenames in the namespace
714 test/testproviders by executing
715 enumerateinstancenames on each class in
721 Gets the instance defined by the instance name parameter and displays it
722 in the format chosen for this operation (xml, mof, or table).
724 The syntax for this operation is:
726 .B cimcli gi [objectname] [options]
728 which causes execution of the CIM getinstance operation.
731 .B cimcli gi [classname] [options]
733 which presents a list of possible instances to the user from which one
734 can be selected for the getinstance. In this case, the command
735 actually executes an enumerateInstanceNames to get the list of
736 instances that is presented to the user for selection of a single instance.
737 The getInstance is executed after the user makes a selection.
739 This command requires the [objectname] parameter. If the parameter
740 is an instance with keys defined (a CIMObjectPath), the a getInstance
741 CIM operation is executed and the return from the CIM Server presented
742 (in either xml or mof depending on the output option). If the input is
743 a class name, a enumerateinstanceNames CIM Operation is executed and
744 if any instance names are returned the result is presented to the
745 console for the user to select one of the instances to be deleted.
747 If there are no instances, the return from this command is normally an
748 exception as defined in the DMTF CIM Operations specification..
750 The possible options specific to this operation are:
753 include qualifiers. The default for getInstance is includQualifiers=false
754 so use of this parameter is required if the user wants qualifiers returned.
755 NOTE: The use of the parameter in CIM/XML has been deprecated so the provider
756 may not return qualifiers even if requested.
761 .B \-pl [propertyList]
762 optional property list for the operation
766 cimcli gi cim_ManagedElement
768 This is an interactive request that returns a list of
769 CIMObjectPaths from an enumerateInstance of
770 CIM_ManagedElement from which the user can select
771 one path which cimcli will uses as the [objectname]
772 to execute a getInstance operation returning the
778 Delete instance executed a single deleteInstance command to the CIM
779 Server. The syntax is:
781 .B cimcli di [objectname] [options]
783 This command requires the [objectname] parameter. If this parameter
784 is a full instance name with className and key bindings, the
785 deleteInstance CIM Operation is executed directly. If it is a class
786 name with no keybindings, the enumerateInstances CIM Operation is executed
787 and the list of returned instance paths presented to the console for the
788 user to select one to delete. cimcli then executes CIM deleteInstance
789 operation with the selected [objectname] and returns the response.
791 The response to this operation is either an empty response if the instance
792 was successfully deleted or an exception return if there were any errors.
796 cimcli di President."name=fred" -n test/testnamespace
798 Attempt to delete the instance of President with the key
799 property name(fred) from the test/testnamespace namespace.
801 cimcli di President -n test/testnamespace
803 cimcli requests instance paths for the President class in
804 the test/testnamespace and puts the complete list on the
805 console for the user to select one instance to delete.
810 getQualifier displays the target qualifier. The syntax is:
812 .B cimcli gq [qualifier name] [options]
816 cimcli gq abstract - returns the mof or XML for the abstract qualifier.
820 This command is not implemented.
823 .B eq enumeratequalifiers
824 Issues the CIM Operation to enumerate all of the qualifiers defined in
825 the target namespace. The syntax is:
827 .B cimcli eq [options]
829 There are no special options for this operation.
832 .B dq deletequalifier
833 Issues the CIM operation to delete the target qualifier defined by
834 qualifier_name in the target namespace.
837 .B cimcli dq [qualifier_name] [options]
839 NOTE: This operation should be used with great caution as it removes
840 qualifier declarations that may be used by other components of the model.
844 Execute the CIM Operation enumerate associators for the target object name.
845 The syntax for this operation is:
847 .B cimcli a [objectname] [options]
849 Note that the objectname may be either a classname or an instancename.
850 If classname is supplied, the return is a set of classes that match
851 the objectname supplied unless the -i (interactive) parameter is used.
852 If objectname is used, the response is instances of the association
853 that matches the classname.
855 The options provide the various operation parameters including;
857 .B \-ac [assocatonClassName]
858 association Class parameter
860 .B \-rc [resultClassName]
861 resultClass parameter
864 String defining the role parameter for the CIM Operation
870 includeClassOrigin The -ic parameter
872 .B \-pl [properytlist]
873 Optional PropertyList
876 Interactive request - If this parameter is supplied and the objectname
877 is a classname, the environment performs an enumerateInstances on the
878 objectname and presents the list of possible instances for user
881 .B an associatornames
882 Enumerate the associator names for the target object. The syntax for this
885 .B cimcli an [objectname] [options]
887 where objectname can be either a class name or an instance name.
889 The following options provide the various operation parameters;
891 .B \-ac [assocatonClassName]
892 association Class parameter
894 .B \-rc [resultClassName]
895 resultClass parameter
898 String defining the role parameter for the CIM Operation
904 Interactive request - If this parameter is supplied and the objectname
905 is a classname, the environment performs an enumerateinstances on the
906 objectname and presents the list of possible instances for user
911 Executes the CIM Operation references. Which returns CIM Objects.
912 The syntax for this the operation is:
914 .B cimcli r [objectname] [options]
916 Note that the objectname may be either a class name or an instance name.
917 If a class name is supplied, the return is a set of classes that of the
918 association. If the -i (interactive) parameter is used with a class name
919 input, the user is queried for the objectname parameter. If objectname
920 is used, the response is instances of the associations that match the
923 The options specifically used by this operation are:
926 role parameter for the CIM Operation.
928 .B \-rc [resultClassName]
929 resultClass parameter for the CIM Operation
932 includeQualifiers (The default is false)
935 Boolean to set include class origin operation parameter to true.
937 .B \-pl [propertyList]
938 optional property list for the operation
941 Interactive request - This option is used only with commands that will
942 accept either classname or object name as input (reference, referencenames,
943 associatiors, associatornames). It allows the interactive mode where the
944 user picks an instance from a list returned by cimcli (similar to gi where if
945 only the classname is supplied, cimcli knows that the user wants to pick from
946 a list) with these commands. If this parameter is supplied and the objectname
947 is a classname, the environment performs an enumerateinstances on the
948 objectname and presents the list of possible instances for user
949 selection. Thus, the user can execute interactive reference, etc. operations
953 cimcli a CIM_ManagedElement
954 would return classs that associate with
957 cimcli a CIM_ManagedElement -i
958 executes an enumerateInstanceNames on
959 CIM_ManagedElement and presents the user with
960 a list of instances names so that the user can
961 pick an instance name that will be used for
962 the associator request.
966 Executes the CIM Operation referencenames that returns CIMObject paths of the
967 references of the objectname parameter.
969 The syntax for this operation is:
971 .B cimcli rn [objectname] [options]
973 Note that the objectname may be either a class name or a specific instance
974 name. If classname is supplied, the return is a set of classnames that
975 are references of the objectname supplied. If the -i parameter is used
976 with a class name as objectname, the user is queried to select an instance
977 name for the objectname input. If objectname is used, the response is
978 instance names of the associations that matches the classname.
980 The options specifically used by this operation are:
983 role parameter for the CIM Operation
985 .B \-rc [resultClassName]
986 resultClass parameter for the CIM Operation
989 Interactive request - If this parameter is supplied and the objectname
990 is a classname, the environment performs an enumerateinstances on the
991 objectname and presents the list of possible instances for user
996 This operation executes a CIM extrinsic operation to execute a method on
997 a CIM class or instance.
999 The form of the command is:
1001 .B cimcli im [objectname] [methodname] *[parameters] [options]
1003 Note that there are two required parameters to this command, the
1004 [objectname] and the [methodname].
1006 Parameters are input in the form:
1008 parameterName=<value>
1010 <value> defines may be any of the value forms defined for
1011 CIM value including string, integer, etc. See the
1012 createInstance description for detailed information on
1013 the syntax of the value component.
1014 NOTE: Earlier versions
1015 of cimcli allowed only String values and used the -ip
1016 option. This option has been removed.
1018 The completed operations displays the return code from the command and
1019 any returned parameters that are qualified as OUT parameters.
1023 cimcli PG_WBEMSLPTemplate register -n root/PG_Interop
1024 Calls PG_WBEMSLPTemplate class with the method named
1027 cimcli PG_XXX dosomething input1=true input2=1111
1028 Calls PG_XXX class method dosomething with two
1030 input1 is boolean parameter with value true
1031 input2 is Uint32 parameter with value 1111
1036 The execQuery operation directly executes the CIM Operation execQuery
1037 with the input parameter supplied either by direct parameter input
1038 or the options for filter and querylanguage. The syntax of the operation is
1040 cimcli <query_filter> <query_language> <options>
1042 the query_filter and the query_language may be supplied directly on the
1043 command line as parameter or vi options (-f for the query filter and
1044 -ql for query language.
1046 The execQuery cim Operation is executed directly with the input parameters
1047 or options. If neither a query_filter parameter or option are supplied
1048 cimcli returns an error.
1051 cimcli xq "Select * from CIM_Something" CQL
1053 cimcli xq "Select * from CIM_blah"
1054 uses WQL as default query language
1058 Set the CIMServer statistics to enabled by doing a modify instance of
1059 the CIM_ObjectManager instance that defines the server. This depends
1060 on the server having implemented statistics and having also
1061 implemented the functionality of enabling and disabling statistics
1062 through setting this property in CIM_ObjectManager. This should be
1063 considered a temporary operation in cimcli until a more permanent
1064 utility is provided with OpenPegasus to manage this type of
1065 functionality. The corresponding operation soff will attempt to
1066 disable statistics on the server. This works with OpenPegasus servers
1067 starting with version 2.5.1.
1069 DEPRECATED to be replaced by at some time in the future
1071 The syntax of the operation is:
1077 See the operation son. This is the corresponding operation to turn
1078 off statistics in the server.
1082 The syntax of the operation is:
1087 .B ns enumeratenamespaces
1088 Request an Enumeration of all the namespaces in the target CIM Server.
1089 This command uses both the CIM_Namespace class and if that fails, the
1090 __Namespace class to determine the list of namespaces.
1092 RETURN - It returns a list of the namespace names returned by the CIM Server.
1094 The syntax for this operation is:
1096 .B cimcli ns [options]
1098 Note that since this operation enumerates namespaces, the namespace option
1105 .B -hc Show Command Options
1106 This operation shows the cimcli operations with a brief description of each
1113 There are a significant number of options to this utility, some if
1114 which provide specific information for one or more commands and some
1115 of which are universal across all of the commands. In general, the
1116 program does not check for spurious options so that if you input an
1117 option that is not used by a particular operation, it is simply
1118 ignored. Note that some of the options require parameters.
1120 The following is an alphabetic list of the options:
1122 .B \-ac [assocatonClassName]
1123 The association class name parameter defines an assocClass string for
1124 Associator calls (associators and associatornames).
1128 -ac CIM_ManagedElement
1130 .B \-ar association_role_name
1131 Defines an association role for associator operations. Example: -ar
1132 dependent. This optional parameter is used only with the association
1136 .B \--cert [certificateFilePath]
1137 Defines a certificate to be used with the client connect if the -s
1138 option is set. This is optional and used only with the -s and --key
1139 options. The parameter certificateFilePath is required with the parameter
1140 and defined the file containing the certificate.
1143 .B \--count [object_count]
1144 Defines an expected count of objects to be returned in the response.
1145 cimcli is terminated with an error exit if the number of objects returned does
1146 not match the object_count supplied with the option.
1147 This test can be used in batch files to test for number of
1148 objects returned by an operation. In addition to the error status code, a
1150 of the general form:
1151 "Failed count test. Expected= xx. Received= yy"
1157 cimcli en CIM_ManagedElement -count 100
1159 If the count of instances returned is not equal to 100,
1160 cimcli exits with error code 60 and the Failed count test
1165 .B \-delay [time in seconds]
1166 Delay between connection and request . Default(0). example -delay 3
1167 delays 3 seconds between the call and the transmission of the actual
1168 CIM operation. This is used only in some testing environments.
1171 Specifies the boolean parameter deepInheritance parameter for selected
1172 commands. Setting this options causes the deepinheritance=true to be
1173 transmitted for the operation. Note that this means different things
1174 to different commands and is used only with the enumerate commands.
1178 More detailed debug messages from cimcli. This can be useful in the
1179 case where the user is debugging CIM functionality.
1183 Prints help usage message.
1187 Prints full help message with commands, options, examples.
1191 Prints list of cimcli options.
1195 Prints cimcli Operation command list. This list includes the CIM
1196 Operatons defined by the CIM Operations specification and other
1197 operations that were felt to be useful in testing CIM environments.
1201 Boolean to set include class origin operation parameter to true.
1205 Defines a filter to use for query. One String input . Default()
1208 .B \-o [ "xml" | "mof" | "table" ]
1209 Output in xml, mof, or table format. Default(mof) if the -o options
1214 Specifies the includeQualifiers operation input parameter
1215 for selected commands.Since the CIM/XML default for this parameter is
1216 true for some operations (class operations) and false for others
1217 (instance operations), the option is useful only for instance operations.
1218 Also the includeQualifiers parameter has been deprecated in the CIM/XML
1219 specification so the results for instance operations is undetermined.
1220 See also -niq for the includeQualifiers parameter for class operations.
1223 .B \--key [client key file path]
1224 Defines a Client private key. This is optional and only has an effect
1225 on connections made over HTTPS using the -ssl option.
1229 Define CIM Server host address for the operation. This includes either
1230 name or IP address and optional port number(HostName:port). The
1231 default is localhost:5988. If name is used without port, port 5988 is
1233 Examples include -l fred, -l fred:9999, -l 10.1.134.66 -l 10.1.134.123:5977
1237 Specifies the localOnly operation parameter for selected commands if
1238 the option is set. See the commands for more information. This option
1239 is Deprecated in favor of the -nlo because the default for local only
1240 is on so that generally the -lo is simply the default. We recommend
1241 using -nlo to turn off local only.
1245 Defines the namespace for the operation.host name. The default is
1246 root/cimv2. Example -n root/PG_Interop sets the root/PG_Interop
1247 namespace as the namespace for the current operation.
1251 Allows input of a password for server authentication of the command. (
1252 ex. -p 12345678). The default is that the command is submitted with no
1257 Defines user name for CIM Server authentication. Default is no user
1258 name and no authentication.
1259 ( ex -u john) Default is no user name and no authentication from the
1264 DEPRECATED. This was used to set LocalOnly. However, default should be
1265 true and we cannot use True as default.
1266 See -nlo. Default(true).
1270 When set, sets LocalOnly = false on the CIM operation . Default(false).
1274 Sets includeClassOrigin = true for operation that support this parameter
1275 (i.e. get and enumerate classes and instances, associators, and references
1276 operations). Note that the class origin information is only output for
1277 the -o xml output operation since class origin is not part of the MOF
1281 Sets includeQualifiers = false on operations. Default(false).
1284 .B \-pl [propertyList]
1285 Defines a propertyName List which is an optional parameter for some CIM
1286 Operations. Format is p1,p2,p3 (without spaces). Default is that the
1287 property list is set to NULL indicating normally that the operation
1288 should return all properties. The property list typically has 3
1289 possibilities 1) empty which means return no properties, 2) list of
1290 properties to be returned, 3) NULL which means return all properties.
1291 Since the default is NULL, not applying the option means that all
1292 properties are being requested. To set this parameter to empty use
1297 Defines a role string for reference role parameter. Default()
1300 .B \-rc [resultClassName]
1301 Defines a resultClass string for References and Associators. Default()
1304 .B \-rr [resultRole]
1305 Defines a role string for associators operation resultRole parameter.
1309 .B \--setRtnHostNames [SubstituteHostName]
1310 String option with a required parameter that set a substitute host name
1311 which cimcli will insert into returned objects to replace host names
1312 returned from the server. This option was defined because the object
1313 paths/references returned by the CIM Server may include the host name as
1314 part of the returned object path which makes it difficult to compare the
1315 returned paths to a defined path. Using this option forces any returned
1316 host names to be changed to the string parameter supplied with the option.
1320 Displays only summary counts for enumerations, associators, etc.This
1321 option is used to with the repeat option to repeat an operation
1322 without getting the full return display. It reduces the display to
1323 summary information. It is often used with the time option --t to
1324 generate time for execution information on many repetitions of a
1328 .B \--timeout [seconds]
1329 Set the connection timeout in seconds. If not set, the timeout is the
1330 default Pegasus client timeout which for Pegasus is normally to about
1331 30 seconds. This option executes the client call to set timeout.
1334 .B \-trace [trace_level]
1335 Set Pegasus Common Components Trace. Sets the Trace level. 0 is off.
1336 Default(0). The trace level can be set to 0 - 5. Note that since mose
1337 trace definitions have been removed from cimcli, this is of little value.
1341 Displays cimcli and Pegasus software Version.
1345 Verbose Display. Includes Detailed parameter Input display .
1346 Default(false). Outputs extra information about the parameters
1347 actually used in the request and the return from the operation. This
1348 is primarily a debugging tool.
1351 .B \--r [repeat_count]
1352 Number of times to repeat the function. Zero means one time. The
1353 option can be used to repeat an operation within a single call to
1354 cimcli. It simply repeats the operation defined the number of times
1355 defined by the repeat_count within the same connection. Thus, it
1356 establishes the connection executes the operation repeat_count times
1357 and then terminates. It can be used with the --time option to measure
1358 execution times for many repetitions of an operation.
1362 Boolean option that specifies that the Client should attempt to connect
1363 over the secure connection using SSL. This option causes cimcli to
1364 modify the client connect call to set the SSLContext option to the
1365 certificate defined with the --cert and --key options. If this option
1366 is set but neither the --cert or --key options are included, the
1367 SSLContext for the connect call is submitted with the Cert and key
1370 NOTE: since SSL is considered a compilable option with cimcli, these
1371 options may not even exist in a Pegasus environment that was compiled
1372 with the SSL capabilities disabled.
1376 Sort the output objects before display for multi-object outputs such as
1377 enumerates, references, associations, and their corrsponding ...names
1378 operations and for the enumerateQualifierDecls. Whereever cimcli delivers
1379 multiple entities in the response, the use of this option tells cimcli to
1380 attempt to sort the output entities. Generally the sort order is assending
1381 order using a) class name for operations that return classes and b) CIM
1382 Object Path for operations that return instances.
1386 Measure time for the operation and present results. When set the
1387 response time for the operation is presented with the command output.
1388 If the --r (repeat) option is set, minimum, maximum, and average times
1389 are presented. Note that the time for the operation itself is
1390 presented in addition to the overall time for connect, operation, and
1391 disconnect. If statistics are being gathered by the server, setting
1392 this option also presents the server time, and the client round trip
1393 time which are calculated by the server and client infrastructure.
1397 Output objects in xml instead of mof format. Default(false)
1401 Execute an enumerateinstancenames CIM operation for the
1402 pg_computersystem Class
1404 cimcli enumerateinstancenames pg_computersystem -- enumerateinstances
1409 cimcli ei pg_computersystem -- Same as above
1411 Enumerate the class names from the default namespace "root/cimv2"
1413 cimcli enumerateclassnames -- Enumerate classnames from root/cimv2.
1415 Enumerate class names from the namespace "root"
1417 cimcli ec /n root -- Enumerate classnames from namespace root.
1419 cimcli ec -o xml -- Enumerate classes with XML output starting at root.
1421 cimcli enumerateclasses CIM_ComputerSystem -di
1422 -- Enumerate classes starting at CIM_ComputerSystem and the
1423 remainder of the class hiearchy (-di) with mof output of the
1426 cimcli getclass CIM_door -a -u guest -p guest
1427 -- Get class with authentication set and user = guest, password = guest.
1429 cimcli rn TST_Person.name=@MIKE@ -n root/sampleprovider -rc TST_Lineage.
1431 cimcli ec -o XML -- enumerate classes and output XML rather than MOF.
1433 cimcli getqualifiers -- Get the qualifiers in mof output format
1437 cimcli returns a significant number of error codes as follows:
1440 Successful execution of the operation.
1443 A CIM Operation executed as part of the cimcli operation returned a CIM
1444 Exception as defined in the DMTF CIM Operations over HTTP specification.
1445 The status code of the error is returned. While today only not all of the
1446 numbers from 1 to 49 are used for CIM Status errors, cimcli has reserved
1447 this set of numbers with the expectation that this list will expand in the
1450 cimcli will not return any error codes in this range that are not
1451 specifically defined by DMTF error status codes and generated by the CIM
1455 Pegasus Exception encountered during execution of Pegasus Functions
1458 CIMCLI general error not covered by other errors
1461 Unknown exception occurred during execution of the operation
1464 Command line or configuration file input parsing error.
1467 Connection to server failed error.
1470 cimcli failed a compare with one of the test operations such as
1471 testInstance. The returned entity did not match the properties
1472 of the object defined by the input parameters.
1476 Karl Schopmeyer k.schopmeyer@opengroup.org