croinfo man page on SunOS

Man page or keyword search:  
man Server   20652 pages
apropos Keyword Search (all sections)
Output format
SunOS logo
[printable version]

croinfo(1M)		System Administration Commands		   croinfo(1M)

NAME
       croinfo,	 diskinfo  -  query  and display information about 1) chassis,
       receptacle, and occupants or 2) disk occupants of bay receptacles

SYNOPSIS
       croinfo [-h] [-v] [-I cro_db] [-o fields] [-O fields]
	       [-P product-id] [-C chassis-id] [-A alias-id]
	       [-R receptacle-name] [-T receptacle-type] [-t occupant-type]
	       [-D devchassis-path] [-d occupant-devices] [-p occupant-paths]
	       [-c occupant-compdev] [-i occupant-devid] [-m occupant-mfg]
	       [-e occupant-model] [-n occupant-part] [-s occupant-serial]
	       [-f occupant-firm] [-1 occupant-misc-1] [-2 occupant-misc-2]
	       [-3 occupant-misc-3]

       diskinfo [-h] [-v] [-I cro_db] [-o fields] [-O fields]
	       [-P product-id] [-C chassis-id] [-A alias-id]
	       [-R receptacle-name] [-T receptacle-type] [-t occupant-type]
	       [-D devchassis-path] [-d occupant-devices] [-p occupant-paths]
	       [-c occupant-compdev] [-i occupant-devid] [-m occupant-mfg]
	       [-e occupant-model] [-n occupant-part] [-s occupant-serial]
	       [-f occupant-firm] [-1 occupant-misc-1] [-2 occupant-misc-2]
	       [-3 occupant-misc-3]

       croinfo -?

       diskinfo -?

DESCRIPTION
       The diskinfo and croinfo utility share the same binary  executable.  At
       runtime,	 the  utility  checks  to  see how it was invoked, and adjusts
       defaults.

       The croinfo utility allows users to query and display specific  aspects
       of  a  system's	configuration. Queries are performed against a record-
       oriented dataset that captures the relationship between physical	 loca‐
       tion and various aspects of the device currently at that physical loca‐
       tion. This relationship is expressed in terms of	 Chassis,  Receptacle,
       and Occupant (thus the cro prefix).

       Records	in  a  CRO dataset are composed of multiple, named fields with
       each record having a potentially unique field value.  An	 angle-bracket
       reference,  such	 as product-id, is referring to a specific field-name.
       For a given record, a  field  value  is	either	undefined  (empty)  or
       defined	with a set of indexed string values. Some defined field values
       have just one string value, while others can have multiple string  val‐
       ues.

       Each  field-name defined is associated with a separate field-char char‐
       acter. By convention, uppercase field-char  characters  are  associated
       for chassis and receptacle information fields, and lowercase field-char
       characters are associated with occupant information  fields.  For  each
       field-char character, a separate -field-char field-name-RE flag regular
       expression filter option is provided. This allows the user to customize
       queries to display information about specific aspects of the configura‐
       tion. Records that match	 all  regular  expressions  are	 selected,  in
       dataset	order, for display. For multiple string values, only one index
       value needs to match for the field to match.

       By default, only a minimal number of default  output  fields  are  dis‐
       played.	You  can override the default with either -o fields for human-
       readable output or with -O fields for parseable output. In both	cases,
       output  fields  can  be	specified  using  either the short-hand field-
       char[...] notation or in the more  descriptive  field-name[,...]	 nota‐
       tion.

       For  human-readable  use,  by  using the -o fields option, the user can
       override the default fields, and output any fields,  in	the  specified
       order,  in  a  column-aligned  whitespace separated format. In general,
       output will be one line of output per matching  record  with  undefined
       (empty)	field-name  values  displayed  as a hyphen (—). If, however, a
       displayed record has a multiple string value field, then multiple lines
       of  output  are	produced with any secondary non-multiple string values
       fields showing a colon (:).

       For scripting, by using the -O fields option, the user can override the
       default output fields and output any fields, in the specified order, in
       a parseable colon-separated format with whitespace removed  and	column
       headers	suppressed.  Output  will  be  one line of output per matching
       record with undefined  (empty)  field-name  values  displayed  with  no
       value.  If  a  displayed	 record field-name has a multiple string value
       field, then all the values are concatenated, separated by a comma.  Any
       occurrence  of  a colon or a comma in a value is escaped with a leading
       backslash (\fR).	 To make scripts more legible, use of  the  -O	field-
       name[,...]' notation is encouraged.

       The -o and -O options are mutually exclusive.

       If  the	-h  option is used, or scripting output format is requested by
       using -o, the column headers for output fields are suppressed.

       A Chassis is identified by a specific product-id	 and  chassis-id.  The
       product-id  relates  to a specific chassis-level product, like a system
       chassis Sun-Fire-X4200-M2 or a storage chassis SUN-Storage-J4410. For a
       given product-id value, the chassis-id defines a unique serial number.

       A  specific  product-id.chassis-id  combination	can  have an "managed"
       location-oriented  alias-id  defined  by	  the	administrator,	 using
       fmadm(1M)  that	provides  installation-specific	 location  information
       about where a chassis is physically located. This  might	 include  such
       information as building, room, rack, and U-number range within a rack.

       In  addition  to	 the  managed location-oriented alias-id defined using
       fmadm(1M), system chassis always have one well-known alias  called  SYS
       that  can be used to identify receptacles that are internal to the sys‐
       tem chassis.

       Within a chassis, each receptacle has  a	 unique	 receptacle-name  that
       should  match the physical silk-screen label designation for the recep‐
       tacle. Each receptacle also has a receptacle-type, which	 helps	define
       acceptable occupant-types.

       When  a	receptacle is occupied, use the -f flag definitions for avail‐
       able occupant-information. Of particular interest is the	 -c  occupant-
       compdev	occupant information: it describes the common component of the
       public /dev name associated with the occupant device. For  disks,  this
       is the whole-disk c#t#d# name.

       The  CRO	 dataset  order	 is associated with the devchassis-path of the
       record, which corresponds to the /dev/chassis name space maintained  by
       devchassisd(1M). That ordering places records associated with the well-
       known SYS internal alias first, and records with	 BOOT  receptacle-name
       first in SYS. This is done to ensure that, when applicable, information
       about the typical boot device is provided first.

       For croinfo, the default output is  in  -o  Dtc	format,	 and  all  CRO
       records are shown.

       For  diskinfo,  the  default  output  is	 in -o Dc format, and a -T bay
       receptacle-type filter is applied. The meanings of the  occupant-misc-#
       fields  also  take on a disk-specific interpretation:  misc-1 is capac‐
       ity, and misc-2 is target-port information. These  defaults  allow  the
       diskinfo	 command to query the relationship between chassis, bay recep‐
       tacles, and their disk occupants, while ignoring other CRO information.

OPTIONS
       For each record field-name defined, a separate -field-char  field-name-
       RE  flag regular expression filter can be specified. For a given field-
       name, if no specific -field-char field-name-RE filter is	 defined,  all
       CRO records match.

       This  allows the user to customize queries to display information about
       specific aspects of the configuration. CRO records that	match  all  of
       the  specified field-name regular expressions (as in regex(3C)) will be
       selected for display, with specific fields output controlled  by	 means
       of -o, -O, or the default.

       -P product-id

	   The	product-id  specifies  the product identifier of an enumerated
	   chassis. The product-id might be exposed in the  /dev/chassis  name
	   space.  For	storage	 products  that	 do  not  have	an established
	   fmadm(1M) managed  alias-id,	 the  product-id  is  visible  in  the
	   devchassis(7FS) /dev/chassis name space.

	   Example system product-id value: Sun-Fire-X4200-M2

	   Example storage product-id value: SUN-Storage-J4410

       -C chassis-id

	   The	chassis-id  specifies  the serial number of a product chassis.
	   The chassis-id might be exposed in the /dev/chassis name space. For
	   storage  products that do not have an established fmadm(1M) managed
	   alias-id,  the  product-id  is  visible  in	 the   devchassis(7FS)
	   /dev/chassis name space.

	   Example chassis-id value: 0818QAJ002

       -A alias-id

	   An  alias-id	 value	can  be the well-known alias value of SYS, for
	   system internal devices. In addition, an alias-id value  can	 be  a
	   managed  alias,  defined  by the administrator using fmadm(1M). The
	   intended use of a managed alias is to define the physical  location
	   of  the  product-id.chassis-id.  The	 alias-id  is  exposed	in the
	   /dev/chassis name space.

	   Example well-known alias-id value: SYS

	   Example managed alias-id value: RACK29.U01-04

       -R receptacle-name

	   For a specific product-id, the unique receptacle-name defines loca‐
	   tion	 of  a	specific  receptacle in a chassis. The receptacle-name
	   should be identical to a silk-screen label on the physical chassis,
	   and	should	also  match product documentation. The receptacle-name
	   can have multiple path components, such as SYS/HD0. The receptacle-
	   name is exposed in the /dev/chassis name space.

	   Example receptacle-name value: SYS/HD0

       -T receptacle-type

	   Example receptacle-type value: bay

       -t occupant-type

	   A receptacle without an occupant has an undefined (empty) occupant-
	   type value, shown as a hyphen (—).

	   Example occupant-type value: disk

       -D devchassis-path

	   Example devchassis-path value: /dev/chassis/SYS/HD0/disk

       -d occupant-devices

	   A receptacle without an occupant has an undefined (empty) occupant-
	   devices value, shown as a hyphen (—).

	   Example occupant-devices value:

	     /devices/scsi_vhci/disk@g5000c500101ba0a3

       -p occupant-paths

	   A receptacle without an occupant has an undefined (empty) occupant-
	   paths value, shown as a hyphen (—).

	   Example occupant-paths value:

	     devices/pci@0,0/pci10de,5d@d/pci11f8,8001@0/iport@f/disk@w5000c500101ba0a1,0

       -c occupant-compdev

	   A receptacle without an occupant has an undefined (empty) occupant-
	   compdev value, shown as a hyphen (—).

	   Example occupant-compdev value: c0t5000C500101BA0A3d0

       -i occupant-devid

	   A receptacle without an occupant has an undefined (empty) occupant-
	   devid value, shown as a hyphen (—).

	   Example occupant-devid value: id1,sd@n5000c500101ba0a3

       -m occupant-mfg

	   A receptacle without an occupant has an undefined (empty) occupant-
	   mfg value, shown as a hyphen (—).

	   Example occupant-mfg value: SEAGATE

       -e occupant-model

	   A receptacle without an occupant has an undefined (empty) occupant-
	   model, shown as a hyphen (—).

	   Example occupant-model value: ST32000SSSUN2.0T

       -n occupant-part

	   A receptacle without an occupant has an undefined (empty) occupant-
	   part value, shown as a hyphen (—).

	   Example occupant-part value: SEAGATE-ST32000SSSUN2.0T

       -s occupant-serial

	   A receptacle without an occupant has an undefined (empty) occupant-
	   serial value, shown as a hyphen (—).

	   Example occupant-serial value: 000949L09C8L________9WM09C8L

       -f occupant-firm

	   A receptacle without an occupant has an undefined (empty) occupant-
	   firm value, shown as a hyphen (—).

	   Example occupant-firm value: 0313

       -1 occupant-misc-1

	   A receptacle without an occupant has an undefined (empty) occupant-
	   misc-1 value, shown as a hyphen (—).

       -2 occupant-misc-2

	   A receptacle without an occupant has an undefined (empty) occupant-
	   misc-2 value, shown as a hyphen (—).

       -3 occupant-misc-3

	   A receptacle without an occupant has an undefined (empty) occupant-
	   misc-3 value, shown as a hyphen (—).

       -?

	   Display usage information.

   Output field-name Control Options
       -o fields

	   Output specified fields, in order, in human-readable format.

	   For croinfo, default output is in  -o  Dtc  format.	For  diskinfo,
	   default output is in -O Dc format.

       -O fields

	   Output specified fields, in order, in parseable format.

       -h

	   Do not output field-name column headers

       -v

	   Display verbose header that includes various information about when
	   the CRO dataset was created. This option is of particular use  with
	   -I  and  is	used  to  specify  a  non-standard  source for the CRO
	   dataset.

   Dataset Selection Option
       -I cro_db

	   Data file from which to obtain CRO dataset information.

EXAMPLES
       In some of the following examples, example output wraps in an  80-char‐
       acter-wide display.

       Example 1 Determining Where a Disk is Located

       The following command determines where a disk is located:

	 # croinfo -c c0t5000C500101BA0A3d0
	 D:devchassis-path			  t:occupant-type
	 ---------------------------------------  ---------------
	 /dev/chassis/RACK29.U01-04/DISK_00/disk  disk

	 c:occupant-compdev
	 ------------------
	 c0t5000C500101BA0A3d0

       Example 2 Reporting Internal Disks

       The following command reports the receptacle-name and the occupant-com‐
       pdev of internal disks, that is, disks that  are	 associated  with  the
       well-known SYS alias.

	 # diskinfo -A SYS -o Rc
	 R:receptacle-name  c:occupant-compdev
	 -----------------  ------------------
	 SYS/HD0	    c8t0d0
	 SYS/HD1	    c8t1d0
	 SYS/HD2	    -
	 SYS/HD3	    -

       Note that the SYS/HD2 and SYS/HD3 receptacles are empty.

       The same command, in scripting output mode, would produce:

	 # diskinfo -A SYS -O receptacle-name,occupant-compdev
	 SYS/HD0:c8t0d0
	 SYS/HD1:c8t1d0
	 SYS/HD2:
	 SYS/HD3:

       Example 3 Reporting Disks in a Specific Enclosure

       The  following  command	reports	 all the disks within a chassis with a
       specific product-id and chassis-id value.

	 # diskinfo -P SUN-Storage-J4410 -C SUN-Storage-J4410 -o Rc
	 R:receptacle-name  c:occupant-compdev
	 -----------------  ---------------------
	 DISK_00	    c0t5000C500101BA0A3d0
	 DISK_01	    c0t5000C500101B95BBd0
	 DISK_02	    -

       Example 4 Reporting Physical Path Information

       The following command reports physical path information for a  specific
       disk.

	 # croinfo -c c0t5000C500101BA0A3d0 -o cp
	 c:occupant-compdev
	 ------------------
	 c0t5000C500101BA0A3d0

	 p:occupant-paths
	 --------------------------------------------------
	 /devices/pci@0,0/pci10de,5d@d/pci11f8,8001@0/iport@f/disk@w5000c500101ba0a1,0
	 /devices/pci@7b,0/pci10de,5d@d/pci11f8,8001@0/iport@f/disk@w5000c500101ba0a2,0

       Note that occupant-paths has multiple string values.

       Example 5 Making Inventory of Disks

       The  following  example reports how many of a specific type of disk are
       available using occupant-part.

	 # for i in `croinfo -h -o n  | sort -u`
	 > do
	 > echo $i "> done
	 SEAGATE-ST330055SSUN300G		3
	 SEAGATE-ST330056SSUN300G	       19
	 SEAGATE-ST345056SSUN450G		5

       Example 6 Locating a Specific Type of Disk

       The following command reports  where  disks  of	a  specific  type  are
       located,	 what  their  ctd  name is (by means of occupant-compdev), and
       what firmware level they are at.

	 # croinfo -n SEAGATE-ST330055SSUN300G -o Dcf
	 D:Devchassis					  c:component
	 -----------------------------------------------  ---------------------
	 /dev/chassis/RACK29.U29-32/SCSI_Device__11/disk  c0t5000C50007DD49F7d0
	 /dev/chassis/RACK29.U33-36/SCSI_Device__18/disk  c0t5000C50008F7FB4Fd0
	 /dev/chassis/RACK29.U33-36/SCSI_Device__19/disk  c0t5000C50007DD412Fd0

	 f:firm
	 ------
	 0892
	 0892
	 0892

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌─────────────────────────────┬─────────────────────────────┐
       │      ATTRIBUTE TYPE	     │	    ATTRIBUTE VALUE	   │
       ├─────────────────────────────┼─────────────────────────────┤
       │Availability		     │SUNWcs			   │
       ├─────────────────────────────┼─────────────────────────────┤
       │Interface Stability	     │See below			   │
       └─────────────────────────────┴─────────────────────────────┘

       The interface stability of  croinfo  and	 diskinfo  is  Committed.  The
       interface stability of command output is Not-an-Interface.

SEE ALSO
       devchassisd(1M), fmadm(1M), fmd(1M), attributes(5), devchassis(7FS)

       The SCSI Storage Interfaces committee website, http://www.t10.org

       SCSI  Primary Commands-4, SPC4; SCSI Enclosure Services-2; SES2, Serial
       Attached SCSI-2, SAS2

NOTES
       croinfo representation depends on the ability of fmd(1M)	 to  enumerate
       system  topology	 and accurately represent associated chassis, recepta‐
       cles, and occupants. These dependencies might  extend  through  fmd(1M)
       and  require that connected hardware, and its associated firmware, com‐
       ply with specific standards. For disk bays, this requires that  storage
       chassis	behave	in  a T10 standards-compliant (SPC4 and SES2) fashion.
       Storage chassis that do not  respond  appropriately  might  not	report
       chassis, bays, or disk nodes correctly. Specifically, diskinfo requires
       that chassis support SES diagnostic page 0xa (Additional	 Element  Sta‐
       tus)  and set the Element Index Present (EIP) bit to 1. Enclosures that
       do not meet this criterion will not be fully enumerated, and thus  will
       not be properly represented.

SunOS 5.10			  12 May 2011			   croinfo(1M)
[top]

List of man pages available for SunOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net