JavaScript is required to for searching.
跳过导航链接
退出打印视图
手册页第 1M 部分:系统管理命令     Oracle Solaris 11.1 Information Library (简体中文)
为本文档评分
search filter icon
search icon

文档信息

前言

简介

System Administration Commands-第 1 单元

6to4relay(1M)

acct(1M)

acctadm(1M)

acctcms(1M)

acctcon1(1M)

acctcon(1M)

acctcon2(1M)

acctdisk(1M)

acctdusg(1M)

acctmerg(1M)

accton(1M)

acctprc1(1M)

acctprc(1M)

acctprc2(1M)

acctsh(1M)

acctwtmp(1M)

acpihpd(1M)

adbgen(1M)

add_allocatable(1M)

addbadsec(1M)

add_drv(1M)

aimanifest(1M)

arp(1M)

asradm(1M)

asr-notify(1M)

atohexlabel(1M)

audit(1M)

auditconfig(1M)

auditd(1M)

auditrecord(1M)

auditreduce(1M)

auditstat(1M)

audit_warn(1M)

automount(1M)

automountd(1M)

autopush(1M)

bart(1M)

beadm(1M)

boot(1M)

bootadm(1M)

bootconfchk(1M)

bootparamd(1M)

busstat(1M)

captoinfo(1M)

catman(1M)

cfgadm(1M)

cfgadm_ac(1M)

cfgadm_cardbus(1M)

cfgadm_fp(1M)

cfgadm_ib(1M)

cfgadm_pci(1M)

cfgadm_sata(1M)

cfgadm_sbd(1M)

cfgadm_scsi(1M)

cfgadm_sdcard(1M)

cfgadm_shp(1M)

cfgadm_sysctrl(1M)

cfgadm_usb(1M)

chargefee(1M)

chat(1M)

check-hostname(1M)

check-permissions(1M)

chk_encodings(1M)

chroot(1M)

cimworkshop(1M)

ckpacct(1M)

clear_locks(1M)

clinfo(1M)

closewtmp(1M)

clri(1M)

comsat(1M)

configCCR(1M)

consadm(1m)

console-reset(1M)

coreadm(1M)

cpustat(1M)

croinfo(1M)

cron(1M)

cryptoadm(1M)

datadm(1M)

dcopy(1M)

dcs(1M)

dd(1M)

ddu(1M)

ddu-text(1M)

devchassisd(1M)

devfsadm(1M)

devfsadmd(1M)

device_allocate(1M)

device_remap(1M)

devinfo(1M)

devlinks(1M)

devnm(1M)

devprop(1M)

df(1M)

dfmounts(1M)

dfmounts_nfs(1M)

dfshares(1M)

dfshares_nfs(1M)

df_ufs(1M)

dhcpagent(1M)

dhcpconfig(1M)

dhcpmgr(1M)

dhtadm(1M)

dig(1M)

directoryserver(1M)

diskinfo(1M)

disks(1M)

diskscan(1M)

dispadmin(1M)

distro_const(1M)

dladm(1M)

dlmgmtd(1M)

dlstat(1M)

dmesg(1M)

dminfo(1M)

dns-sd(1M)

dnssec-dsfromkey(1M)

dnssec-keyfromlabel(1M)

dnssec-keygen(1M)

dnssec-makekeyset(1M)

dnssec-signkey(1M)

dnssec-signzone(1M)

dodisk(1M)

domainname(1M)

drd(1M)

drvconfig(1M)

dsbitmap(1M)

dscfg(1M)

dscfgadm(1M)

dscfglockd(1M)

dsstat(1M)

dsvclockd(1M)

dtrace(1M)

dumpadm(1M)

editmap(1M)

edquota(1M)

eeprom(1M)

efdaemon(1M)

embedded_su(1M)

emCCR(1M)

emocmrsp(1M)

etrn(1M)

fbconfig(1M)

fbconf_xorg(1M)

fcadm(1M)

fcinfo(1M)

fdetach(1M)

fdisk(1M)

ff(1M)

ff_ufs(1M)

fingerd(1M)

fiocompress(1M)

flowadm(1M)

flowstat(1M)

fmadm(1M)

fmd(1M)

fmdump(1M)

fmstat(1M)

fmthard(1M)

format(1M)

fruadm(1M)

fsck(1M)

fsck_pcfs(1M)

fsck_udfs(1M)

fsck_ufs(1M)

fsdb(1M)

fsdb_udfs(1M)

fsdb_ufs(1M)

fsflush(1M)

fsirand(1M)

fssnap(1M)

fssnap_ufs(1M)

fsstat(1M)

fstyp(1M)

fuser(1M)

fwflash(1M)

fwtmp(1M)

getdevpolicy(1M)

getent(1M)

gettable(1M)

getty(1M)

gkadmin(1M)

groupadd(1M)

groupdel(1M)

groupmod(1M)

growfs(1M)

grpck(1M)

gsscred(1M)

gssd(1M)

hald(1M)

hal-device(1M)

hal-fdi-validate(1M)

hal-find(1M)

hal-find-by-capability(1M)

hal-find-by-property(1M)

hal-get-property(1M)

hal-set-property(1M)

halt(1M)

hextoalabel(1M)

host(1M)

hostconfig(1M)

hotplug(1M)

hotplugd(1M)

htable(1M)

ickey(1M)

id(1M)

idmap(1M)

idmapd(1M)

idsconfig(1M)

ifconfig(1M)

if_mpadm(1M)

ifparse(1M)

iiadm(1M)

iicpbmp(1M)

iicpshd(1M)

ikeadm(1M)

ikecert(1M)

ilbadm(1M)

inetadm(1M)

ilomconfig(1M)

imqadmin(1M)

imqbrokerd(1M)

imqcmd(1M)

imqdbmgr(1M)

imqkeytool(1M)

imqobjmgr(1M)

imqusermgr(1M)

in.chargend(1M)

in.comsat(1M)

in.daytimed(1M)

in.dhcpd(1M)

in.discardd(1M)

in.echod(1M)

inetadm(1M)

inetconv(1M)

inetd(1M)

in.fingerd(1M)

infocmp(1M)

in.iked(1M)

init(1M)

init.sma(1M)

init.wbem(1M)

inityp2l(1M)

in.lpd(1M)

in.mpathd(1M)

in.named(1M)

in.ndpd(1M)

in.rarpd(1M)

in.rdisc(1M)

in.rexecd(1M)

in.ripngd(1M)

in.rlogind(1M)

in.routed(1M)

in.rshd(1M)

in.rwhod(1M)

install(1M)

installadm(1M)

installboot(1M)

installf(1M)

installgrub(1M)

in.stdiscover(1M)

in.stlisten(1M)

in.talkd(1M)

in.telnetd(1M)

in.tftpd(1M)

in.timed(1M)

intrd(1M)

intrstat(1M)

in.uucpd(1M)

iostat(1M)

ipaddrsel(1M)

ipadm(1M)

ipf(1M)

ipfs(1M)

ipfstat(1M)

ipmgmtd(1M)

ipmon(1M)

ipmpstat(1M)

ipnat(1M)

ippool(1M)

ipqosconf(1M)

ipsecalgs(1M)

ipsecconf(1M)

ipseckey(1M)

iscsiadm(1M)

isns(1M)

isnsadm(1M)

itadm(1M)

itu(1M)

js2ai(1M)

k5srvutil(1M)

kadb(1M)

kadmin(1M)

kadmind(1M)

kadmin.local(1M)

kcfd(1M)

kclient(1M)

kdb5_ldap_util(1M)

kdb5_util(1M)

kdcmgr(1M)

kernel(1M)

keyserv(1M)

killall(1M)

kmem_task(1M)

kmscfg(1M)

kprop(1M)

kpropd(1M)

kproplog(1M)

krb5kdc(1M)

ksslcfg(1M)

kstat(1M)

ktkt_warnd(1M)

labeld(1M)

labelit(1M)

labelit_hsfs(1M)

labelit_udfs(1M)

labelit_ufs(1M)

lastlogin(1M)

latencytop(1M)

ldapaddent(1M)

ldap_cachemgr(1M)

ldapclient(1M)

ldmad(1M)

link(1M)

llc2_loop(1M)

lldpadm(1M)

lldpd(1M)

lms(1M)

locator(1M)

lockd(1M)

lockfs(1M)

lockstat(1M)

lofiadm(1M)

logadm(1M)

logins(1M)

lshal(1M)

System Administration Commands-第 2 单元

System Administration Commands-第 3 单元

请告诉我们如何提高我们的文档:
过于简略
不易阅读或难以理解
重要信息缺失
错误的内容
需要翻译的版本
其他
Your rating has been updated
感谢您的反馈!

您的反馈将非常有助于我们提供更好的文档。 您是否愿意参与我们的内容改进并提供进一步的意见?

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.

-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 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

-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.

示例

In some of the following examples, example output wraps in an 80–character-wide display.

示例 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

示例 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:

示例 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            -

示例 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.

示例 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 "\t\c";croinfo -h -n $i | wc -l
> done
SEAGATE-ST330055SSUN300G               3
SEAGATE-ST330056SSUN300G              19
SEAGATE-ST345056SSUN450G               5

示例 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:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/core-os
Interface Stability
See below

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.