Go to main content

マニュアルページ セクション 8: システム管理コマンド

印刷ビューの終了

更新: 2022年7月27日
 
 

devprop(8)

名前

devprop - デバイスのプロパティー値またはデバイスパス情報の表示

形式

/usr/sbin/devprop [-n device-path] [-v] [-{e|b|i|l|s}] [-q]
	[-c separator] property-name ...
/usr/sbin/devprop -a [-v] [-{e|b|i|l|s}] [-q]
	[-c separator] property-name ...

説明

-n device-path」と「–a」は排他的に使用します。どちらも指定されていない場合、「–n /」が想定されます。

プロパティー名が指定されていない場合、devprop -n device-path コマンドは、存在する device-path プロパティーごとに 1 行の property-name=property-value 出力を生成します。

指定したプロパティー名ごとに、「devprop -n device-path」コマンドは、プロパティー値の詳細を示す 1 行の出力を生成します。property-namedevice-path ノードで定義されていない場合、出力は空白の行になります。–v オプションが指定されている場合、出力の各行は「property-name=」で始まります。

devprop -a」コマンドは、指定された単一の property-name をすべて定義するすべてのデバイスパスを検索します。–v オプションを使用しない場合、修飾された device-path ごとに、1 行の「device-path」出力が生成されます (使用されるプロパティー名の数とは無関係)。–v オプションを指定した場合、指定した property-name ごとに 1 行の device-path property-name=property-value 出力が生成されます。

他のコマンド行オプションはすべて、プロパティー値の型に関連し、バリエーションを表示します。ブール型プロパティー値は、存在する場合は true を出力し (–e オプションを指定した場合)、それ以外の場合は false です。byte、int、および int_64 のプロパティー値は、オプション –b–i、または –l によって型を指定する場合は 16 進数形式で表示され、それ以外の場合は 10 進数形式で表示されます。–e–b–i–l、および –s オプションは相互に排他的です。配列プロパティー値の要素は、ユーザー定義の区切り文字で区切られます。–q オプションを指定した場合、文字列プロパティー値は二重引用符 (") で囲まれます。

オプション

次のオプションがサポートされています。

–n device-path

プロパティーを表示するターゲットデバイスノードへのパス。デフォルトパスはルートノードのパスで、-n / を指定するのと同等です。

–a

List the path of every device which defines one or more of specified property-names.This is a more efficient way for management applications to collect information about all devices in the system rather than iterating individual devprop commands over all devices in the system, one by one.

–v

–n オプションの冗長モードを指定します。「property-name=」は、–a オプションのそれぞれのプロパティー値の前に表示されます。「property-name=property-value」はデバイスパスの後に表示されます。

次のオプションは、property-value 型に関連付けられます。

–b

表示されるプロパティーは 16 進バイト列 (DI_PROP_TYPE_BYTES) です。

–e

出力されるプロパティーはブール型 (DI_PROP_TYPE_BOOLEAN) です。property-name が存在する場合は「true」を、それ以外の場合は「false」を出力します。

–i

表示されるプロパティーは 16 進整数 (DI_PROP_TYPE_INT) です。

–l

表示されるプロパティーは 64 ビット整数 (DI_PROP_TYPE_INT64) です。

–s

表示されるプロパティーは文字列 (DI_PROP_TYPE_STRING) です。これがデフォルトのプロパティーです。

次のオプションは、property-value 表示に関連付けられます。

–c separator

配列プロパティー値の要素間での区切り文字を指定します。空白を指定するには、二重引用符 (" ") を使用します。デフォルトの区切り文字は、文字列型の場合はプラス記号 (+)、prtconf(8) などのその他の場合はピリオド (.) です。

–q

引用符で囲まれた表示モードを指定します (文字列プロパティーが二重引用符 (") で囲まれて表示されます)。

オペランド

-n device-path」呼び出しだけが追加オペランドを使用します。

property-name...

リスト内の property-name ごとに、property-value を表示します。

終了ステータス

0

No error occurred.

0 以外

An error occurred.

使用例 1 Listing a property value for a specific device.

The following example lists the value of the device-nblocks property for a specific device.


# devprop –n /scsi_vhci/disk@g5000cca025a2adac device-nblocks

585937500
使用例 2 Listing a property name and value for a specific device.

The following example lists the value of the device-nblocks property, together with the property name, for a specific device.


# devprop –v –n /scsi_vhci/disk@g5000cca025a2adac device-nblocks

device-nblocks=585937500
使用例 3 Listing paths for all devices with defined properties.

The following example lists the path of each device that defines one or more of the specified properties.


# devprop –a device-nblocks devid inquiry-serial-no

/scsi_vhci/disk@g5000cca025a2adac
/scsi_vhci/disk@g5000cca03c08d620
/scsi_vhci/disk@g5000cca0259eadd4
/scsi_vhci/disk@g5000cca03c076d84
/scsi_vhci/disk@g5000cca03c060b00
/scsi_vhci/disk@g5000cca03c074500
使用例 4 Listing paths for all devices with defined properties, including each property's name and value.

The following example lists the path of each device that provides one of the specified properties in addition to that property's name and value.


# devprop –a –v device-nblocks devid

/scsi_vhci/disk@g5000cca025a2adac device-nblocks=585937500
/scsi_vhci/disk@g5000cca025a2adac devid=id1,sd@n5000cca025a2adac
/scsi_vhci/disk@g5000cca03c08d620 device-nblocks=585937500
/scsi_vhci/disk@g5000cca03c08d620 devid=id1,sd@n5000cca03c08d620
/scsi_vhci/disk@g5000cca0259eadd4 device-nblocks=585937500
/scsi_vhci/disk@g5000cca0259eadd4 devid=id1,sd@n5000cca0259eadd4
/scsi_vhci/disk@g5000cca03c076d84 device-nblocks=585937500
/scsi_vhci/disk@g5000cca03c076d84 devid=id1,sd@n5000cca03c076d84
/scsi_vhci/disk@g5000cca03c060b00 device-nblocks=585937500
/scsi_vhci/disk@g5000cca03c060b00 devid=id1,sd@n5000cca03c060b00
/scsi_vhci/disk@g5000cca03c074500 device-nblocks=585937500
/scsi_vhci/disk@g5000cca03c074500 devid=id1,sd@n5000cca03c074500

属性

属性についての詳細は、マニュアルページの attributes(7) を参照してください。

属性タイプ
属性値
使用条件
system/core-os
インタフェースの安定性
下記を参照

ユーティリティーの場所は「確実」です。ユーティリティーオプションはすべて「不確実」であり、使用されるプロパティー名とデバイスパスは「流動的」です。一般に、表示される結果は「流動的」であり、システム構成によって大きく異なります。

関連項目

libdevinfo(3LIB)attributes(7)prtconf(8)