croinfo, diskinfo - query and display information about 1) chassis, receptacle, and occupants or 2) disk occupants of bay receptacles
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 -?
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 location and various aspects of the device currently at that physical location. 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 values.
Each field-name defined is associated with a separate field-char character. 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 configuration. 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 displayed. 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[,...] notation.
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 semicolon. Any occurrence of a colon or a semicolon in a value is escaped with a leading backslash (\). 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 system chassis.
Within a chassis, each receptacle has a unique receptacle-name that should match the physical silk-screen label designation for the receptacle. Each receptacle also has a receptacle-type, which helps define acceptable occupant-types .
When a receptacle is occupied, use the –f flag definitions for available 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 capacity, and misc-2 is target-port information. These defaults allow the diskinfo command to query the relationship between chassis, bay receptacles, and their disk occupants, while ignoring other CRO information.
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.
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
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
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
For a specific product-id, the unique receptacle-name defines location 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
Example receptacle-type value: bay
A receptacle without an occupant has an undefined (empty) occupant-type value, shown as a hyphen (—).
Example occupant-type value: disk
Example devchassis-path value: /dev/chassis/SYS/HD0/disk
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
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
A receptacle without an occupant has an undefined (empty) occupant-compdev value, shown as a hyphen (—).
Example occupant-compdev value: c0t5000C500101BA0A3d0
A receptacle without an occupant has an undefined (empty) occupant-devid value, shown as a hyphen (—).
Example occupant-devid value: id1,sd@n5000c500101ba0a3
A receptacle without an occupant has an undefined (empty) occupant-mfg value, shown as a hyphen (—).
Example occupant-mfg value: SEAGATE
A receptacle without an occupant has an undefined (empty) occupant-model, shown as a hyphen (—).
Example occupant-model value: ST32000SSSUN2.0T
A receptacle without an occupant has an undefined (empty) occupant-part value, shown as a hyphen (—).
Example occupant-part value: SEAGATE-ST32000SSSUN2.0T
A receptacle without an occupant has an undefined (empty) occupant-serial value, shown as a hyphen (—).
Example occupant-serial value: 000949L09C8L________9WM09C8L
A receptacle without an occupant has an undefined (empty) occupant-firm value, shown as a hyphen (—).
Example occupant-firm value: 0313
A receptacle without an occupant has an undefined (empty) occupant-misc-1 value, shown as a hyphen (—).
A receptacle without an occupant has an undefined (empty) occupant-misc-2 value, shown as a hyphen (—).
A receptacle without an occupant has an undefined (empty) occupant-misc-3 value, shown as a hyphen (—).
Display usage information.
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.
Output specified fields, in order, in parseable format.
Do not output field-name column headers
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.
Data file from which to obtain CRO dataset information.
In some of the following examples, example output wraps in an 80–character-wide display.
Example 1 Determining Where a Disk is LocatedThe 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 ------------------ c0t5000C500101BA0A3d0Example 2 Reporting Internal Disks
The following command reports the receptacle-name and the occupant-compdev 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 DisksThe 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 "\t\c";croinfo -h -n $i | wc -l > done SEAGATE-ST330055SSUN300G 3 SEAGATE-ST330056SSUN300G 19 SEAGATE-ST345056SSUN450G 5Example 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
See attributes(5) for descriptions of the following attributes:
|
The interface stability of croinfo and diskinfo is Committed. The interface stability of command output is Not-an-Interface.
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
croinfo representation depends on the ability of fmd(1M) to enumerate system topology and accurately represent associated chassis, receptacles, and occupants. These dependencies might extend through fmd(1M) and require that connected hardware, and its associated firmware, comply 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 Status) 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.