Go to main content

man pages section 8: System Administration Commands

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

devprop(8)

Name

devprop - display device property-value or device-path information

Synopsis

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

Description

Use of '-n device-path' and '–a' are exclusive. If neither are specified then '–n /' is assumed.

If no property-name is specified, the devprop -n device-path command produces one line of property-name=property-value output for each device-path property that exists.

For each property-name specified, the 'devprop -n device-path' command produces one line output detailing the property-value. If a property-name is not defined at the device-path node, then the output is a blank line. If the –v option is specified, each line of output will begin with "property-name=".

The 'devprop -a' command locates all device-paths that define every single property-name specified. Without the –v option, for each qualified device-path, one line of "device-path" output is produced (independent of the number of property-names used). If the –v option is specified, a line of device-path property-name=property-value output is produced for each property-name specified.

All other command line options relate to property-value type and display variations. The boolean property-value prints true (with the –e option) if it exists; it is otherwise false. A byte, int, or int_64 property-value is displayed in hex format if one specifies type by means of options –b, –i, or –l; otherwise the property-value is displayed in decimal format. The –e, –b, –i, –l, and –s options are mutually exclusive. Array property-value elements are separated by a user-defined separator character. When –q option is specified, a string property-value is surrounded by double quotation marks (").

Options

The options below are supported.

–n device-path

The path to a target device node for which properties are displayed. The default path is that of the root node, equivalent to specifying -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

Specifies verbose mode for –noption. The "property-name=" is displayed before each property-value for the –a option. The "property-name=property-value" is displayed after the device-path.

The following options are related to property-value type.

–b

The properties to be displayed are sequences of hex bytes (DI_PROP_TYPE_BYTES).

–e

The properties to be output are boolean (DI_PROP_TYPE_BOOLEAN). Prints "true" if the property-name exists, otherwise prints "false".

–i

The properties to be displayed are hex integers (DI_PROP_TYPE_INT).

–l

The properties to be displayed are 64-bit hex integers (DI_PROP_TYPE_INT64).

–s

The properties to be displayed are strings (DI_PROP_TYPE_STRING). This is the default property.

The following options related to property-value display.

–c separator

Specifies the separator between array property-value elements. Use double quotation marks (" ") to specify a space. The default separator is the plus sign (+) for the string type, and period (.) for others, such as prtconf(8).

–q

Specifies quoted display mode in which string properties are displayed surrounded by double quotation marks (").

Operands

Only the '-n device-path' invocation takes additional operands:

property-name...

For each property-name in the list, display the property-value.

Exit Status

0

No error occurred.

non-zero

An error occurred.

Examples

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

See attributes(7) for descriptions of the following attributes:

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

The location of the utility is Committed. The utility options are all Uncommitted, with property-names and device-paths used being Volatile. In general, the results displayed are Volatile, and are highly dependent on the system configuration.

See Also

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