📄 cli.nroff
字号:
.TH cimcli 1 LOCAL .SH NAME cimcli \- command line WBEM Client .SH SYNOPSIS .B cimcli [operation] [object] [options] [extra-parameters].I ...cimcli is available for all platforms that support the Pegasus CIM Server..SH DESCRIPTION .B cimcliis a command line test tool for executing CIM client operations. It implementsall of the DMTF CIM operations except for the modify and create class/instance operations and includes severalother operations that are useful in testing including getting all namespaces and enumerating allinstances in a namespace.Each execution of cimcli invokes a CIM Operation with the corresponding command parameters equivalentto the CIM Operations defined in the CIM Operations over HTTP specification.In addition to the basic CIM Operations defined in the specification, this tool implements a number ofother specific operations that support testing and querying CIM servers including a command to queryfor namespaces and to get all instances in a namespace..TP.B 1.Enumerate namespaces (ns) - Returns a list of the namespaces available from the CIMOM..TP.B 2.Enumerate all instance names (niall) - Returns a list of all instance names in the defined namespace..TP.B 2.Turn CIMServer statistics on and off (At least for the OpenPegasus serverThe format of this command is generally:.TP.B cimcli [Operation] [objectname] [options] [extra parameters].TP.B [Operation] defines the operation to be executed. cimcli executes all of the DMTF CIM Operations (ex. getclass)and a set of compound operation (enumeratenamespaces). Thereare two forms for each Operation definition, a short form typically two characters (i.e. gc)and the long form which is the full name of the operation (i.e. getclass)..TP.B [objectname]The name of the object input with the command. This parameter is operation dependent.For example, with the getClass operation the object is a class name.With the getinstance command the object is an object name. Notethat some of the commands do not require an object. Thus, for example, the [object] is optional withthe enumerateClasses operation as it is with the equivalent enumerateClassNames CIM operation. Normallythis is either a classname or an instancename (classname plus keybindings). In some operations one or the other is required. In other operations, the behavior of the operation is dependent on whether classnameor instancename is supplied..TP.B [options...] Options are identified on the command line with the - or -- notation. There are three types of options:.TP 8.B 1.A set of options that are universal and modify or define the execution of the command or the form of the return. This includes options like setting the output format for object responses orrequesting only summary operation..TP 8.B 2.A set of options that represent the optional input parameters for selected operation. Thecommand defines the CIM Operation that will be executed and the options define the optional characteristics.Typical context options might be -n namespace (used on most but not all operations)or -niq whichsets includequalifiers to false for operations that use the includeQualifiers optional parameter..TP 8.B 3A set of options to display help (-h, --help, --ho to get a list of all options, and-hc to get a list of all commands. When these options are requested, no operation isexecuted..TP.B [extra-parameters]Some of the operations allow or require extra parameters. these are typically keywords or keyword/value pairsand are defined as part of the particular options that might use them.Any extra parameters entities on the command line that occur after the [Operation] and are not preceeded by"-" to indicate an option are considered extra paramters. These are used in some of the operations to provideadditional information required or optionally desired by the operation. See each operation definition to determineif extra parameters are required or allowed. These may be either keyname-value pairs in some cases or simply stringsdepending on the operation.NOTE: cimcli does not protect the user against inputting extra options or parameters. Since the options areheavily dependent on the operation to be executed, it simply ignores those options that are not used with a particularoperation. Thus, entering the -r option (role) with a getClass operation is syntatically allowed but cimcli ignoresthe parameter..SH UNIVERSAL OPTIONSThere is a set of options which are general to all of the CIM Operations and most of the compound operations and which provide parameters for the initiation or execution of the command. These include:.TP.B \-n [namespace]Namespace name for this operation (ex. -n root). The default namespace is root/cimv2..TP.B \-l [location]Host name or IP address and optionally port for this operation. The default for this commandif the the -n option is not used is to use the Pegasus connectLocal() function to connect to the server.Note that this means that a command like cimcli gc CIM_Door may not work when trying to connect to a server other than Pegasus on the same system. If cimcli is to be used to connect to a CIM Server otherthan Pegasus on the same system use -l localhost or -l 127.0.0.1 or the actual name or IP address.This will force cimcli to make the connection in the normal way, not using connectLocal().TP.B \-u [user-name]The user name to be used in in the connection to the CIM server for the command.TP.B \-p [password]The password to be used in the connection to the CIM server for the commandIn addition there is a set of options that modifies the manner in which the command is executed orthe display of information on response including the following:.TP.B \--tMeasure time for the operation to be completed and report it upon command completion. If this optionis set, the time for the operation is recorded upon completion of the operation. In addition, the client infrastructure is qeieried to determine if the operation execution times optionally measuredin the infrastructure and at the server are available. If they are, they are displayed also. Thiswould allow the user to see a) time spent in the server, b) round trip time for the operation, c)application round trip time for the operation. Note that when combined with the repeat option,the output includes maximum, minimum, and average times for the operation. There are a specific operationsin cimcli to turn control statistics generation (See son and soff operations).TP.B \--r [repeat_count]Repeat the operation repeat_count times. This repeats the operation without disconnecting. This option isuseful for setting up tests that load the server with repeated calls and also for getting average times foran operation by taking the average of a number of calls ( when used with the summary information option andthe measure time option). .TP.B \-delay [seconds]Delay count seconds between connect and operation..TP.B \--sumPresent only summary information, not full output. Generally it presents counts of objects returned and response times in place of the names or objects themselves..TP.B \--count [object_count]Defines an expected count of objects expected on the response. An error exit is generated if thisnumber of objects is not received. This test can be used in batch files to test for number of objectsreturned by an operation. .TP.B \--timeout [seconds]Set the connect timeout to some time other than the default timeout..TP.B \-o [ "xml" | "mof" ]Output type for commands that output objects. Used with commands that present CIM objects intheir response..TP.B \-verboseDisplays details on the options for the CIM Operation and execution..TP.SH OPERATIONSThis section defines the individual operations supported by cimcli. Note that the either the names (ex EnumerateInstances) or the shortcut (ei) maybe used in inputting an operation defintion and they they are case independent..TP.B ci CreateInstanceNOTE: This command is not implemented in the current version and return afixed "NOT IMPLEMENTED" response.This command issues the CIM operation create instance with the parameters provided.It requires the [object] parameter defining the class for which the instance is tobe created and also allows for an optional set of parameters that defined propertiesto be provided in the following format [propertyName]=valueIf the propertyName parameter is provided with no value, the default is inserted.Note that the CIM operation is issued even if the property name is illegal since this is considered to be a test program.The command actually reads the CIM_Class, inserts the properties that have been definedon the command line using the value type from the class.The command will be rejected if the class does not exist in the namespace..B Example: cimcli ci CIM_door name=abc size=zyxReturns the object path of the created instance if the call to the cim server was executed.Otherwise it returns the exception received..TP.B ec EnumerateClassesIssues the enumerateClasses CIM operation which enumerates the class hiearchy starting at the leveldefined by <classname>.The format is:.B cimcli ec [classname] [options]where classname is not required. If it is omitted, cimcli inserts an empty classname into the CIM operationwhich tells the CIM Server to start at the top of the class inheritance tree. The possible options that represent the parameters of the enumerateClasses operation are:.B \-niqBoolean (not_include_Qualifiers) that sets the operation parameter for include_quailifers to false..B \-nlo Boolean that defines whether properties from superclassesare included in the response. the -nlo option turns this parameter off.B \-cl Boolean parameter sets the operation parameter classOrigin in the operation request. the CIMServeris expected to return classOrigin information as part of the response..B \-pl [propertyList]Optional property list for the operation..B Examples TBD.TP.B nc EnumerateClassNamesEnumerate Class Names. The format is: cimcli[ <classname> ] [options] where the used options are:The options specific to this operation include;.B \-niqdo not include qualifiers.B \-nlonot localOnly.B \-clclass origin.B \-pl [propertyList]optional property list for the operation.On this operation the classname parameter is optional similar to the way the CIM operationis defined..B Examples TBD.TP.B ni EnumerateInstanceNamesExecute the enumerateInstanceNames CIM Operation. The syntax for this operation is:.B cimcli ni [classname] [options]This operation takes as input options specificto this command the following: object - classname for which instancenames are to be enumerated.It displays the instances names that were returned by the CIM server in response tothe enumerateInstances CIM operation with the defined input parameters. if the -s option is setit returns only the count of names returned.In order to provide all of the options allowed for the CIM operation EnumerateInstances it uses the followingoptions specific to the command:-B \-nlonot local only operation parameter to false. Note that this negative form for theoption is used becaused the default for local only parameter is true. Thus, not including thisparameter means that the parameter is not set..B Example: cimcli ni CIM_ManagedElement -p password -n name -n root/PG_Interop Execute the enumerateInstanceNames operation on CIM_ManagedElement class in the root/PG_Interop namespace..TP.B ei EnumerateInstancesExecute the CIM operation enumerateInstances. The format of this operation is:.B cimcli ei <className> [options]In order to provide all of the options allowed for the CIM operation EnumerateInstances it uses the followingoptions specific to the command.B \-nlonot local only operation parameter to false. Note that this negative form for theoption is used becaused the default for local only parameter is true. Thus, not including thisparameter means that the parameter is not set..B \-niqBoolean (not_include_Qualifiers) that sets the operation parameter for include_quailifers to false,Note that this negative form is used because the default for this parameter is true..B \-icBoolean to set include class origin operation parameter to true..B \-diSet deep inheritance operation parameter to true. .B \-o [xml|mof]Set the output format for the instances to display the returns as mof
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -