Displays attribute characteristics and possible values of attributes for devices in the system.
lsattr { -D [ -O ] | -E [ -O ] | -F Format [ -Z Character ] } -l Name [ -a Attribute ] ...[ -f File ] [ -h ] [ -H ]
lsattr { -D [ -O ] | -F Format [ -Z Character ] } { [ -c Class ] [ -s Subclass ] [ -t Type ] } [ -a Attribute ] ... [ -f File ] [ -h ] [ -H ]
lsattr -R { -l Name | [ -c Class ] [ -s Subclass ] [ -t Type ] } -a Attribute [ -f File ] [ -h ] [ -H ]
lsattr -l Name { -o operation [ ... ] } -F Format [ -Z Character ] [ -f File ] [ -h ] [ -H ]
lsattr { [ -c Class ] [ -s Subclass ] [ -t Type ] } { -o operation [ ... ] } -F Format [ -Z Character ] [ -f File ] [ -h ] [ -H ]
The lsattr command displays information about the attributes of a given device or kind of device. If you do not specify the device logical name (-l Name), you must use a combination of one or all of the -c Class, -s Subclass, and -t Type flags to uniquely identify the predefined device.
You must specify one of the following flags with the lsattr command:
When displaying the effective values of the attributes for a customized device, the information is obtained from the Configuration database, not the device. Generally the database values reflect how the device is configured, unless it is reconfigured with the chdev command using the -P or -T flag. If this has occurred, the information displayed by the lsattr command might not correctly indicate the current device configuration until after the next system boot.
If you use the -D or -E flag, the output defaults to the values for the attribute's name, value, description, and user-settable strings, unless also used with the -O flag. The -O flag displays the names of all attributes specified, separated by colons. On the next line, the -O flag displays all the corresponding attribute values, separated by colons. The -H flag can be used with either the -D, -E, or -F flag to display headers above the column names. You can define the format of the output with a user-specified format where the Format parameter is a quoted list of column names separated by nonalphanumeric characters or white space using the -F Format flag. If the -F Format flag is specified, the -Z Character flag may also be specified to change the default record separater from a 'newline' character to the indicated 'Character'.
The lsattr command can display "operation" information from the Extended Predefined Attribute (PdAtXtd) object class. This information is used by the web-based System Manager. The operation information is accessed through the -o operation flag. The -o operation flag and the -a attribute flag cannot be specified in the same invocation of the lsattr command. The -o operation flag is also not valid with the -R flag. When the -o operation flag is specified, only fields from the PdAtXtd object class can be specified with the -F Format flag.
You can supply the flags either on the command line or from the specified File parameter.
| -a Attribute | Displays information for the specified attributes of a specific device or kind of device. You can use one -a flag for each attribute name or multiple attribute names. If you use one -a flag for multiple attribute names, the list of attribute names must be enclosed in quotes with spaces between the names. Using the -R flag, you must specify only one -a flag with only one attribute name. If you do not specify either the -a or -R flag, the lsattr command displays all information for all attributes of the specified device. The -a Attribute flag cannot be used in conjunction with the -o Operation flag. This combination of flags causes the lsattr command to exit with an error message. |
| -c Class | Specifies a device class name. This flag can be used to restrict the output to that for devices of a specified class. This flag cannot be used with the -E or -l flag. |
| -D | Displays the attribute names, default values, descriptions, and user-settable flag values for a specific device when not used with the -O flag. The -D flag displays only the attribute name and default value in colon format when used with the -O flag. This flag can be used with any combination of the -c, -s, and -t flags that uniquely identifies a device from the Predefined Devices object class or with the -l flag. This flag cannot be used with the -E, -F, or -R flag. |
| -E | Displays the attribute names, current values, descriptions, and user-settable flag values for a specific device when not used with the -O flag. The -E flag displays only the attribute name and current value in colon format when used with the -O flag. This flag cannot be used with the -c, -D, -F, -R, -s, or -t flag. |
| -f File | Reads the needed flags from the File parameter. |
| -F Format | Displays the output in a user-specified format, where the Format parameter is a quoted list of column names separated by nonalphanumeric characters or white space. Using white space as the separator, the lsattr command displays the output in aligned columns. Only column names from the Predefined Attributes (PdAt), Customized Attributes (CuAt), and the Extended Predefined Attributes (PdAtXtd) object classes can be specified. In addition to the column names, there are two special purpose names that can be used. The name description can be used to obtain a display of attribute descriptions and user-settable can be used to obtain an indication as to whether or not an attribute can be changed. This flag cannot be used with the -E, -D, -O or -R flag. |
| -H | Displays headers above the column output. To use the -H flag with the -O flag is meaningless, the -O flag prevails. To use the -H flag with the -R flag is meaningless, the -R flag prevails. |
| -h | Displays the command usage message. |
| -l Name | Specifies the device logical name in the Customized Devices object class whose attribute names or values are to be displayed. |
| -o Operation | Displays information for the specified operations of a specific device or kind of device. You can use one -o flag for each operation name or multiple operation names. If you use one -o flag for multiple operation names, the list of attribute names must be enclosed in quotes with spaces between the names. Wildcard characters may also be used for the operation name. The valid set of wildcard charcters are the same set used by the odmget command. All operations associated with a specific device, or kind of device, can be displayed by using an operation value of "?*". The -o Operation flag cannot be used in conjunction with the -a attribute flag or the -R flag. Any combination of these flags causes the lsattr command to exit with an error message. |
| -O | Displays all attribute names separated by colons and, on the second line, displays all the corresponding attribute values separated by colons. The attribute values are current values when the -E flag is also specified and default values when the -D flag is specified. This flag cannot be used with the -F and -R flags. |
| -R | Displays the legal values for an attribute name. The -R flag cannot be used with the -D, -E, -F and -O flags,
but can be used with any combination of the -c, -s, and -t flags that uniquely identifies
a device from the Predefined Devices object class or with the -l flag. The -R flag displays
the list attribute values in a vertical column as follows:
Value1 Value2 . . ValueN The -R flag displays the range attribute values as x...n(+i) where x is the start of the range, n is the end of the range, and i is the increment. |
| -s Subclass | Specifies a device subclass name. This flag can be used to restrict the output to that for devices of a specified subclass. This flag cannot be used with the -E or -l flag. |
| -t Type | Specifies a device type name. This flag can be used to restrict the output to that for devices of a specified class. This flag cannot be used with the -E or -l flag. |
| -Z Character | The -Z Character flag is meant to be used for programs that need to deal with ODM fields that may have embbeded new line characters. An example of such a program is the Web-based System Manager. The -Z Character flag is used to change the record separator character for each record (line) of output generated. The new record separator is the 'Character' argument to this flag. The -Z Character flag is only relevant when the -F Format flag is specified. The -Z Character flag cannot be used with the -D, -E, -O, or the -R flags. |
lsattr -l rmt0 -EThe system displays a message similar to the following:
mode yes Use DEVICE BUFFERS during writes True block_size 1024 BLOCK size (0=variable length) True extfm yes Use EXTENDED file marks True ret no RETENSION on tape change or reset True density_set_1 37 DENSITY setting #1 True density_set_2 36 DENSITY setting #2 True compress yes Use data COMPRESSION True size_in_mb 12000 Size in Megabytes False ret_error no RETURN error on tape change or reset True
lsattr -l rmt0 -DThe system displays a message similar to the following:
mode yes Use DEVICE BUFFERS during writes True block_size 1024 BLOCK size (0=variable length) True extfm yes Use EXTENDED file marks True ret no RETENSION on tape change or reset True density_set_1 37 DENSITY setting #1 True density_set_2 36 DENSITY setting #2 True compress yes Use data COMPRESSION True size_in_mb 12000 Size in Megabytes False ret_error no RETURN error on tape change or reset True
lsattr -l scsi0 -a bus_intr_lvl -EThe system displays a message similar to the following:
bus_intr_lvl 1 Bus interrupt level False
lsattr -l tty0 -a login -RThe system displays a message similar to the following:
enable disable share delay
lsattr -c printer -s parallel -t ibm4340 -DThe system displays a message similar to the following:
ptop 600 Printer TIME OUT period True line 60 Number of LINES per page True col 80 Number of COLUMNS per page True ind 0 Number of columns to INDENT True plot no Send all characters to printer UNMODIFIED True backspace yes Send BACKSPACES True cr yes Send CARRIAGE RETURNS True form yes Send FORM FEEDS True lf yes Send LINE FEEDS True addcr yes Add CARRIAGE RETURNS to LINE FEEDS True case no Convert lowercase to UPPERCASE True tabs yes EXPAND TABS on eight position boundaries True wrap no WRAP CHARACTERS beyond the specified width True mode no Return on ERROR True interface standard Type of PARALLEL INTERFACE True autoconfig available STATE to be configured at boot time True busy_delay 0 Microseconds to delay between characters True
lsattr -c printer -s parallel -t ibm4340 -a ptop -RThe system displays a message similar to the following:
1...1000 (+1)
lsattr -l rmt0 -E -OThe system displays a message similar to the following:
#mode:block_size:extfm:ret:density_set_1:density_set_2:compress:size_in_mb:ret_error yes:1024:yes:no:37:36:yes:12000:no
lsattr -E -l sys0The system displays output similar to the following:
keylock normal State of system keylock at boot time False maxbuf 20 Maximum number of pages in block I/O BUFFER CACHE True maxmbuf 0 Maximum Kbytes of real memory allowed for MBUFS True maxuproc 128 Maximum number of PROCESSES allowed per user True autorestart false Automatically REBOOT system after a crash True iostat false Continuously maintain DISK I/O history True realmem 4194304 Amount of usable physical memory in Kbytes False conslogin enable System Console Login False fwversion IBM,SPH00221 Firmware version and revision levels False maxpout 0 HIGH water mark for pending write I/Os per file True minpout 0 LOW water mark for pending write I/Os per file True fullcore false Enable full CORE dump True pre430core false Use pre-430 style CORE dump True ncargs 6 ARG/ENV list size in 4K byte blocks True rtasversion 1 Open Firmware RTAS version False modelname IBM,7044-270 Machine name False systemid IBM,011037D1F Hardware system identifier False boottype disk N/A False SW_dist_intr false Enable SW distribution of interrupts True cpuguard disable CPU Guard True frequency 93750000 System Bus Frequency False
| /usr/sbin/lsattr | Contains the lsattr command. |
The chdev command, lsconn command, lsdev command, lsparent command, mkdev command, rmdev command.
Summary of Tunable Parameters in AIX 5L Version 5.2 Performance Management Guide
Devices Overview for System Management in AIX 5L Version 5.2 System Management Concepts: Operating System and Devices provides information about adding, changing, moving, and removing devices.