Date: November 22, 2003
Here are a few commands for working with devices on an AIX system.
To list all devices on an AIX system, run the command
# lsdev -C
To list specific device types, use the "-Cc" flag. For example, this command lists only adapters.
# lsdev -Cc adapter
To list the attributes of a particular device
# lsattr -HEl <device>
e.g.:
# lsattr -HEl hdisk1 attribute value description user_settable
pvid 000008767ae0ba390000000000000000 Physical volume identifier False queue_depth 3 Queue depth True write_queue_mod 0 Write queue depth modifier True adapter_a ssa0 Adapter connection False adapter_b none Adapter connection False primary_adapter adapter_a Primary adapter True reserve_lock yes RESERVE device on open True connwhere_shad 0004AC504D6500D SSA Connection Location False max_coalesce 0x20000 Maximum coalesced operation True size_in_mb 2255 Size in Megabytes False location Location Label True
The attributes which you can change have a "True" value under the "user_settable" column.
To display the legal values for an attribute.
# lsattr -Rl <device> -a <attribute>
# lsattr -Rl hdisk1 -a queue_depth 0...200 (+1)
In this case, the queue_depth can be set from 0 to 200 in increments of 1. See the AIX documentation for more information on the meaning of each attribute
To change an attribute, use the "chdev" command. Normally you can not change an attribute of a device that is on-line. The following command changes the attribute in the ODM, and goes into affect after a reboot (or rmdev/mkdev).
# chdev -l <device> -a <attribute>=<new value> -P
To change an attribute of a device that is offline:
# chdev -l <device> -a <attribute>=<new value>
Thanks to Dan Braden for this tip.
Bruce Spencer,
baspence@us.ibm.com