scsimgr SCSI Management and Diagnostics utility on HP-UX 11i v3 (March 2008)

Displaying hardware path, device file, WWID and serial number for all devices, in scriptable
output
# scsimgr -p get_attr all_lun -a hw_path -a device_file -a wwid -a serial_number
64000/0xfa00/0x0:/dev/rdisk/disk15:0x0004cffffebbf737:3FD1M2SW
64000/0xfa00/0x1:/dev/rdisk/disk16:0x0004cffffebbe43e:3FD1LZ0S
64000/0xfa00/0x2:/dev/rdisk/disk17::
64000/0xfa00/0x3:/dev/rdisk/disk18:0x20000020371972ee:LS255190000010080N0V
64000/0xfa00/0x4:/dev/rdisk/disk19:0x20000020371972e3:LS271211000010080N1H
64000/0xfa00/0x5:/dev/rdisk/disk20:0x20000020371972eb:LS24603100001008K74M
64000/0xfa00/0x6:/dev/rdisk/disk21:0x200000203726a3af:LJS87900000029491GWF
64000/0xfa00/0x7:/dev/rdisk/disk22:0x20000020370fe8c8:LJ67387800002916H9A9
64000/0xfa00/0x8:/dev/rdisk/disk23:0x200000203726d3b9:LJT4848400002950H0R4
64000/0xfa00/0x9:/dev/pt/pt2::USSO08016323
64000/0xfa00/0xa:/dev/pt/pt3::USSO08016323
Displaying current values of a settable attribute for all devices on the system, in a scriptable
format
A script, which needs current value of the max_q_depth tunable for all devices on the system, can
issue the following scsimgr command. Note that the device_file attribute is also required to be able
to associate devices and max_q_depth values.
# scsimgr -p get_attr all_lun -a device_file -a max_q_depth
/dev/rdisk/disk15:8
/dev/rdisk/disk16:8
/dev/rdisk/disk17:1
/dev/rdisk/disk18:8
/dev/rdisk/disk19:8
/dev/rdisk/disk20:16
/dev/rdisk/disk21:8
/dev/rdisk/disk22:8
/dev/rdisk/disk23:8
/dev/pt/pt2:1
/dev/pt/pt3:1
Notes: The following rules apply for the scriptable output of attributes:
Attribute values are displayed exactly in the order specified in the command line.
By default current values are returned. If the script wants default or saved values, the script
should specify the keyword ‘default’ and ‘saved’ respectively. Examples:
o scsimgr -p get_attr -D /dev/rdisk/disk0 -a max_q_depth -a path_fail_secs default
o scsimgr -p get_attr -D /dev/rdisk/disk0 -a max_q_depth -a path_fail_secs saved
The field corresponding to an attribute will be empty if the value of the attribute is not
available. Examples: (1) Invalid attribute; (2) Invalid value requested (for instance saved or
default for a read-only attribute); (3) Value of the attribute not yet set (for instance querying
the value of the alias attribute prior to setting it).
If the values of some of the attributes are not available, scsimgr exits with an error code >
0 to indicate that an error has occurred. The corresponding fields will be empty in the output.
Setting tunables
The HP-UX 11i v3 mass storage stack provides a rich set of attributes (tunables) that you can manage
using the scsimgr command. Each attribute has a name and the following values types:
current value: the value currently used for operation.
saved value: the value saved in a persistent manner. If it is set this value is used to initialize
the attribute at system boot.
15