stclient - Service Tag Administration Program stclient



  • System Administration Commands					  stclient(1M)
    
    
    
    NAME
           stclient	- Service Tag Administration Program
    
    SYNOPSIS
           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
    
    
    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	inven-
           tory of the product instances installed in the machine. Each record has
           a  unique  product instance identifier which is generated when the ser-
           vice 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 dif-
           ferent 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 cre-
           ator of the service tag is authorized to	update or delete a service tag
           record.
    
    OPTIONS
           The following options are supported:
    
           -p product_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".
    
    
           -e product_version
    
    	   Sets	 the product version of	the service tag	to be added. For exam-
    	   ple,	"stclient -e 5.10" sets	the product version to "5.10".
    
    
           -t product_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".
    
    
           -i instance_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	gener-
    	   ation of the	instance ID is normally	left to	the stclient.
    
    
           -F product_parent_URN
    
    	   Sets	the Sun	product	unique identifier of parent product. For exam-
    	   ple,	 "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".
    
    
           -P product_parent
    
    	   Sets	 the parent product of the service tag.	For example, "stclient
    	   -P JES" sets	the product parent to "JES".
    
    
           -I product_defined_instance_id
    
    	   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".
    
    
           -m product_vendor
    
    	   Sets	the vendor of the product. For example,	"stclient -m Sun" sets
    	   the product vendor to "Sun".
    
    
           -A platform_arch
    
    	   Sets	 the platform architecture that	the product is running on. For
    	   example, "stclient -A sparc"	 sets  the  platform  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 root_dir
    
    	   Sets	 the  root  directory  where the command searches for the reg-
    	   istry.  The	command	 searches   /var/sadm/servicetag/registry   by
    	   default.  When  this	option is used,	the command looks for the Reg-
    	   istry  in  the  specified  root  directory,	 (for	example,   "-r
    	   /home/user1"	 searches  /home/user1/var/sadm/servicetag).  This  is
    	   typically used for testing.
    
    
    OPERANDS
       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 reg-
    	    istry 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 environmen-
    	    tal	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.
    
    
           > 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
    
    
    
    
           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>
    
    
    
    ENVIRONMENT VARIABLES
           See environ(5)for descriptions of the following	environment  variables
           that  affect the	execution of stclient: LANG, LC_ALL, LC_CTYPE, LC_MES-
           SAGES, and NLSPATH.
    
    ATTRIBUTES
           See attributes(5) for descriptions of the following attributes:
    
    
    
    
           +-----------------------------+------------------------------+
           |      ATTRIBUTE	TYPE	     |	     ATTRIBUTE VALUE	    |
           +-----------------------------+------------------------------+
           |Availability		     |system/management/service-tag |
           +-----------------------------+------------------------------+
           |Interface Stability	     |Committed			    |
           +-----------------------------+------------------------------+
    
    SEE ALSO
           in.stdiscover(1M), in.stlisten(1M)
    
    
    
    SunOS 5.11			  25 Oct 2010			  stclient(1M)
    


© Lightnetics 2024