System Administration Commands stclient(1M)
NAME
stclient - Service Tag Administration Program
SYNOPSIS
stclient -x -E [-r rootdir]
stclient -a [-i instanceURN] -p productname -e productversion
-t productURN [-F parentURN] -P productparent
[-I productdefinedinstanceid] -m productvendor -A platformarch
-z container -S source [-r rootdir]
stclient -u -i instanceURN -F parentURN -I productdefinedinstanceid
[-r rootdir]
stclient -d -i instanceURN [-r rootdir]
stclient -g -i instanceURN [-r rootdir]
stclient -f -t productURN [-r rootdir]
stclient -h
stclient -v
DESCRIPTION
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 identif-
ier 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.
SunOS 5.11 Last change: 13 May 2008 1
System Administration Commands stclient(1M)
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.
OPTIONS
The following options are supported:
-p productname
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 Sys-
tem".
-e productversion
Sets the product version of the service tag to be added.
For example, "stclient -r 5.10" sets the product version
to "5.10".
-t productURN
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".
-i instanceURN
Sets the product instance unique identifier of the ser-
vice 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.
-F productparentURN
Sets the Sun product unique identifier of parent pro-
duct. 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".
SunOS 5.11 Last change: 13 May 2008 2
System Administration Commands stclient(1M)
-P productparent
Sets the parent product of the service tag. For example,
"stclient -P JES" sets the product parent to "JES".
-I productdefinedinstanceid
Sets the product defined instance identifier. For exam-
ple, "stclient -I ser:abc-klm-000-7190" sets the product
defined instance identifier to "ser:abc-klm-000-7190".
-m productvendor
Sets the vendor of the product. For example, "stclient
-m Sun" sets the product vendor to "Sun".
-A platformarch
Sets the platform architecture that the product is run-
ning on. For example, "stclient -A sparc" sets the plat-
form architecture to "sparc"
-z container
Sets the container that the product is running on. For
example, "stclient -z "global zone"" sets the container
to "global zone".
-S source
Sets the source of this service tag, naming the entity
that created it.
-r rootdir
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.
OPERANDS
SunOS 5.11 Last change: 13 May 2008 3
System Administration Commands stclient(1M)
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 Ser-
vice 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 pro-
duct 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.
f Find. Finds and prints all the instance URNs of a given
product URN.
h Help. Displays the command options.
v Version. Displays the version number of the command.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
SunOS 5.11 Last change: 13 May 2008 4
System Administration Commands stclient(1M)
> 0 An error occurred.
EXAMPLES
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
SunOS 5.11 Last change: 13 May 2008 5
System Administration Commands stclient(1M)
The screen displays output similar to the following:
.
.
.
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:
urn:st:af15ee62-0bb3-ef2d-fa96-85a11996cc71
.
.
.
SunOS 5.11 Last change: 13 May 2008 6
System Administration Commands stclient(1M)
ENVIRONMENT VARIABLES
See environ(5)for descriptions of the following environment
variables that affect the execution of stclient: LANG,
LCAL, LCTYPE, LCMESAGES, and NLSPATH.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Availability SUNWservicetagu
Interface Stability Committed
SEE ALSO
in.stdiscover(1M), in.stlisten(1M)
SunOS 5.11 Last change: 13 May 2008 7
|