wbemcli is a command line based CIM Client. It uses one of the gc|gcd|dc|ec|ecn|gi|ci|mi|di|ei|ein|ai|ain|ri|rin|gp|sp|cm|cmx operations and the fully qualified path to the CIM Object to get to the host and execute the specified operation. This implementation is CIMOM library independent and can be used with all WBEM compliant CIMOM implementations. The objectPath parameter is used to locate the CIM object and has the following format:
The prop=value[,...] parameter is used to specify <Property>=<Value> pairs for the ci, mi and sp operations. Only one <Property>=<Value> pair must be specified for the sp operation.
The prop[,...] parameter specifies the properties to be returned. One prop must be specified for the gp operation. For other operations this parameter is optional, if none are specified all properties will be returned.
Example:
stringProp,booleanProp,numericProp
The method[.param=value[,...] parameter is used to specify <Parameter>=<Value> pairs for the cm operation.
Append array ([]), reference (&) and key property (#) indicators to property names
-cte
Enable support for chunked responses from CIMOM
-v
Show version information
-dx
Show XML messages payload as received from CIMOM
-dr
Delineate references with { } pairs
-noverify
Do not verify the server certificate for https URLs (useful for testing)
-cacert
CA certificate file (required for https URLS unless -noverify is specified)
-clientcert
Client certificate file (if the CIM server requires client certificates)
-clientkey
Client private key file (required if -clientcert is specified)
-ac
association class name (ai, ain only)
-arc
result class name (ai, ain, rin, ri only)
-ar
role name (ai, ain, rin, ri only)
-arr
result role name (ai, ain only)
Libraries
wbemcli requires either libghttp, libwww, or winhttp, depending on build options used.
Examples
To get all instances of rpm_packages, i.e. all installed rpm packages on the local system, the following command can be used:
wbemcli ei 'http://localhost:5988/root/cimv2:rpm_package'
The get instance operation can be specified to get more information about a certain package:
wbemcli gi 'http://localhost:5988/root/cimv2:rpm_package.name="glibc"'
The create instance (ci) operation can be called using the following format example. Property values can also be specified/add to the sytax.
wbemcli ci 'http://localhost:5988/root/cimv2:TST_InstanceProperties.CreationClassName="TST_InstanceProperties",Id="Instance #2"' 'CreationClassName="TST_InstanceProperties",Id="Instance #2",Property_string2="This is instance#2",Property_uint8=250'
More command line examples can be found from the wbemcli/samples directory.
Host indirection support
The scheme and host specification in the object path can be replaced by an arbitrary token that will be used to locate the proper scheme and host specification in ./wbemcli.ind or any file specified via the WBEMCLI_IND environment variable. The format of this file is as follows:
<token>: <scheme>://[user:pwd@]<host>:<port>
Assuming the following entry in ./wbemcli.ind:
myCimom: http://localhost:5988
The example in the previous section can then be specified as:
wbemcli gi 'myCimom/root/cimv2:rpm_package.name="glibc"'
Environment
WBEMCLI_CURL_SSLVERSION
Specifies the SSL protocol that will be used. Valid values are SSLv2, SSLv3, TLSv1, TLSv1.0 (TLSv1_0), TLSv1.1 (TLSv1_1) or TLSv1.2 (TLSv1_2). If this variable is not set, wbemcli will attempt to figure out the remote SSL protocol version.
Files
/etc/ssl/certs/ca-certificates.crt
The default CA certificate file. Can be overridden with -cacert.
Exit status
0
Normal termination.
16
Abnormal termination, see diagnostics printed to the standard error.
Releases
8 releases since Debian 6.0 (Squeeze); the text changed 2 times.
-ac since Debian 8 (Jessie);
-ar since Debian 8 (Jessie);
-arc since Debian 8 (Jessie);
-arr since Debian 8 (Jessie);
-cacert since Debian 8 (Jessie);
-clientcert since Debian 8 (Jessie);
-clientkey since Debian 8 (Jessie);
-cte since Debian 8 (Jessie);
-dr since Debian 8 (Jessie);
-dx since Debian 8 (Jessie);
-h since Debian 8 (Jessie);
-nl since Debian 8 (Jessie);
-noverify since Debian 8 (Jessie);
-t since Debian 8 (Jessie);
-v since Debian 8 (Jessie).