User Commands                                            sneep(1)



NAME
     sneep - Serial Number in EEPROM
     Save and retrieve Chassis Serial Number  ( CSN )
     and other user-defined information using system EEPROM.

SYNOPSIS
     sneep [-aeFhTvV] [-t tag[,tag...]] [-s setting ] \
          [-P ds1:ds2...] [-d default] [-o separator]
     sneep [start | stop | restart ]
     setcsn -c serialnumber
     showplatform -p csn

DESCRIPTION
     Sneep uses the  system  EEPROM  to  save  and  retrieve  the
     Chassis  Serial Number and other important data on all known
     Sun Solaris systems.

     Without sneep, only certain Sun platforms which support  the
     "setcsn" and "showplatform" programs (from System Management
     Service [SMS] 1.4) have a mechanism to maintain a  software-
     accessible serial number.
     Sneep has a limited emulation of "showplatform" and "setcsn"
     , and does not provide any of the other functionality of the
     actual showplatform and setcsn programs.

     To promote configuration consistency and  minimize  adminis-
     trative work, sneep can also reference and update any avail-
     able "explorer" and "CST"  (Configuration  Service  Tracker)
     configuration files, and will create a special Serial track-
     ing event in the CST event history.

     sneep logs all important changes or problems to syslogd  for
     auditing purposes.

OPTIONS
     The following options are supported:

     -a
               All sources: show results from all  data  sources.
               Implies -v .

     -c serial
               (setcsn only) Set serial number to <serial>

     -d defaultval
               Specify  the  default  value   returned   if   the
               requested  information  is  not  found.   Standard
               default is "unknown"

     -e
               Erase. When used in combination  with  options  -T
               and  -v,  output  the  sneep commands necessary to






               erase selected tags and values.
               This option has no effect  except  in  conjunction
               with -T and -v.

     -F
               Force.  Override safety limits if program  refuses
               to allow you to change a setting.
               NOTE: Use this only if you are  certain  that  the
               true  limit is greater than the conservative esti-
               mate which the program uses.  Exceeding  the  true
               limits  of  the nvram can have severe consequences
               including failure to boot.

     -h
               This help message

     -o separator
               Output Field  Separator.   Inserted  between  each
               value printed when more than one tag is specified.
               See option -t .
               Default separator is comma.

     -p csn
               (showplatform only) Print serial number.
               <csn> parameter must be literally "csn" .

     -P ds1:ds2...
               Set  Priority  of  data  sources.  Colon-separated
               list.   Sequence  used  for data sources which can
               also be controlled by environment variable  SNEEP-
               PATH.
               For   retrieving   data    only.     Default    is
               "fruid:sms:eeprom:backup:explorer:cst"

     -s setting
               Associate <setting> with EEPROM identifier tag.
               In normal usage,  <setting> is a Serial Number.

     -t tag[,tag...]
               Use  <tag>  as  EEPROM  identifier  to  store   or
               retrieve values.
               When storing a value, only one tag may  be  speci-
               fied.
               Default tag is "ChassisSerialNumber".

               Tags "serial", "csn", and "CSN" are equivalent  to
               "ChassisSerialNumber".
               Pseudo-tags "hostname" and "hostid" can be used to
               retrieve  the  Operating  System  values  for host
               (domain) name and host identifier.  Use  of  these
               two   tags  to  store  information  in  eeprom  is
               discouraged,  as  the  information  can  only   be






               retrieved  from the Operating System, and not from
               eeprom.


     -T
               Report tags as well  as  values.  Normally,  sneep
               reports only values.  If the option -t is not used
               to select particular  tags,  all  tags  and  their
               values are reported.  Ignores option -a .

               The default output format has the tag  followed  a
               tab,  followed by the corresponding value enclosed
               in  quotation  marks.  Each  tag/value  pair    is
               presented on a separate line.

               If -v option is used  with  -T,  the  ouput  is  a
               series of commands suitable for setting the tags.
               This is intended to simplify recovery of data.

               If -e option is used with -T and -v, the ouput  is
               a  series  of  commands  suitable  for erasing the
               tags.

     -v
               Verbose: show the source of  the  reported  value.
               With  -T,  show  commands,  do  not  show the data
               source.

     -V
               Print version  information.   Please  report  this
               information  any time you request help from sneep-
               support@sun.com

     start | restart
               Perform data consistency checks, logging  messages
               if  the Chassis Serial Number in EEPROM is missing
               or inconsistent  with  any  other  available  data
               sources.
               The start option is used automatically by  default
               at  system startup, and is not intended for use at
               any other time.

               If the serial number is present in the eeprom, but
               is  not present in the sneep backup file, then all
               of the sneep settings in the eeprom will  be  used
               to automatically correct the backup file and other
               sources.  Any settings found only  in  the  backup
               file will remain unchanged.

               If the serial number is missing from  the  eeprom,
               but  is  present  in  the  backup file, and if the
               backup file is the correct  one  for  the  current






               system,  all of the settings from the backup which
               are not already in the  eeprom  will  be  used  to
               correct the eeprom and other sources.

     stop
               Ignored. Included for completeness.

OPERANDS
     tag
               Identifier used to save or retrieve a value.  Does
               not  have  to  be  supplied  in  normal  usage for
               Chassis Serial Number.

               Only a few special characters are permitted in the
               tag.  These characters are @ # _ + = -

     setting
               The value to be stored in the EEPROM.  It may  not
               contain  quotation  marks  or control characters (
               including newline ).  If the Chassis Serial Number
               is  being  set,  the  setting will be converted to
               upper case, and will be  checked  for  length  and
               content.

     ds1:ds2...
               Data Source (n).
                     e.g. eeprom:backup:explorer:cst...
               A colon-separated sequence of places  which  sneep
               understands  as sources of data. When requesting a
               value for a tag, sneep searches them in the  given
               sequence,  returning  the  first  value found. The
               default  list  is  arranged  to  search  the  most
               authoritative sources first.

NOTES
     Superuser privilege  is  required  to  save  information  in
     EEPROM  and  in the explorer and CST configuration files. It
     is likely that any user can  use  sneep  to  retrieve  data,
     although   some  sources  (like  SMS)  may  require  special
     privileges.

     Serial numbers are stored in upper case only.  This  can  be
     overridden  if  necessary,  but it will be incompatible with
     serial number data used by Sun and may fail to provide  full
     value.  Values for other tags are left unchanged.

EXAMPLES
     Save  serial number in EEPROM,  updating  explorer  and  CST
     configuration files.
               # sneep -s 1234abcd
               #







     Print previously saved serial number:
               $ sneep
               1234ABCD
               $

     Save asset data in EEPROM :
               # sneep -t ASSETTAG -s Asset1234

     Print value for ASSETTAG :
               $ sneep -t ASSETTAG
               Asset1234

     Show Serial number using showplatform format
               $ showplatform -p csn
                    CSN:
                    ====
                    Chassis Serial Number: 1234ABCD

     Show all tags and values :
               $ sneep -T
               ChassisSerialNumber "1234ABCD"
               ASSETTAG "Asset1234"

     Show Inventory data as comma-separated list
               $ sneep -t hostname,hostid,serial,ASSETTAG
               MyHostname,8000008,1234ABCD,Asset1234

ENVIRONMENT
     The following environment variables permit the user to over-
     ride defaults:

     SNEEPPATH
          The priority search path for data sources, like  option
          -P.
          Can also be set permanently in the sneep backup file.

     SNEEP_SYSLOG
          The syslog facility.priority to  override  the  default
          "daemon.notice".
          Can also be set permanently in the sneep backup file.

     FORCE_UCASE
          If "false", do not force serial  numbers  to  be  upper
          case.   Serial  numbers  containing  lower  case may be
          incompatible to some degree with internal Sun tools.

EXIT STATUS
     0 indicates normal or successful operation.
     1 indicates an error in usage, or an  inability  to  perform
     the   requested   action;   e.g.   because  of  insufficient
     privilege.







FILES
     /etc/default/SUNWsneep
          Backup  file  containing  all  tags  and  settings  for
          recovery  of eeprom, as well as customized default set-
          tings for syslog and priority search path.  Format  for
          the customized default settings:
               sneep<space>syslog<tab><facility.priority>
               sneep<space>path<tab><ds1:ds2:...dsn>

SEE ALSO
     eeprom(1M), syslogd(1M), logger(1), explorer(1M),
     Sneep User Guide, Configuration Service Tracker

SUPPORT
     To report  problems,  request  enhancements,  or  contribute
     helpful information regarding sneep, please send email to

          sneep-support@sun.com

     If you report a problem, please include the version informa-
     tion from sneep -V .