1stclient(1M)            System Administration Commands            stclient(1M)
2
3
4

NAME

6       stclient - Service Tag Administration Program
7

SYNOPSIS

9       stclient -x | -E [-r root_dir]
10
11
12       stclient -a [-i instance_URN] -p product_name -e product_version
13            -t product_URN [-F parent_URN] -P product_parent
14            [-I product_defined_instance_id] -m product_vendor -A platform_arch
15            -z container -S source [-r root_dir]
16
17
18       stclient -u -i instance_URN -F parent_URN -I product_defined_instance_id
19            [-r root_dir]
20
21
22       stclient -d -i instance_URN [-r root_dir]
23
24
25       stclient -g -i instance_URN [-r root_dir]
26
27
28       stclient -f -t product_URN [-r root_dir]
29
30
31       stclient -h
32
33
34       stclient -v
35
36

DESCRIPTION

38       The stclient command displays, finds, adds, updates and deletes records
39       in  the  Service  Tag  registry.  The  registry  is  in  the  XML  file
40       /var/sadm/servicetag/registry/servicetag.xml,  and  contains the inven‐
41       tory of the product instances installed in the machine. Each record has
42       a  unique  product instance identifier which is generated when the ser‐
43       vice tag is added in the registry. This product instance identifier  is
44       used  as  a  key  when  finding,  updating  or deleting the service tag
45       records. The extract option prints out the  registry  contents  in  XML
46       format in stdout.
47
48
49       The  stclient  command  also  runs  in  interactive  mode. This mode is
50       invoked by running stclient without any parameters. A menu of  all  the
51       available options are displayed, and the user is prompted to enter dif‐
52       ferent parameters depending on the option chosen.
53
54
55       Any user can extract or get the contents  of  the  registry,  but  only
56       users  with  the appropriate privileges, the "svctag" user, or the cre‐
57       ator of the service tag is authorized to update or delete a service tag
58       record.
59

OPTIONS

61       The following options are supported:
62
63       -p product_name
64
65           Sets  the product name of the service tag to be added. For example,
66           "stclient -p "Solaris 10 Operating System"" sets the  product  name
67           to the "Solaris 10 Operating System".
68
69
70       -e product_version
71
72           Sets  the product version of the service tag to be added. For exam‐
73           ple, "stclient -r 5.10" sets the product version to "5.10".
74
75
76       -t product_URN
77
78           Sets the Sun product unique identifier of the  service  tag  to  be
79           added.  For example, "stclient -t urn:uuid:5005588c-36f3-11d6-9cec-
80           fc96f718e113"  sets  the   Sun   product   unique   identifier   to
81           "urn:uuid:5005588c-36f3-11d6-9cec-fc96f718e113".
82
83
84       -i instance_URN
85
86           Sets the product instance unique identifier of the service tag. For
87           example, "stclient  -i  3a444ab2-1dd2-11b2-a69d-830020782a6b"  sets
88           the       product      instance      unique      identifier      to
89           "3a444ab2-1dd2-11b2-a69d-830020782a6b" This field may also  be  set
90           when the service tag is added but is not typically used. The gener‐
91           ation of the instance ID is normally left to the stclient.
92
93
94       -F product_parent_URN
95
96           Sets the Sun product unique identifier of parent product. For exam‐
97           ple,  "stclient  -F  urn:uuid:5005588c-36f3-11d6-9cec-fc96f718e113"
98           sets the  Sun  product  unique  identifier  of  parent  product  to
99           "urn:uuid:5005588c-36f3-11d6-9cec-fc96f718e113".
100
101
102       -P product_parent
103
104           Sets  the parent product of the service tag. For example, "stclient
105           -P JES" sets the product parent to "JES".
106
107
108       -I product_defined_instance_id
109
110           Sets  the  product  defined  instance  identifier.   For   example,
111           "stclient   -I   ser:abc-klm-000-7190"  sets  the  product  defined
112           instance identifier to "ser:abc-klm-000-7190".
113
114
115       -m product_vendor
116
117           Sets the vendor of the product. For example, "stclient -m Sun" sets
118           the product vendor to "Sun".
119
120
121       -A platform_arch
122
123           Sets  the platform architecture that the product is running on. For
124           example, "stclient -A sparc"  sets  the  platform  architecture  to
125           "sparc"
126
127
128       -z container
129
130           Sets  the  container  that  the product is running on. For example,
131           "stclient -z "global zone"" sets the container to "global zone".
132
133
134       -S source
135
136           Sets the source of this service tag, naming the entity that created
137           it.
138
139
140       -r root_dir
141
142           Sets  the  root  directory  where the command searches for the reg‐
143           istry.  The  command  searches   /var/sadm/servicetag/registry   by
144           default.  When  this option is used, the command looks for the Reg‐
145           istry  in  the  specified  root  directory,   (for   example,   "-r
146           /home/user1"  searches  /home/user1/var/sadm/servicetag).  This  is
147           typically used for testing.
148
149

OPERANDS

151   Function Letters
152       The function portion of the key is specified by one  of  the  following
153       letters:
154
155       x    Extract.  Extracts and prints the contents of the Service Tag reg‐
156            istry in XML format. An alternate root directory may be  specified
157            for testing purposes.
158
159
160       a    Add. Adds a service tag in the registry. A unique product instance
161            identifier may be supplied and is automatically generated  if  not
162            provided.  This  field  is  returned  by the command. The required
163            fields for add are product name,  product  version,  product  URN,
164            product  parent,  vendor,  platform  architecture,  container  and
165            source.
166
167
168       u    Update. Updates a service tag in the registry  using  the  product
169            instance  URN  as  the  key.  The  parent  URN and product defined
170            instance id fields can be updated.
171
172
173       d    Delete. Deletes a service tag in the registry  using  the  product
174            instance URN as the key.
175
176
177       E    Extract Environment. Enumerates to standard output the environmen‐
178            tal or "agent"' information associated with the registered Service
179            Tags on this system.
180
181
182       g    Get.  Gets  and  prints  a service tag from the registry using the
183            product instance URN as the key.
184
185
186       f    Find. Finds and prints all the instance URNs of  a  given  product
187            URN.
188
189
190       h    Help. Displays the command options.
191
192
193       v    Version. Displays the version number of the command.
194
195

EXIT STATUS

197       The following exit values are returned:
198
199       0      Successful completion.
200
201
202       > 0    An error occurred.
203
204

EXAMPLES

206       Example 1 Adding a Service Tag in the Registry
207
208
209       To add a service tag, enter the following:
210
211
212         # stclient -a -p "Java Enterprise Web Server 6.0" -e 6.0 \
213            -t urn:uuid:f2b8b59c-6eba-11d7-986f-9f5d47ec72fe  \
214            -P Java Enterprise Server -m Sun -A sparc -z global -S patch
215
216
217
218
219       The screen displays the following:
220
221
222         Java Enterprise Web Server 6.0 6.0 added
223         Product instance URN=urn:st:7fc61914-1dd2-11b2-b992-830020782a6b
224
225
226
227       Example 2 Updating a Service Tag in the Registry
228
229
230       To update a service tag, enter the following:
231
232
233         # stclient -u -i 7fc61914-1dd2-11b2-b992-830020782a6b \
234            -I urn:st:product.defined.id
235
236
237
238
239       The screen displays the following:
240
241         Service tag updated
242
243
244
245       Example 3 Extracting a Service Tag Registry
246
247
248       To extract a service tag, enter the following:
249
250
251         # stclient -x
252
253
254
255
256       The screen displays output similar to the following:
257
258
259         <?xml version="1.0" encoding="UTF-8"?>
260         <registry urn="urn:uuid:1234ab-00e1-11b3-98737646873" version="1.0">
261            <service_tag>
262           .
263           .
264           .
265            </service_tag>
266          </registry>
267
268
269
270       Example 4 Finding all product instances
271
272
273       To find all product instances, enter the following:
274
275
276         # stclient -f -t urn:uuid:f2b8b59c-6eba-11d7-986f-9f5d47ec72fe \
277            fc61914-1dd2-11b2-b992-830020782a6b
278
279
280
281       Example 5 Listing the Environmental Information
282
283
284       To  list  the  environmental information associated with the registered
285       Service Tags on this system, enter the following:
286
287
288         # stclient -E
289
290
291
292
293       The screen displays output similar to the following:
294
295
296         <?xml version="1.0" encoding="UTF-8"?>
297         <agent>
298            <agent_urn>urn:st:af15ee62-0bb3-ef2d-fa96-85a11996cc71</agent_urn>
299           .
300           .
301           .
302            </system_info>
303          </agent>
304
305
306

ENVIRONMENT VARIABLES

308       See environ(5)for descriptions of the following  environment  variables
309       that  affect the execution of stclient: LANG, LC_ALL, LC_CTYPE, LC_MES‐
310       SAGES, and NLSPATH.
311

ATTRIBUTES

313       See attributes(5) for descriptions of the following attributes:
314
315
316
317
318       ┌─────────────────────────────┬─────────────────────────────┐
319       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
320       ├─────────────────────────────┼─────────────────────────────┤
321       │Availability                 │SUNWservicetagu              │
322       ├─────────────────────────────┼─────────────────────────────┤
323       │Interface Stability          │Committed                    │
324       └─────────────────────────────┴─────────────────────────────┘
325

SEE ALSO

327       in.stdiscover(1M), in.stlisten(1M)
328
329
330
331SunOS 5.11                        24 Aug 2009                     stclient(1M)
Impressum