[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 3

lsattr Command

Purpose

Displays attribute characteristics and possible values of attributes for devices in the system.

Syntax

lsattr { -D [ -O ] | -E [ -O ] | -F Format } -l Name [ -a Attribute ] ...[ -f File ] [ -h ] [ -H ]

lsattr { -D [ -O ] | -F Format } { [ -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 ]

Description

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:

-D Displays default values.
-E Displays effective values (valid only for customized devices specified with the -l flag).
-F Format Specifies the user-defined format.
-R Displays the range of legal values.

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.

You can supply the flags either on the command line or from the specified File parameter.

Flags

-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.
-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 and Customized Attributes 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 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.

Examples

  1. To list the current attribute values for the tape device rmt0, type:

    lsattr -l rmt0 -E

    The system displays a message similar to the following:

    mode          yes   Use DEVICE BUFFERS during writes        True
    block_size    512   BLOCK size (0=variable length)          True
    ret           no    RETENSION on tape change or reset       True
    ecc_flag      yes   Enable ECC                              True
  2. To list the default attribute values for the tape device rmt0, type:

    lsattr -l rmt0 -D

    The system displays a message similar to the following:

    mode          yes   Use DEVICE BUFFERS during writes    True
    block_size    512   BLOCK size (0=variable length)      True
    ret           yes   RETENSION on tape change or reset   True
    ecc_flag      yes   Enable ECC                          True
     
  3. To list the current value of the bus_intr_lvl attribute for the SCSI adapter scsi0, type:

    lsattr -l scsi0 -a bus_intr_lvl -E

    The system displays a message similar to the following:

    bus_intr_lvl    14    Bus    interrupt level    True
  4. To list the possible values of the login attribute for the tty device tty0, type:

    lsattr -l tty0 -a login -R

    The system displays a message similar to the following:

    enable
    disable
    share
    delay
  5. To list the default attribute values for a 4207-2 parallel printer, type:

    lsattr -c printer -s parallel -t 4207-2 -D

    The system displays a message similar to the following:

    ptop    30   Printer TIME OUT period       True
    line    66   Number of LINES per page      True
    col     80   Number of COLUMNS per page    True
    ind     0    Number of columns to INDENT   True
  6. To list the possible values of the ptop attribute for a 4207-2 parallel printer, type:

    lsattr -c printer -s parallel -t 4207-2 -a ptop -R

    The system displays a message similar to the following:

    1...1000 (+1)
  7. To list the current attribute values for the tape device rmt0 in colon format, type:

    lsattr -l rmt0 -E -O

    The system displays a message similar to the following:

    #mode:block_size:ret:ecc_flag
    yes:512:no:yes
  8. To display system attributes, type:

    lsattr -E -l sys0

    The system displays output similar to the following:

    dcache     64K    Size of data cache in bytes                       False
    icache      8K    Size of instruction cache in bytes                False
    keylock   normal  State of system keylock at boot time              False
    maxbuf      20    Maximum number of pages in block I/O BUFFER CACHE  True
    maxmbu    2048    Maximum Kbytes of real memory allowed for MBUFS    True
    maxuproc    40    Maximum number of PROCESSES allowed per user       True
    autorestart false Automatically REBOOT system after a crash          True
    iostat    true    Continuously maintain DISK I/O history             True
    realmem  32768    Amount of usable physical memory in Kbytes        False
    primary /dev/hd7  Primary dump device                               False
    secondary  /dev/sysdumpnull Secondary dump device                   False
    conslogin   enable          System Console Login                    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
    memscrub   false  Enable memory SCRUBBING                            True
    logfilesize 1048576         Error log file size                     False
    Note
    The same information is available in a more readable format using SMIT (System Environments -> Change / Show Characteristics of Operating Systems).

Files

/usr/sbin/lsattr Contains the lsattr command.

Related Information

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.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]