[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 1

cpu_state Command

Purpose

Controls and lists which processors will be active when the system is next started.

Syntax

cpu_state  -l | { -d -e } ProcessorNumber

Description

The cpu_state command controls and lists which processors on a multiprocessor system will be active when the system is next started. The -d or -e flags respectively disable or enable the processor identified by the ProcessorNumber parameter. The -l flag displays a report with the following fields:

Name The ODM processor name, shown in the form proc x, where x is the physical processor number.
Cpu The logical processor number.
Status The processor state for the next boot.
Location The ODM processor location code. This code is shown in the form AA-BB-CC-DD. AA is always 00 (to indicate the main unit). BB is 0x, where x is P, Q, R, or S, to indicate the first, second, third or fourth processor card. CC is always 00, and DD is 00 or 01 to indicate the processor position on the cpu card.

The physical processor numbers used in ODM names are based on the location of processors within the system (cpu card and card position number). Logical numbers are assigned to processors by numbering all currently enabled processors starting with physical processor 0 (zero). Thus, in a system with 2 enabled processors out of a possible 4, the logical numbers 0 (zero) and 1 (one) are used.

The Status field does not display the current processor state, but rather the state to be used for the next boot. This means that if an enabled processor is disabled using the -d flag, the -l flag will display the processor as disabled, but having a logical number. When the system is rebooted, the processor will not be used and its status field will remain disabled (until it is changed) and it will have no logical number. If the processor status is unknown, the Status field contains no reply . This status means either that the processor has a hardware problem detected by a power-on test, or that no reply was received.

Notes:
  1. The cpu_state command changes do not take effect until the system is restarted.
  2. The cpu_state command can only be used by a root user, and is intended for tasks such as system maintenance, performance measurement, and testing.
  3. The cpu_state command works only on multiprocessor systems with Micro Channel I/O. For IBM systems, this includes the IBM 7012 Model G Series, the IBM 7013 Model J Series, and the IBM 7015 Model R Series.

    The lsdev command can be used on any multiprocessor system to query information about processors. Note that the conventions stated above for the logical processor number and location code are not common across all multiprocessor systems. The lsdev command for this is as follows:

    lsdev -C -c processor -S Available

Flags

-d Disables the specified processor.
-e Enables the specified processor.
-l Lists the status of all processors.

Examples

  1. To list the status of the processors in the system, enter:
    cpu_state -l
    On a four processor system with all processors running, this produces a listing similar to the following:
    Name    Cpu  Status     Location
    proc0   0    Enabled    00-0P-00-00
    proc1   1    Enabled    00-0P-00-01
    proc2   2    Enabled    00-0Q-00-00
    proc3   3    Enabled    00-0Q-00-01
  2. To prevent processor number one from running when the system is restarted, enter:
    cpu_state -d 1
    For the system shown in the previous example, the command cpu_state -l would then produce a listing similar to the following:
    Name    Cpu  Status     Location
    proc0   0    Enabled    00-0P-00-00
    proc1   1    Disabled   00-0P-00-01
    proc2   2    Enabled    00-0Q-00-00
    proc3   3    Enabled    00-0Q-00-01
    If the system is rebooted, the disabled state takes effect and processor one will no longer have a logical processor number. The command cpu_state -l would then produce a listing similar to the following:
    Name    Cpu  Status     Location
    proc0   0    Enabled    00-0P-00-00
    proc1   -    Disabled   00-0P-00-01
    proc2   1    Enabled    00-0Q-00-00
    proc3   2    Enabled    00-0Q-00-01
  3. To re-enable processor number one after it has been marked disabled, enter:
    cpu_state -e 1
    Using the second listing in the previous example (booting after disabling processor one). the command cpu_state -l would then produce a listing similar to the following:
    Name    Cpu  Status     Location
    proc0   0    Enabled    00-0P-00-00
    proc1   -    Enabled    00-0P-00-01
    proc2   1    Enabled    00-0Q-00-00
    proc3   2    Enabled    00-0Q-00-01

Implementation Specifics

This command is part of Base Operating System (BOS) Runtime.

File

/usr/sbin/cpu_state Contains the cpu_state command.

Related Information

Starting the System in AIX Version 4.3 System Management Guide: Operating System and Devices, Stopping the System in AIX Version 4.3 System Management Guide: Operating System and Devices.


[ Previous | Next | Contents | Glossary | Home | Search ]