Skip Navigation Links | |
Exit Print View | |
man pages section 1M: System Administration Commands Oracle Solaris 11.1 Information Library |
- Service Tag Administration Program
stclient -x | -E [-r root_dir]
stclient -a [-i instance_URN] -p product_name -e product_version -t product_URN [-F parent_URN] -P product_parent [-I product_defined_instance_id] -m product_vendor -A platform_arch -z container -S source [-r root_dir]
stclient -u -i instance_URN -F parent_URN -I product_defined_instance_id [-r root_dir]
stclient -d -i instance_URN [-r root_dir]
stclient -g -i instance_URN [-r root_dir]
stclient -f -t product_URN [-r root_dir]
stclient -h
stclient -v
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:
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”.
Sets the product version of the service tag to be added. For example, “stclient -e 5.10” sets the product version to “5.10”.
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”.
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 Sun product unique identifier of parent product. For example, “stclient -F urn:uuid:5005588c-36f3-11d6-9cec-fc96f718e113” sets the Sun product unique identifier of parent product to “urn:uuid:5005588c-36f3-11d6-9cec-fc96f718e113”.
Sets the parent product of the service tag. For example, “stclient -P JES” sets the product parent to “JES”.
Sets the product defined instance identifier. For example, “stclient -I ser:abc-klm-000-7190” sets the product defined instance identifier to “ser:abc-klm-000-7190”.
Sets the vendor of the product. For example, “stclient –m Sun” sets the product vendor to “Sun”.
Sets the platform architecture that the product is running on. For example, “stclient –A sparc” sets the platform architecture to “sparc”
Sets the container that the product is running on. For example, “stclient -z “global zone”” sets the container to “global zone”.
Sets the source of this service tag, naming the entity that created it.
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.
The function portion of the key is specified by one of the following letters:
Extract. Extracts and prints the contents of the Service Tag registry in XML format. An alternate root directory may be specified for testing purposes.
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.
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.
Delete. Deletes a service tag in the registry using the product instance URN as the key.
Extract Environment. Enumerates to standard output the environmental or “agent”' information associated with the registered Service Tags on this system.
Get. Gets and prints a service tag from the registry using the product instance URN as the key.
Find. Finds and prints all the instance URNs of a given product URN.
Help. Displays the command options.
Version. Displays the version number of the command.
The following exit values are returned:
Successful completion.
An error occurred.
Example 1 Adding a Service Tag in the Registry
To add a service tag, enter the following:
# stclient -a -p "Java Enterprise Web Server 6.0" -e 6.0 \ -t urn:uuid:f2b8b59c-6eba-11d7-986f-9f5d47ec72fe \ -P Java Enterprise Server -m Sun -A sparc -z global -S patch
The screen displays the following:
Java Enterprise Web Server 6.0 6.0 added Product instance URN=urn:st:7fc61914-1dd2-11b2-b992-830020782a6b
Example 2 Updating a Service Tag in the Registry
To update a service tag, enter the following:
# stclient -u -i 7fc61914-1dd2-11b2-b992-830020782a6b \ -I urn:st:product.defined.id
The screen displays the following:
Service tag updated
Example 3 Extracting a Service Tag Registry
To extract a service tag, enter the following:
# stclient -x
The screen displays output similar to the following:
<?xml version="1.0" encoding="UTF-8"?> <registry urn="urn:uuid:1234ab-00e1-11b3-98737646873" version="1.0"> <service_tag> . . . </service_tag> </registry>
Example 4 Finding all product instances
To find all product instances, enter the following:
# stclient -f -t urn:uuid:f2b8b59c-6eba-11d7-986f-9f5d47ec72fe \ fc61914-1dd2-11b2-b992-830020782a6b
Example 5 Listing the Environmental Information
To list the environmental information associated with the registered Service Tags on this system, enter the following:
# stclient -E
The screen displays output similar to the following:
<?xml version="1.0" encoding="UTF-8"?> <agent> <agent_urn>urn:st:af15ee62-0bb3-ef2d-fa96-85a11996cc71</agent_urn> . . . </system_info> </agent>
See environ(5)for descriptions of the following environment variables that affect the execution of stclient: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and NLSPATH.
See attributes(5) for descriptions of the following attributes:
|