機能説明

The stclient command displays, finds, adds, updates and deletes records in the
Service Tag registry. The registry is in the XML file /var/sadm/servicetag/registry/servicetag.xml, and
contains the inventory of the product instances installed in the machine. Each record
has a unique product instance identifier which is generated when the service
tag is added in the registry. This product instance identifier is used
as a key when finding, updating or deleting the service tag records.
The extract option prints out the registry contents in XML format in stdout.

The stclient command also runs in interactive mode. This mode is invoked
by running stclient without any parameters. A menu of all the available
options are displayed, and the user is prompted to enter different parameters
depending on the option chosen.

Any user can extract or get the contents of the registry, but
only users with the appropriate privileges, the “svctag” user, or the creator
of the service tag is authorized to update or delete a service
tag record.

オプション

The following options are supported:

-pproduct_name

Sets the product name of the service tag to be added. For example, “stclient -p “Solaris 10 Operating System”” sets the product name to the “Solaris 10 Operating System”.

-eproduct_version

Sets the product version of the service tag to be added. For example, “stclient -e 5.10” sets the product version to “5.10”.

-tproduct_URN

Sets the Sun product unique identifier of the service tag to be added. For example, “stclient -t urn:uuid:5005588c-36f3-11d6-9cec-fc96f718e113” sets the Sun product unique identifier to “urn:uuid:5005588c-36f3-11d6-9cec-fc96f718e113”.

-iinstance_URN

Sets the product instance unique identifier of the service tag. For example, “stclient -i 3a444ab2-1dd2-11b2-a69d-830020782a6b” sets the product instance unique identifier to “3a444ab2-1dd2-11b2-a69d-830020782a6b” This field may also be set when the service tag is added but is not typically used. The generation of the instance ID is normally left to the stclient.

Sets the vendor of the product. For example, “stclient –m Sun” sets the product vendor to “Sun”.

-Aplatform_arch

Sets the platform architecture that the product is running on. For example, “stclient –A sparc” sets the platform architecture to “sparc”

-zcontainer

Sets the container that the product is running on. For example, “stclient -z “global zone”” sets the container to “global zone”.

-Ssource

Sets the source of this service tag, naming the entity that created it.

-rroot_dir

Sets the root directory where the command searches for the registry. The command searches /var/sadm/servicetag/registry by default. When this option is used, the command looks for the Registry in the specified root directory, (for example, “-r/home/user1” searches /home/user1/var/sadm/servicetag). This is typically used for testing.

オペランド

Function Letters

The function portion of the key is specified by one of the
following letters:

x

Extract. Extracts and prints the contents of the Service Tag registry in XML format. An alternate root directory may be specified for testing purposes.

a

Add. Adds a service tag in the registry. A unique product instance identifier may be supplied and is automatically generated if not provided. This field is returned by the command. The required fields for add are product name, product version, product URN, product parent, vendor, platform architecture, container and source.

u

Update. Updates a service tag in the registry using the product instance URN as the key. The parent URN and product defined instance id fields can be updated.

d

Delete. Deletes a service tag in the registry using the product instance URN as the key.

E

Extract Environment. Enumerates to standard output the environmental or “agent”' information associated with the registered Service Tags on this system.

g

Get. Gets and prints a service tag from the registry using the product instance URN as the key.