SYNOPSIS

wbemcli gc|gcd|dc|ec|ecn|gi|ci|mi|di|ei|ein|ai|ain|ri|rin|gp|sp|cm|cmx [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -cte] [ .BR -dx ] [ .BR -dr ] [ .BR -noverify ] [ .BR -cacert  file] [ .BR -clientcert  file] [ .BR -clientkey  file] [ .BI -ac  assocClass] [ .BI -arc  resultClass] [ .BI -ar  role] [ .BI -arr  resultRole] objectPath [ .I prop=value[,...]] [ .I prop[,...]]

Alternate formats:

(These symlinks are not installed by the Debian package, but work if created manually.)

wbemgc\t [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -dx ] [ .BR -dr ] objectPath [ .I prop[,...]]

wbemgcd\t [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -dx ] [ .BR -dr ] objectPath

wbemdc\t [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -dx ] [ .BR -dr ] objectPath

wbemec\t [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -cte] [ .BR -dx ] [ .BR -dr ] objectPath [ .I prop[,...]]

wbemecn\t [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -dx ] [ .BR -dr ] objectPath

wbemgi\t [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -dx ] [ .BR -dr ] objectPath [ .I prop[,...]]

wbemci\t [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -dx ] [ .BR -dr ] objectPath [ .I prop=value[,...]]

wbemmi\t [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -dx ] [ .BR -dr ] objectPath [ .I prop=value[,...]]

wbemdi\t [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -dx ] [ .BR -dr ] objectPath

wbemei\t [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -cte] [ .BR -dx ] [ .BR -dr ] objectPath [ .I prop[,...]]

wbemein\t [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -dx ] [ .BR -dr ] objectPath

wbemai\t [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -cte] [ .BR -dx ] [ .BR -dr ] [ .BI -ac  assocClass] [ .BI -arc  resultClass] [ .BI -ar  role] [ .BI -arr  resultRole] objectPath [ .I prop[,...]]

wbemain\t [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -dx ] [ .BR -dr ] [ .BI -ac  assocClass] [ .BI -arc  resultClass] [ .BI -ar  role] [ .BI -arr  resultRole] objectPath

wbemri\t [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -cte] [ .BR -dx ] [ .BR -dr ] [ .BI -arc  resultClass] [ .BI -ar  role] objectPath [ .I prop[,...]]

wbemrin\t [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -dx ] [ .BR -dr ] [ .BI -arc  resultClass] [ .BI -ar  role] objectPath

wbemgp\t [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -dx ] [ .BR -dr ] objectPath \c prop

wbemsp\t [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -dx ] [ .BR -dr ] objectPath \c prop=value

wbemcm\t [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -dx ] [ .BR -dr ] objectPath method[.param=value[,...]]

wbemcmx\t [ .BR -nl ] [ .BR -h ] [ .BR -t ] [ .BR -dx ] [ .BR -dr ] objectPath method[.param=value[,...]]

DESCRIPTION

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:

\t<scheme>://[user:pwd@]<host>:<port>/<namespace[/..]>:<classname>[.<key=value[,..]>]

The objectPath should be enclosed in single quotes so that double quoted

strings are perserved by the command line shell. Refer to the examples section.

The only scheme supported is http. Example:

\thttp://krz:xyz@localhost:5988/root/cimv2:rpm_package.name=glibc

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.

Example:

stringProp="a string",booleanProp=true,numericProp=25

Arrays of property values are supported by specifying additional values

separated by commas

Example:

stringProp="a string","another string",numericProp=25,49,12

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.

Example:

Method2Execute.stringParam="a string",booleanParam=true,numericParam=25

Arrays of property values are supported by specifying additional values

separated by commas

Example:

Method2Execute.stringParam="a string","another string",numericParam=25,49,12

OPERATIONS:

Supported operations are:

gc

\tget class

gcd

\tget class definition

dc

\tdelete class

ec

\tenumerate classes

ecn

\tenumerate class names

gi

\tget instance

ci

\tcreate instance

mi

\tmodify instance

di

\tdelete instance

ei

\tenumerate instances

ein

\tenumerate instance names

ai

\tenumerate association instances

ain

\tenumerate association instance names

ri

\tenumerate reference instances

rin

\tenumerate reference instance names

gp

\tget property

sp

\tset property

cm

\tcall method

cmx

\tcall method (return XML)

OPTIONS

-h

Print a help message

-nl

Start a new line for every property returned

-t

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

\tassociation class name (ai, ain only)

-arc

\tresult class name (ai, ain, rin, ri only)

-ar

\trole name (ai, ain, rin, ri only)

-arr

\tresult role name (ai, ain only)

LIBRARIES

wbemcli requires either libghttp, libwww, or winhttp, depending on build options used.

Example

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"'

FILES

/etc/ssl/certs/ca-certificates.crt

The default CA certificate file. Can be overridden with -cacert.

EXIT CODES

0

Normal termination.

16

Abnormal termination, see diagnostics printed to the standard error.

AUTHOR

Adrian Schuur <[email protected]>

BUGS

The SBLIM project maintains a mailing list to which you should direct all questions regarding sfcb, sfcc, wbemcli, or any of the SBLIM providers. To subscribe to this mailing list visit

  • http://lists.sourceforge.net/lists/listinfo/sblim-issues

The SBLIM Project Bug tracking page can be found at

  • http://sourceforge.net/tracker/?group_id=128809&atid=712784

COPYRIGHT

(C) Copyright IBM Corp. 2002, 2004, 2005, 2009

AVAILABILITY

wbemcli is a part of the SBLIM project. The most recent version is available on the web at

  • http://sblim.sourceforge.net/

RELATED TO wbemcli…

cimserver(1)