[AIX 운영 체제와 장치 관리 5] 시스템 종료, 프로파일, 시간 함수, 64비트 모드, 동적 프로세서 할당 해제, 시스템 시계와 시간대

핵심 정리

  • shutdown은 사용자에게 알리고 프로세스를 끝내고 파일 시스템을 마운트 해제한 뒤 멈추는 가장 안전한 방법입니다(root 필요). 단일 사용자 모드는 cd / 뒤 shutdown -m, 긴급 종료는 알림 없이 shutdown -F.
  • 로그인 때 /etc/profile(시스템 전체: export 변수, umask, 터미널 종류, 메일 알림)을 먼저, 그다음 $HOME/.profile(개인 설정, 앞 설정을 덮어씀)을 읽습니다. 오늘의 메시지는 /etc/motd를 고칩니다.
  • AIX 6.1은 32비트 커널이 없어져 64비트 하드웨어가 필요합니다(bos.64bit, /etc/methods/cfg64). 프로세서 능력은 prtconf -c나 bootinfo -y로 확인합니다. 64비트 하드웨어는 32비트 프로그램도 돌립니다.
  • 동적 프로세서 할당 해제는 펌웨어가 고칠 수 있는 오류가 임계값을 넘은 프로세서를 멈춥니다. 마지막 bind CPU에 묶인 스레드가 10분 안에 떠나지 않으면 중단됩니다. sys0의 cpuguard 속성(기본 enable)으로 켜고 끄며, 중단된 해제는 원인을 고친 뒤 ha_star -C로 다시 시작합니다. errpt 항목은 CPU_FAIL_PREDICTED, CPU_DEALLOC_SUCCESS, CPU_DEALLOC_ABORTED(이유 코드 2·3·4·200)입니다.
  • 시간을 자꾸 잃으면 diag -B -c로 배터리를 검사합니다. 시계는 date mmddHHMM[YYyy](여러 사용자 로그인 중에는 바꾸지 않음)이나 시간 서버에 묻는 setclock 호스트로 맞춥니다. 6.1부터 TZ에 Olson 시간대 값을 쓸 수 있습니다.
항목 내용
버전 AIX 5.3, AIX 6.1 (6.1에서 32비트 커널이 없어지고 Olson 시간대가 더해짐)
원문 Operating system and device management — 5.3판 164176쪽, 6.1판 4860쪽
파일 /etc/profile, .profile, /etc/methods/cfg64, /etc/motd, <time.h>
관련 명령어 shutdown, prtconf -c, bootinfo -y, lsattr -El proc0, chdev, ha_star, errpt, lsdev, diag -B -c, date, setclock

shutdown 명령은 운영 체제를 멈추는 가장 안전하고 철저한 방법입니다.

다음 경우 시스템을 종료하고 싶을 수 있습니다.

  • 새 소프트웨어를 설치하거나 기존 소프트웨어의 구성을 바꾼 뒤
  • 하드웨어 문제가 있을 때
  • 시스템이 되돌릴 수 없게 멈췄을 때
  • 시스템 성능이 떨어졌을 때
  • 파일 시스템이 손상되었을 가능성이 있을 때

알맞은 플래그를 지정하면 이 명령은 시스템이 곧 꺼진다고 사용자에게 알리고, 모든 기존 프로세스를 끝내고, 파일 시스템을 마운트 해제하고, 시스템을 멈춥니다. 자세한 정보는 shutdown을 봅니다.

특정 종료 상황의 자세한 내용은 다음 정보를 봅니다.

영어 원문

Shutting down the system

The shutdown command is the safest and most thorough way to halt the operating system.

You might want to shut down your system:

  • After installing new software or changing the configuration for existing software

  • When a hardware problem exists

  • When the system is irrevocably hung

  • When system performance is degraded

  • When the file system is possibly corrupt.

When you designate the appropriate flags, this command notifies users that the system is about to go down, kills all existing processes, unmounts file systems, and halts the system. See shutdown for more information.

Review the following information for details on specific shutdown situations:

다시 부팅하지 않고 시스템 종료

다시 부팅하지 않고 시스템을 종료하는 방법은 두 가지입니다.

SMIT 빠른 경로나 shutdown 명령으로 다시 부팅하지 않고 시스템을 종료할 수 있습니다.

text
Prerequisites

시스템을 종료하려면 root 사용자 권한이 있어야 합니다.

SMIT로 시스템을 종료하려면:

  1. root로 로그인합니다.
  2. 명령 프롬프트에서 다음을 입력합니다.
text
smit shutdown

shutdown 명령으로 시스템을 종료하려면:

  1. root로 로그인합니다.
  2. 명령 프롬프트에서 다음을 입력합니다.
text
shutdown
영어 원문

Shutting down the system without rebooting

There are two ways of shutting down the system with no reboot.

You can use two methods to shut down the system without rebooting: the SMIT fastpath, or the shutdown command.

text
Prerequisites

You must have root user authority to shut down the system.

To shut down the system using SMIT:

  1. Log in as root.

  2. At the command prompt, type:

text
smit shutdown

To shut down the system using the shutdown command:

  1. Log in as root.

  2. At the command prompt, type:

text
shutdown

단일 사용자 모드로 시스템 종료

소프트웨어 정비와 진단을 하려고 시스템을 종료해 단일 사용자 모드로 들어가야 할 때가 있습니다.

  1. cd /를 입력해 루트 디렉터리로 갑니다. 파일 시스템이 깔끔하게 마운트 해제되도록 단일 사용자 모드로 종료하려면 루트 디렉터리에 있어야 합니다.
  2. shutdown -m을 입력합니다. 시스템이 단일 사용자 모드로 종료됩니다.

시스템 프롬프트가 나오고 정비 작업을 할 수 있습니다.

영어 원문

Shutting down the system to single-user mode

In some cases, you might need to shut down the system and enter single-user mode to perform software maintenance and diagnostics.

  1. Type cd / to change to the root directory. You must be in the root directory to shut down the system to single-user mode to ensure that file systems are unmounted cleanly.

  2. Type shutdown -m. The system shuts down to single-user mode.

A system prompt displays and you can perform maintenance activities.

긴급 상황에서 시스템 종료

shutdown 명령으로 다른 사용자에게 알리지 않고 시스템을 빨리 멈춥니다.

긴급 상황에서 shutdown 명령으로 시스템을 종료할 수 있습니다.

shutdown -F를 입력합니다. -F 플래그는 shutdown 명령이 다른 사용자에게 메시지를 보내지 않고 시스템을 되도록 빨리 종료하게 합니다.

영어 원문

Shutting down the system in an emergency

Use the shutdown command to stop the system quickly without notifying other users.

You can use the shutdown command to shut down the system under emergency conditions.

Type shutdown -F. The -F flag instructs the shutdown command to bypass sending messages to other users and shut down the system as quickly as possible.

시스템 환경

시스템 환경은 주로 프로세스 실행의 일부 측면을 정의하거나 제어하는 변수 묶음입니다.

이 변수들은 셸이 시작할 때마다 설정되거나 다시 설정됩니다. 시스템 관리 관점에서는 사용자가 로그인할 때 올바른 값으로 설정되도록 하는 것이 중요합니다. 이 변수 대부분은 시스템 초기화 중에 설정됩니다. 그 정의는 /etc/profile 파일에서 읽거나 기본값으로 설정됩니다.

영어 원문

System environment

The system environment is primarily the set of variables that define or control certain aspects of process execution.

They are set or reset each time a shell is started. From the system-management point of view, it is important to ensure the user is set up with the correct values at log in. Most of these variables are set during system initialization. Their definitions are read from the /etc/profile file or set by default.

프로파일

운영 체제에 로그인할 때 셸은 두 종류의 프로파일 파일을 씁니다.

셸은 이 파일들에 든 명령을 평가한 뒤 실행해 시스템 환경을 설정합니다. 두 파일의 기능은 비슷하지만, /etc/profile 파일은 시스템의 모든 사용자의 프로파일 변수를 제어하고 .profile 파일은 자기 환경을 사용자 정의하게 합니다.

다음 프로파일과 시스템 환경 정보를 다룹니다.

  • /etc/profile 파일
  • .profile 파일
  • 시스템 환경 변수 설정
  • 오늘의 메시지 바꾸기
  • 시간 데이터 처리 서비스

/etc/profile 파일

운영 체제가 로그인 때 쓰는 첫 파일은 /etc/profile 파일입니다. 이 파일은 다음 같은 시스템 전체 기본 변수를 제어합니다.

  • export 변수
  • 파일 생성 마스크(umask)
  • 터미널 종류
  • 새 메일이 왔을 때 알리는 메일 메시지

시스템 관리자가 시스템의 모든 사용자를 위해 profile 파일을 구성합니다. 이 파일은 시스템 관리자만 바꿀 수 있습니다.

.profile 파일

운영 체제가 로그인 때 쓰는 둘째 파일은 .profile 파일입니다. .profile 파일은 홈($HOME) 디렉터리에 있으며 개인 작업 환경을 사용자 정의하게 합니다. .profile 파일은 /etc/profile 파일에서 설정한 명령과 변수를 덮어쓰기도 합니다. .profile 파일은 숨김 파일이므로 ls -a 명령으로 나열합니다. .profile 파일로 다음 기본값을 제어합니다.

  • 열 셸
  • 프롬프트 모양
  • 환경 변수(예: 검색 경로 변수)
  • 키보드 소리

다음은 전형적인 .profile 파일의 예입니다.

text
PATH=/usr/bin:/etc:/home/bin1:/usr/lpp/tps4.0/user:/home/gsc/bin::
epath=/home/gsc/e3:
export PATH epath
csh

이 예는 두 경로(PATH와 epath)를 정의하고 export한 뒤 C 셸(csh)을 엽니다.

로그인 셸 변수를 정하는 데도 .profile 파일(없으면 .profile 파일, 원문 그대로)을 쓸 수 있습니다. 다른 셸 환경도 사용자 정의할 수 있습니다. 예를 들어 C 셸과 Korn 셸이 시작할 때 각각 맞추려면 .cshrc(원문은 .chsrc)와 .kshrc 파일을 씁니다.

영어 원문

Profiles

The shell uses two types of profile files when you log in to the operating system.

The shell evaluates the commands contained in the files and then runs the commands to set up your system environment. The files have similar functions except that the /etc/profile file controls profile variables for all users on a system whereas the .profile file allows you to customize your own environment.

The following profile and system environment information is provided:

  • /etc/profile file

  • .profile file

  • System environment variable setup

  • Changing the Message of the Day

  • Time data manipulation services.

/etc/profile file

The first file that the operating system uses at login time is the /etc/profile file. This file controls system-wide default variables such as:

  • Export variables

  • File creation mask (umask)

  • Terminal types

  • Mail messages to indicate when new mail has arrived.

The system administrator configures the profile file for all users on the system. Only the system administrator can change this file.

.profile File

The second file that the operating system uses at login time is the .profile file. The .profile file is present in your home ($HOME) directory and enables you to customize your individual working environment. The .profile file also overrides commands and variables set in the /etc/profile file. Because the .profile file is hidden, use the ls -a command to list it. Use the .profile file to control the following defaults:

  • Shells to open

  • Prompt appearance

  • Environment variables (for example, search path variables)

  • Keyboard sound

The following example shows a typical .profile file:

text
PATH=/usr/bin:/etc:/home/bin1:/usr/lpp/tps4.0/user:/home/gsc/bin::
epath=/home/gsc/e3:
export PATH epath
csh

This example has defined two paths (PATH and epath), exported them, and opened a C shell (csh).

You can also use the .profile file (or if it is not present, the .profile file) to determine login shell variables. You can also customize other shell environments. For example, use the .chsrc and .kshrc files to tailor a C shell and a Korn shell, respectively, when each type shell is started.

시간 데이터 처리 서비스

시간 함수는 현재 시스템 날짜와 시간에 접근하고 형식을 바꿉니다.

시간 함수를 쓰려고 컴파일러에 특별한 플래그를 지정할 필요는 없습니다. 프로그램에 이 함수의 헤더 파일을 넣습니다. 헤더 파일을 넣으려면 다음 문을 씁니다.

text
#include <time.h>

시간 서비스는 다음과 같습니다.

함수 설명
adjtime 시스템 시계를 동기화하도록 시간을 바로잡습니다.
ctime, localtime, gmtime, mktime, difftime, asctime, tzset 날짜와 시간을 문자열 표현으로 바꿉니다.
getinterval, incinterval, absinterval, resinc, resabs, alarm, ualarm, getitimer, setitimer 간격 타이머의 만료 시간을 다룹니다.
gettimer, settimer, restimer, stime, time 지정한 시스템 전체 타이머의 현재 값을 얻거나 설정합니다.
gettimerid 프로세스별 간격 타이머를 할당합니다.
gettimeofday, settimeofday, ftime 날짜와 시간을 얻고 설정합니다.
nsleep, usleep, sleep 현재 프로세스의 실행을 잠시 멈춥니다.
reltimerid 전에 할당한 간격 타이머를 놓아 줍니다.
영어 원문

Time data manipulation services

The time functions access and reformat the current system date and time.

You do not need to specify any special flag to the compiler to use the time functions. Include the header file for these functions in the program. To include a header file, use the following statement:

text
#include <time.h>

The time services are the following:

  • adjtime — Corrects the time to allow synchronization of the system clock.
  • ctime, localtime, gmtime, mktime, difftime, asctime, tzset — Converts date and time to string representation.
  • getinterval, incinterval, absinterval, resinc, resabs, alarm, ualarm, getitimer, setitimer — Manipulates the expiration time of interval timers.
  • gettimer, settimer, restimer, stime, time — Gets or sets the current value for the specified systemwide timer.
  • gettimerid — Allocates a per-process interval timer.
  • gettimeofday, settimeofday, ftime — Gets and sets date and time.
  • nsleep, usleep, sleep — Suspends a current process from running.
  • reltimerid — Releases a previously allocated interval timer.

64비트 모드에 필요한 파일 세트와 하드웨어

커널은 64비트 모드로 실행되어 많은 양의 데이터에 빠르게 접근하고 64비트 데이터 형을 효율적으로 다룹니다.

기본 운영 체제 64비트 런타임 파일 세트는 bos.64bit입니다. bos.64bit를 설치하면 /etc/methods/cfg64 파일도 설치됩니다. /etc/methods/cfg64 파일은 64비트 런타임 환경을 켜는 명령입니다. 이 명령은 부팅 과정 3단계에서 rc.boot 스크립트가 부릅니다. 이 명령은 64비트 실행 파일을 실행하는 데 필요한 syscalls64 커널 확장을 올립니다.

AIX 6.1부터 32비트 커널은 더는 쓰지 않습니다(deprecated). AIX 6.1 기본 운영 체제를 설치하면 64비트 모드가 켜집니다.

참고: AIX 6.1을 실행하려면 하드웨어가 64비트를 지원해야 합니다. 다음 RS/6000 모델은 604e 프로세서를 쓰며 64비트를 지원하지 않습니다.

  • 7025 F50 Series
  • 7026 H50 Series
  • 9076 H50 Series
  • 7043 150 Series
  • 7046 B50 Series

프로세서의 능력을 확인하려면 다음 명령을 실행합니다.

text
/usr/sbin/prtconf -c

prtconf 명령은 프로세서 능력에 따라 32나 64를 돌려줍니다. 시스템에 prtconf 명령이 없으면 bootinfo 명령에 -y 플래그를 쓸 수 있습니다.

영어 원문

Filesets and hardware needed for 64-bit mode

The kernel runs in 64-bit mode, allowing fast access to large amounts of data and efficient handling of 64-bit data types.

The base operating system 64-bit runtime fileset is bos.64bit. Installing bos.64bit also installs the /etc/methods/cfg64 file. The /etc/methods/cfg64 file is a command that enables the 64-bit runtime environment. This command is invoked by the rc.boot script during phase 3 of the boot process. The command loads the syscalls64 kernel extension, which is needed to run a 64-bit executable file.

Beginning with AIX 6.1, the 32-bit kernel has been deprecated. Installing the AIX 6.1 base operating system enables the 64-bit mode.

Note: Hardware must be 64-bit capable to run AIX 6.1. The following RS/6000® models use 604e processors and are not 64-bit capable:

  • 7025 F50 Series

  • 7026 H50 Series

  • 9076 H50 Series

  • 7043 150 Series

  • 7046 B50 Series

To verify the capability of your processor, run the following command:

text
/usr/sbin/prtconf -c

The prtconf command returns either 32 or 64, depending on the capability of your processor. If your system does not have the prtconf command, you can use the bootinfo command with the -y flag.

64비트 모드에 필요한 하드웨어

64비트 응용 프로그램을 실행하려면 64비트 하드웨어가 있어야 합니다.

시스템의 하드웨어 구조가 32비트인지 64비트인지 알아보려면:

  1. root 사용자로 로그인합니다.
  2. 명령행에서 bootinfo -y를 입력합니다.

하드웨어 구조가 32비트인지 64비트인지에 따라 32나 64가 출력됩니다. 또 어느 AIX 버전에서든 lsattr -El proc0을 입력하면 서버의 프로세서 종류가 나옵니다.

영어 원문

Hardware required for 64-bit mode

You must have 64-bit hardware to run 64-bit applications.

To determine whether your system has 32-bit or 64-bit hardware architecture:

  1. Log in as a root user.

  2. At the command line, enter bootinfo -y.

This produces the output of either 32 or 64, depending on whether the hardware architecture is 32-bit or 64-bit. In addition, if you enter lsattr -El proc0 at any version of AIX, the type of processor for your server displays.

32비트와 64비트 성능 비교

64비트 하드웨어는 64비트와 32비트 소프트웨어를 모두 실행할 수 있으므로, 대부분의 경우 64비트 하드웨어에서 32비트 응용 프로그램을 실행하는 것은 문제가 되지 않습니다. 그러나 32비트 하드웨어는 64비트 소프트웨어를 실행할 수 없습니다.

시스템에서 실행하는 응용 프로그램에 성능 문제가 있는지 알아보려면 해당 응용 프로그램의 사용 안내서에서 권장 실행 환경을 봅니다.

영어 원문

32-bit and 64-bit performance comparisons

In most cases, running 32-bit applications on 64-bit hardware is not a problem, because 64-bit hardware can run both 64-bit and 32-bit software. However, 32-bit hardware cannot run 64-bit software.

To find out if any performance issues exist for applications that are running on the system, refer to those application's user guides for their recommended running environment.

기본 브라우저 바꾸기

기본 브라우저를 바꿀 수 있습니다.

이 시나리오의 정보는 특정 AIX 버전으로 시험했습니다. 얻는 결과는 AIX 버전과 수준에 따라 크게 다를 수 있습니다.

이 절차는 defaultbrowser 명령으로 브라우저 창을 여는 응용 프로그램이 쓰는 기본 브라우저를 바꿉니다. 기본 브라우저는 사용자가 infocenter 명령을 쓸 때 실행되는 브라우저입니다. 이 시나리오는 SMIT로 기본 브라우저를 바꾸는 방법을 설명합니다. Web-based System Manager로도 기본 브라우저를 바꿀 수 있습니다.

  1. root 사용자로 바꿉니다.
  2. 명령행에서 다음을 입력합니다.
text
smit change_documentation_services
  1. DEFAULT_BROWSER 필드에 새 웹 브라우저를 실행하는 명령을 입력합니다. 명령에 URL을 넣을 때 필요한 플래그도 함께 적습니다.
text
anybrowser -u http://www.ibm.com

anybrowser에 www.ibm.com 웹 주소를 열려면 필드에 anybrowser -u를 입력합니다. 많은 브라우저(예: Mozilla 웹 브라우저)는 플래그가 필요 없습니다. 브라우저 변경은 다음에 컴퓨터에 로그인할 때 적용됩니다.

영어 원문

Changing the default browser

You can change the default browser.

The information in this how-to scenario was tested using specific versions of AIX. The results you obtain might vary significantly depending on your version and level of AIX.

This procedure changes the default browser that is used by applications that use the defaultbrowser command to open a browser window. The default browser is the browser that is launched when users use the infocenter command. This scenario describes how to use SMIT to change the default browser. You can also use Web-based System Manager to change the default browser.

  1. Change to root user.

  2. On a command line, type:

text
smit change_documentation_services
  1. In the DEFAULT_BROWSER field, type the command that launches your new web browser. Include any flags that are required when a URL is included in the command.
text
anybrowser -u http://www.ibm.com

To open your anybrowser with the www.ibm.com web address open inside, you would type anybrowser -u in the field. Many browsers (for example, the Mozilla Web browser) do not require a flag. The browser change takes effect the next time that you log in to the computer.

동적 프로세서 할당 해제

AIX는 결함 있는 프로세서를 감지해 자동으로 그 프로세서 사용을 멈출 수 있습니다.

기계 종류 7044 모델 270부터, 프로세서가 둘 이상인 모든 시스템의 하드웨어는 고칠 수 있는 오류를 감지할 수 있으며 펌웨어가 이를 모읍니다. 이 오류는 치명적이지 않으며, 드물게 일어나는 한 무시해도 안전합니다. 그러나 특정 프로세서에서 실패 패턴이 생기는 것 같으면, 이 패턴은 그 부품이 가까운 미래에 치명적으로 실패할 가능성이 높다는 뜻일 수 있습니다. 이 예측은 펌웨어가 실패율과 임계값 분석을 바탕으로 합니다.

이런 시스템에서 AIX는 하드웨어를 계속 감시하며 펌웨어에 하드웨어 오류를 정기적으로 묻습니다. 프로세서 오류 수가 임계값에 이르고 펌웨어가 이 시스템 부품이 실패할 뚜렷한 가능성이 있다고 판단하면 펌웨어가 오류 보고를 돌려줍니다. 어느 경우든 오류는 시스템 오류 로그에 기록됩니다. 또 다중 프로세서 시스템에서는 실패 종류에 따라 AIX가 믿을 수 없는 프로세서 사용을 멈추고 할당을 해제하려 합니다. 이 기능을 동적 프로세서 할당 해제(Dynamic Processor Deallocation)라고 합니다.

이 시점에서 펌웨어는 정비 담당자가 프로세서를 교체할 때까지 이후 재부팅에서도 계속 할당 해제하도록 그 프로세서에 표시합니다.

프로세서 할당 해제가 응용 프로그램에 주는 영향

프로세서 할당 해제는 드라이버와 커널 확장을 포함해 대부분의 응용 프로그램에 투명합니다. 그러나 공개된 인터페이스로 응용 프로그램이나 커널 확장이 다중 프로세서 기계에서 실행되는지 판단하고, 프로세서가 몇 개인지 알아내고, 스레드를 특정 프로세서에 묶을(bind) 수 있습니다.

프로세스나 스레드를 프로세서에 묶는 bindprocessor 인터페이스는 bind CPU 번호를 씁니다. bind CPU 번호는 [0..N-1] 범위이며 N은 전체 CPU 수입니다. CPU 번호에 "구멍"이 없다고 가정하는 응용 프로그램이나 커널 확장이 망가지지 않도록, AIX는 응용 프로그램에 언제나 "마지막"(가장 큰 번호의) bind CPU가 할당 해제되는 것처럼 보이게 합니다. 예를 들어 8-way SMP에서 bind CPU 번호는 [0..7]입니다. 프로세서 하나를 할당 해제하면 쓸 수 있는 CPU 총수는 7이 되고 번호는 [0..6]이 됩니다. 밖에서 보면 어느 물리 프로세서가 실패했든 CPU 7이 사라진 것처럼 보입니다.

참고: 이 설명의 나머지에서 CPU는 논리 개체, 프로세서는 물리 개체를 뜻합니다.

프로세서 하나를 할당 해제해야 할 때 AIX가 묶인 스레드를 조용히 끝내거나 다른 CPU로 강제로 옮기면, 프로세스나 스레드를 묶는 응용 프로그램이나 커널 확장이 망가질 수 있습니다. 동적 프로세서 할당 해제는 이런 응용 프로그램과 커널 확장이 프로세서 할당 해제가 곧 일어난다는 알림을 받을 수 있는 프로그래밍 인터페이스를 제공합니다. 알림을 받으면 이 응용 프로그램과 커널 확장은 묶인 스레드와 관련 자원(타이머 요청 블록 등)을 마지막 bind CPU ID에서 옮기고 새 CPU 구성에 맞출 책임이 있습니다.

알림 뒤에도 일부 스레드가 마지막 bind CPU ID에 묶여 있으면 할당 해제가 중단되고, 중단된 할당 해제가 오류 로그에 기록되며, AIX는 문제 있는 프로세서를 계속 씁니다. 그 프로세서가 결국 실패하면 시스템 전체가 실패합니다. 그래서 응용 프로그램이나 커널 확장이 임박한 프로세서 할당 해제 알림을 받고 그에 따라 행동하는 것이 중요합니다.

드물게 할당 해제가 이루어지지 못하는 경우에도, 동적 프로세서 할당 해제는 시스템 관리자에게 미리 경고를 줍니다. 오류를 오류 로그에 기록해, 시스템 전체 실패가 일어나기 전에 문제 있는 부품을 교체하는 정비를 계획할 기회를 줍니다.

프로세서 할당 해제 과정

AIX는 실패하는 프로세서의 할당을 해제해 멈출 수 있습니다.

프로세서 할당 해제의 전형적인 이벤트 흐름은 다음과 같습니다.

  1. 펌웨어가 프로세서 하나가 복구 가능한 오류 임계값에 이르렀음을 감지합니다.
  2. 펌웨어 오류 보고가 시스템 오류 로그에 기록되고, AIX가 프로세서 할당 해제를 지원하는 기계에서 실행 중이면 AIX가 할당 해제 과정을 시작합니다.
  3. AIX가 마지막 bind CPU에 묶인 커널 밖의 프로세스와 스레드에 알립니다.
  4. AIX가 묶인 스레드가 모두 마지막 bind CPU에서 떠나기를 최대 10분까지 기다립니다. 스레드가 계속 묶여 있으면 AIX가 할당 해제를 중단합니다.
  5. 모든 프로세스나 스레드가 문제 있는 프로세서에서 풀리면, 전에 등록한 HAEH(High Availability Event Handler)를 부릅니다. HAEH가 오류를 돌려주면 할당 해제가 중단될 수 있습니다.
  6. 중단되지 않으면 할당 해제 과정이 결국 실패하는 프로세서를 멈춥니다.

할당 해제의 어느 지점에서든 실패하면 실패와 그 원인을 기록합니다. 시스템 관리자는 오류 로그를 보고 (가능하면) 바로잡는 조치를 한 뒤 할당 해제를 다시 시작할 수 있습니다. 예를 들어 응용 프로그램이 묶인 스레드를 풀지 않아 할당 해제가 중단되었으면, 시스템 관리자는 응용 프로그램을 멈추고 할당 해제를 다시 시작한 뒤 응용 프로그램을 다시 시작할 수 있습니다.

동적 프로세서 할당 해제 켜기

기계가 동적 프로세서 할당 해제를 지원하면 SMIT나 시스템 명령으로 기능을 켜거나 끌 수 있습니다.

기계에 이를 지원하는 올바른 하드웨어와 펌웨어가 있으면 설치할 때 동적 프로세서 할당 해제가 기본으로 켜집니다.

SMIT 빠른 경로 절차

  1. root 권한으로 시스템 프롬프트에서 smit system을 입력하고 Enter를 누릅니다.
  2. Systems Environment 창에서 Change / Show Characteristics of Operating System을 고릅니다.
  3. SMIT 대화 상자로 작업을 마칩니다.

작업을 마치는 데 필요한 추가 정보는 SMIT 대화 상자에서 F1 Help 키를 눌러 얻을 수 있습니다.

명령 절차

root 권한으로 다음 명령을 써서 동적 프로세서 할당 해제를 다룰 수 있습니다.

  • chdev 명령으로 지정한 장치의 특성을 바꿉니다. 이 명령의 사용법은 Commands Reference, Volume 1의 chdev를 봅니다.
  • 어떤 이유로든 프로세서 할당 해제가 실패하면, 원인을 고친 뒤 ha_star 명령으로 다시 시작할 수 있습니다. 이 명령의 사용법은 Commands Reference, Volume 2의 ha_star를 봅니다.
  • errpt 명령으로 기록된 오류의 보고서를 만듭니다. 이 명령의 사용법은 Commands Reference, Volume 2의 errpt를 봅니다.

프로세서 할당 해제를 켜고 끄는 방법

동적 프로세서 할당 해제는 ODM 객체 sys0의 cpuguard 속성 값을 바꿔 켜거나 끌 수 있습니다.

이 속성에 쓸 수 있는 값은 enable과 disable입니다.

기본은 켜짐(cpuguard 속성 값이 enable)입니다. 이 기능을 끄려는 시스템 관리자는 Web-based System Manager 시스템 메뉴, SMIT System Environments 메뉴, chdev 명령 가운데 하나를 써야 합니다. (이전 AIX 버전에서는 기본이 꺼짐이었습니다.)

참고: 프로세서 할당 해제를 꺼도 오류는 기록됩니다. 오류 로그에는 AIX가 CPU 문제를 통보받았음을 나타내는 CPU_FAILURE_PREDICTED 같은 오류가 들어 있습니다.

중단된 프로세서 할당 해제 다시 시작

응용 프로그램이 묶인 스레드를 마지막 논리 CPU에서 옮기지 않아 프로세서 할당 해제가 실패할 때가 있습니다.

(안전하면) 묶음을 풀거나 응용 프로그램을 멈춰 이 문제를 고쳤으면, 시스템 관리자는 ha_star 명령으로 프로세서 할당 해제 과정을 다시 시작할 수 있습니다.

이 명령의 구문은 다음과 같습니다.

text
ha_star -C

여기서 -C는 CPU 예측 실패 이벤트를 뜻합니다.

프로세서 상태 고려 사항

프로세서 상태에 관해 생각할 점이 여럿 있습니다.

물리 프로세서는 ODM 데이터베이스에서 procn이라는 객체로 나타내며, n은 물리 프로세서 번호를 나타내는 십진수입니다. ODM 데이터베이스에 나타나는 다른 장치처럼 프로세서 객체에도 Defined/Available 같은 상태와 속성이 있습니다.

proc 객체의 상태는 해당 프로세서가 있는 한 쓸 수 있든 없든 언제나 Available입니다. proc 객체의 state 속성은 프로세서를 쓰고 있는지, 쓰지 않는다면 그 이유를 나타냅니다. 이 속성에는 세 값이 있습니다.

값 뜻
enable 프로세서를 씁니다.
disable 프로세서가 동적으로 할당 해제되었습니다.
faulty 시작할 때 펌웨어가 프로세서를 결함 있다고 선언했습니다.

문제 있는 프로세서가 성공적으로 할당 해제되면 상태가 enable에서 disable로 바뀝니다. AIX와 별개로 이 프로세서는 펌웨어에도 결함 있다고 표시됩니다. 다시 부팅하면 할당 해제된 프로세서는 쓸 수 없고 상태가 faulty로 설정됩니다. 그러나 ODM proc 객체는 여전히 Available로 표시됩니다. proc 객체가 Defined로 바뀌려면 결함 있는 CPU를 시스템 보드에서 물리적으로 빼거나 (가능하면) CPU 보드를 빼야 합니다.

다음 예에서 프로세서 proc4는 올바르게 동작하며 운영 체제가 쓰고 있습니다. 출력은 다음과 같습니다.

text
# lsattr -EH -l proc4
attribute value   description  user_settable
text
type  PowerPC_RS64-III Processor type  False
 #

proc4가 예측 실패를 받으면 운영 체제가 할당을 해제합니다. 출력은 다음과 같습니다.

text
# lsattr -EH -l proc4
attribute value   description  user_settable
text
type  PowerPC_RS64-III Processor type  False
 #

다음 시스템 재시작 때 펌웨어가 proc4를 결함 있다고 보고합니다. 출력은 다음과 같습니다.

text
# lsattr -EH -l proc4
attribute value   description  user_settable
text
type  PowerPC_RS64-III Processor type  False
 #

(위 세 출력에서 state 속성 줄(차례로 enable, disable, faulty)은 PDF 추출에서 빠졌습니다.)

그러나 proc4의 상태는 다음과 같이 Available로 남습니다.

text
# lsdev -CH -l proc4
name  status   location  description
name status location description
proc4 Available 00-04 Processor

할당 해제 오류 로그 항목

CPU 할당 해제와 관련된 오류 로그 메시지는 세 가지입니다.

다음은 그 예입니다.

errpt 짧은 형식 — 요약

다음은 (옵션 없이) errpt 명령이 보여 주는 항목의 예입니다.

text
# errpt
IDENTIFIER      TIMESTAMP       T    C    RESOURCE_NAME    DESCRIPTION
804E987A        1008161399      I    O    proc4            CPU DEALLOCATED
8470267F        1008161299      T    S    proc4            CPU DEALLOCATION ABORTED
1B963892        1008160299      P    H    proc4            CPU FAILURE PREDICTED
#
  • 프로세서 할당 해제가 켜져 있으면 CPU FAILURE PREDICTED 메시지 뒤에는 언제나 CPU DEALLOCATED 메시지나 CPU DEALLOCATION ABORTED 메시지가 따라옵니다.
  • 프로세서 할당 해제가 켜져 있지 않으면 CPU FAILURE PREDICTED 메시지만 기록됩니다. CPU FAILURE PREDICTED 메시지가 하나 이상 기록된 뒤 언제든 프로세서 할당 해제를 켜면, 할당 해제 과정이 시작되어 실패한다고 보고된 프로세서마다 위에서 설명한 대로 성공이나 실패 오류 로그 항목이 생깁니다.

errpt 긴 형식 — 자세한 설명

다음은 errpt -a로 얻는 출력 형식입니다.

  • CPU_FAIL_PREDICTED

    오류 설명: 예측 프로세서 실패(Predictive Processor Failure). 이 오류는 하드웨어가 프로세서가 가까운 미래에 실패할 가능성이 높다고 감지했음을 나타냅니다. 프로세서 할당 해제가 켜져 있든 아니든 언제나 기록됩니다.

    DETAIL DATA: 물리 프로세서 번호, 위치

긴 형식 오류 로그 항목 예

text
LABEL:   CPU_FAIL_PREDICTED
IDENTIFIER:  1655419A
Date/Time:  Thu Sep 30 13:42:11
Sequence Number: 53
Machine Id:  00002F0E4C00
Node Id:  auntbea
Class:   H
Type:   PEND
Resource Name:  proc25
Resource Class:  processor
Resource Type:  proc_rspc
Location:  00-25
Description
CPU FAILURE PREDICTED
Probable Causes
CPU FAILURE
Failure Causes
CPU FAILURE
 Recommended Actions
 ENSURE CPU GARD MODE IS ENABLED
 RUN SYSTEM DIAGNOSTICS.
Detail Data
PROBLEM DATA
0144 1000 0000 003A 8E00 9100 1842 1100 1999 0930 4019
0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 4942 4D00 5531
2E31 2D50 312D 4332 0000
0002 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000
... ... ... ... ...
  • CPU_DEALLOC_SUCCESS

    오류 설명: 예측 프로세서 실패를 감지한 뒤 프로세서를 성공적으로 할당 해제했습니다. 이 메시지는 프로세서 할당 해제가 켜져 있고 CPU를 성공적으로 할당 해제했을 때 기록됩니다.

    DETAIL DATA: 할당 해제한 프로세서의 논리 CPU 번호

예: 긴 형식 오류 로그 항목

text
LABEL:   CPU_DEALLOC_SUCCESS
IDENTIFIER:  804E987A
Date/Time:  Thu Sep 30 13:44:13
Sequence Number: 63
Machine Id:  00002F0E4C00
Node Id:  auntbea
Class:   O
Type:   INFO
Resource Name:  proc24
Description
CPU DEALLOCATED
 Recommended Actions
 MAINTENANCE IS REQUIRED BECAUSE OF CPU FAILURE
Detail Data
LOGICAL DEALLOCATED CPU NUMBER
 0

이 예에서 proc24는 성공적으로 할당 해제되었으며, 실패가 일어났을 때 논리 CPU 0이었습니다.

  • CPU_DEALLOC_FAIL

    오류 설명: 예측 프로세서 실패로 인한 프로세서 할당 해제가 성공하지 못했습니다. 이 메시지는 CPU 할당 해제가 켜져 있고 CPU를 성공적으로 할당 해제하지 못했을 때 기록됩니다.

    DETAIL DATA: 이유 코드, 논리 CPU 번호, 실패 종류에 따른 추가 정보

이유 코드는 16진수 숫자 값입니다. 가능한 이유 코드는 다음과 같습니다.

이유 코드 뜻
2 프로세스나 스레드 하나 이상이 마지막 논리 CPU에 묶여 있습니다. 이 경우 자세한 데이터에 문제 프로세스의 PID가 나옵니다.
3 등록된 드라이버나 커널 확장이 알림을 받고 오류를 돌려주었습니다. 이 경우 자세한 데이터 필드에 문제 드라이버나 커널 확장의 이름(ASCII 인코딩)이 들어 있습니다.
4 프로세서를 할당 해제하면 기계에 쓸 수 있는 CPU가 둘보다 적어집니다. 이 운영 체제는 N-way 기계에서 N-2개보다 많은 프로세서를 할당 해제하지 않습니다. 쓸 수 있는 프로세서 총수로 다중 프로세서 잠금을 건너뛰어도 안전한 단일 프로세서(UP) 시스템인지 대칭 다중 프로세서(SMP)인지 판단하는 응용 프로그램이나 커널 확장이 혼란스럽지 않게 하려는 것입니다.
200 (0xC8) 프로세서 할당 해제가 꺼져 있습니다(ODM 속성 cpuguard 값이 disable). ha_star를 직접 시작하지 않는 한 보통 이 오류는 보이지 않습니다.

예: 긴 형식 오류 로그 항목

예 1

text
 LABEL:   CPU_DEALLOC_ABORTED
 IDENTIFIER:  8470267F
 Date/Time:  Thu Sep 30 13:41:10
 Sequence Number: 50
 Machine Id:  00002F0E4C00
 Node Id:  auntbea
 Class:   S
 Type:   TEMP
 Resource Name:  proc26
Description
CPU DEALLOCATION ABORTED
Probable Causes
SOFTWARE PROGRAM
Failure Causes
SOFTWARE PROGRAM
 Recommended Actions
 MAINTENANCE IS REQUIRED BECAUSE OF CPU FAILURE
 SEE USER DOCUMENTATION FOR CPU GARD
Detail Data
DEALLOCATION ABORTED CAUSE
0000 0003
DEALLOCATION ABORTED DATA
6676 6861 6568 3200

이 예에서 proc26의 할당 해제가 실패했습니다. 이유 코드 3은 커널 확장이 커널 알림 루틴에 오류를 돌려주었다는 뜻입니다. 위 DEALLOCATION ABORTED DATA는 fvhaeh2를 나타내며, 이는 확장이 커널에 등록할 때 쓴 이름입니다.

예 2

text
 LABEL:   CPU_DEALLOC_ABORTED
 IDENTIFIER:  8470267F
 Date/Time:  Thu Sep 30 14:00:22
 Sequence Number: 71
 Machine Id:  00002F0E4C00
 Node Id:  auntbea
 Class:   S
 Type:   TEMP
 Resource Name:  proc19
Description
CPU DEALLOCATION ABORTED
Probable Causes
SOFTWARE PROGRAM
Failure Causes
SOFTWARE PROGRAM
 Recommended Actions
 MAINTENANCE IS REQUIRED BECAUSE OF CPU FAILURE;
 SEE USER DOCUMENTATION FOR CPU GARD
Detail Data
DEALLOCATION ABORTED CAUSE
0000 0002
DEALLOCATION ABORTED DATA
0000 0000 0000 4F4A

이 예에서 proc19의 할당 해제가 실패했습니다. 이유 코드 2는 스레드가 마지막 논리 프로세서에 묶여 있었고 SIGCPUFAIL 신호를 받은 뒤에도 풀리지 않았다는 뜻입니다. DEALLOCATION ABORTED DATA는 이 스레드가 프로세스 0x4F4A에 속했음을 보여 줍니다. ps 명령의 옵션(-o THREAD, -o BND)으로 모든 스레드나 프로세스와, 해당하면 묶인 CPU 번호를 함께 나열할 수 있습니다.

예 3

text
 LABEL:   CPU_DEALLOC_ABORTED
 IDENTIFIER:  8470267F
 Date/Time:  Thu Sep 30 14:37:34
 Sequence Number: 106
 Machine Id:  00002F0E4C00
 Node Id:  auntbea
 Class:   S
 Type:   TEMP
 Resource Name:  proc2
Description
CPU DEALLOCATION ABORTED
Probable Causes
SOFTWARE PROGRAM
Failure Causes
SOFTWARE PROGRAM
 Recommended Actions
 MAINTENANCE IS REQUIRED BECAUSE OF CPU FAILURE
 SEE USER DOCUMENTATION FOR CPU GARD
Detail Data
DEALLOCATION ABORTED CAUSE
0000 0004
DEALLOCATION ABORTED DATA
0000 0000 0000 0000

이 예에서 proc2의 할당 해제는 실패 당시 활성 프로세서가 둘 이하였기 때문에 실패했습니다(이유 코드 4).

영어 원문

Dynamic Processor Deallocation

AIX can detect and automatically stop using a faulty processor.

Starting with machine type 7044 model 270, the hardware of all systems with two or more processors is able to detect correctable errors, which are gathered by the firmware. These errors are not fatal and, as long as they remain rare occurrences, can be safely ignored. However, when a pattern of failures seems to be developing on a specific processor, this pattern might indicate that this component is likely to exhibit a fatal failure in the near future. This prediction is made by the firmware based on the failure rates and threshold analysis.

On these systems, AIX implements continuous hardware surveillance and regularly polls the firmware for hardware errors. When the number of processor errors hits a threshold and the firmware recognizes that there is a distinct probability that this system component will fail, the firmware returns an error report. In

all cases, the error is logged in the system error log. In addition, on multiprocessor systems, depending on the type of failure, AIX attempts to stop using the untrustworthy processor and deallocate it. This feature is called Dynamic Processor Deallocation.

At this point, the processor is also flagged by the firmware for persistent deallocation for subsequent reboots, until maintenance personnel replaces the processor.

Processor deallocation impacts to applications

Processor deallocation is transparent for the vast majority of applications, including drivers and kernel extensions. However, you can use the published interfaces to determine whether an application or kernel extension is running on a multiprocessor machine, find out how many processors there are, and bind threads to specific processors.

The bindprocessor interface for binding processes or threads to processors uses bind CPU numbers. The bind CPU numbers are in the range [0..N-1] where N is the total number of CPUs. To avoid breaking applications or kernel extensions that assume no "holes" in the CPU numbering, AIX always makes it appear for applications as if it is the "last" (highest numbered) bind CPU to be deallocated. For instance, on an 8-way SMP, the bind CPU numbers are [0..7]. If one processor is deallocated, the total number of available CPUs becomes 7, and they are numbered [0..6]. Externally, it looks like CPU 7 has disappeared, regardless of which physical processor failed.

Note: In the rest of this description, the term CPU is used for the logical entity and the term processor for the physical entity.

Potentially, applications or kernel extensions that are binding processes or threads could be broken if AIX silently terminated their bound threads or forcefully moved them to another CPU when one of the processors needs to be deallocated. Dynamic Processor Deallocation provides programming interfaces so that such applications and kernel extensions can be notified that a processor deallocation is about to happen. When these applications and kernel extensions receive notification, they are responsible for moving their bound threads and associated resources (such as timer request blocks) away from the last bind CPU ID and for adapting themselves to the new CPU configuration.

After notification, if some threads remain bound to the last bind CPU ID, the deallocation is aborted, the aborted deallocation is logged in the error log, and AIX continues using the ailing processor. When the processor ultimately fails, it causes a total system failure. Therefore, it is important that applications or kernel extensions receive notification of an impending processor deallocation and act on this notice.

Even in the rare cases that the deallocation cannot go through, Dynamic Processor Deallocation still gives advanced warning to system administrators. By recording the error in the error log, it gives them a chance to schedule a maintenance operation on the system to replace the ailing component before a global system failure occurs.

Processor deallocation process

AIX can stop a failing processor by deallocating it.

The typical flow of events for processor deallocation is as follows:

  1. The firmware detects that a recoverable error threshold has been reached by one of the processors.

  2. The firmware error report is logged in the system error log, and, when AIX is executing on a machine that supports processor deallocation, AIX starts the deallocation process.

  3. AIX notifies non-kernel processes and threads bound to the last bind CPU.

  4. AIX waits up to ten minutes for all the bound threads to move away from the last bind CPU. If threads remain bound, AIX aborts the deallocation.

  5. If all processes or threads are unbound from the ailing processor, the previously registered High Availability Event Handlers (HAEHs) are invoked. An HAEH might return an error that aborts the deallocation.

  6. Unless aborted, the deallocation process ultimately stops the failing processor.

If there is a failure at any point of the deallocation, the failure and its cause are logged. The system administrator can look at the error log, take corrective action (when possible) and restart the deallocation. For instance, if the deallocation was aborted because an application did not unbind its bound threads, the system administrator can stop the application, restart the deallocation, and then restart the application.

Enabling Dynamic Processor Deallocation

If your machine supports Dynamic Processor Deallocation, you can use SMIT or system commands to turn the feature on or off.

Dynamic Processor Deallocation is enabled by default during installation, provided the machine has the correct hardware and firmware to support it.

SMIT fastpath procedure

  1. With root authority, type smit system at the system prompt, then press Enter.

  2. In the Systems Environment window, select Change / Show Characteristics of Operating System.

  3. Use the SMIT dialogs to complete the task.

To obtain additional information for completing the task, you can select the F1 Help key in the SMIT dialogs.

Commands procedure

With root authority, you can use the following commands to work with the Dynamic Processor Deallocation:

  • Use the chdev command to change the characteristics of the device specified. For information about using this command, see chdev in the Commands Reference, Volume 1.

  • If the processor deallocation fails for any reason, you can use the ha_star command to restart it after it has been fixed. For information about using this command, see ha_star in the Commands Reference, Volume 2.

  • Use the errpt command to generate a report of logged errors. For information about using this command, see errpt in the Commands Reference, Volume 2.

Methods of turning processor deallocation on and off

Dynamic Processor Deallocation can be enabled or disabled by changing the value of the cpuguard attribute of the ODM object sys0.

The possible values for the attribute are enable and disable.

The default is enabled (the attribute cpuguard has a value of enable). System administrators who want to disable this feature must use either the Web-based System Manager system menus, the SMIT System Environments menu, or the chdev command. (In previous AIX versions, the default was disabled.)

Note: If processor deallocation is turned off (disabled), the errors are still logged. The error log will contain an error such as CPU_FAILURE_PREDICTED, indicating that AIX was notified of a problem with a CPU.

Restarting an aborted processor deallocation

Sometimes the processor deallocation fails because an application did not move its bound threads away from the last logical CPU.

Once this problem has been fixed, either by unbinding (when it is safe to do so) or by stopping the application, the system administrator can restart the processor deallocation process using the ha_star command.

The syntax for this command is:

text
ha_star -C

where -C is for a CPU predictive failure event.

Processor state considerations

There are several things you should consider about processor states.

Physical processors are represented in the ODM database by objects named procn where n is a decimal number that represents the physical processor number. Like any other device represented in the ODM database, processor objects have a state, such as Defined/Available, and attributes.

The state of a proc object is always Available as long as the corresponding processor is present, regardless of whether it is usable. The state attribute of a proc object indicates if the processor is used and, if not, the reason. This attribute can have three values:

  • enable — The processor is used.
  • disable — The processor has been dynamically deallocated.
  • faulty — The processor was declared defective by the firmware at startup time.

If an ailing processor is successfully deallocated, its state goes from enable to disable. Independently of AIX, this processor is also flagged in the firmware as defective. Upon reboot, the deallocated processor will not be available and will have its state set to faulty. The ODM proc object, however, is still marked Available. You must physically remove the defective CPU from the system board or remove the CPU board (if possible) for the proc object to change to Defined.

In the following example, processor proc4 is working correctly and is being used by the operating system, as shown in the following output:

text
# lsattr -EH -l proc4
attribute value   description  user_settable
text
type  PowerPC_RS64-III Processor type  False
 #

When processor proc4 gets a predictive failure, it gets deallocated by the operating system, as shown in the following:

text
# lsattr -EH -l proc4
attribute value   description  user_settable
text
type  PowerPC_RS64-III Processor type  False
 #

At the next system restart, processor proc4 is reported by firmware as defective, as shown in the following:

text
# lsattr -EH -l proc4
attribute value   description  user_settable
text
type  PowerPC_RS64-III Processor type  False
 #

But the status of processor proc4 remains Available, as shown in the following:

text
# lsdev -CH -l proc4
name  status   location  description
proc4 Available 00-04 Processor
#

Deallocation error log entries

Three different error log messages are associated with CPU deallocation.

The following are examples.

errpt short format - summary

The following is an example of entries displayed by the errpt command (without options):

text
# errpt
IDENTIFIER      TIMESTAMP       T    C    RESOURCE_NAME    DESCRIPTION
804E987A        1008161399      I    O    proc4            CPU DEALLOCATED
8470267F        1008161299      T    S    proc4            CPU DEALLOCATION ABORTED
1B963892        1008160299      P    H    proc4            CPU FAILURE PREDICTED
#
  • If processor deallocation is enabled, a CPU FAILURE PREDICTED message is always followed by either a CPU DEALLOCATED message or a CPU DEALLOCATION ABORTED message.

  • If processor deallocation is not enabled, only the CPU FAILURE PREDICTED message is logged. Enabling processor deallocation any time after one or more CPU FAILURE PREDICTED messages have been logged initiates the deallocation process and results in a success or failure error log entry, as described above, for each processor reported failing.

errpt long format - detailed description

The following is the form of output obtained with errpt -a:

  • CPU_FAIL_PREDICTED

Error description: Predictive Processor Failure

This error indicates that the hardware detected that a processor has a high probability to fail in a near future. It is always logged whether or not processor deallocation is enabled.

DETAIL DATA: Physical processor number, location

Example error log entry - long form

(32줄짜리 예는 위 한글 본문에 그대로 실었습니다.)

  • CPU_DEALLOC_SUCCESS Error Description: A processor has been successfully deallocated after detection of a predictive processor failure. This message is logged when processor deallocation is enabled, and when the CPU has been successfully deallocated. DETAIL DATA: Logical CPU number of deallocated processor.

Example: error log entry - long form

(16줄짜리 예는 위 한글 본문에 그대로 실었습니다.)

In this example, proc24 was successfully deallocated and was logical CPU 0 when the failure occurred.

  • CPU_DEALLOC_FAIL Error Description: A processor deallocation, due to a predictive processor failure, was not successful. This message is logged when CPU deallocation is enabled, and when the CPU has not been successfully deallocated. DETAIL DATA: Reason code, logical CPU number, additional information depending of the type of failure.

The reason code is a numeric hexadecimal value. The possible reason codes are:

  • 2 — One or more processes/threads remain bound to the last logical CPU. In this case, the detailed data give the PIDs of the offending processes.
  • 3 — A registered driver or kernel extension returned an error when notified. In this case, the detailed data field contains the name of the offending driver or kernel extension (ASCII encoded).
  • 4 — Deallocating a processor causes the machine to have less than two available CPUs. This operating system does not deallocate more than N-2 processors on an N-way machine to avoid confusing applications or kernel extensions using the total number of available processors to determine whether they are running on a Uni Processor (UP) system where it is safe to skip the use of multiprocessor locks, or a Symmetric Multi Processor (SMP).
  • 200 (0xC8) — Processor deallocation is disabled (the ODM attribute cpuguard has a value of disable). You normally do not see this error unless you start ha_star manually.

Examples: error log entries - long format

Example 1

(23줄짜리 예는 위 한글 본문에 그대로 실었습니다.)

In this example, the deallocation for proc26 failed. The reason code 3 means that a kernel extension returned an error to the kernel notification routine. The DEALLOCATION ABORTED DATA above spells fvhaeh2, which is the name the extension used when registering with the kernel.

Example 2

(23줄짜리 예는 위 한글 본문에 그대로 실었습니다.)

In this example, the deallocation for proc19 failed. The reason code 2 indicates thread(s) were bound to the last logical processor and did not unbind after receiving the SIGCPUFAIL signal. The DEALLOCATION ABORTED DATA shows that these threads belonged to process 0x4F4A. Options of the ps command (-o THREAD, -o BND) allow you to list all threads or processes along with the number of the CPU they are bound to, when applicable.

Example 3

(23줄짜리 예는 위 한글 본문에 그대로 실었습니다.)

In this example, the deallocation of proc2 failed because there were two or fewer active processors at the time of failure (reason code 4).

시스템 환경 변수 설정

시스템 환경은 주로 프로세스 실행의 일부 측면을 정의하거나 제어하는 변수 묶음입니다.

이 변수들은 셸이 시작할 때마다 설정되거나 다시 설정됩니다. 시스템 관리 관점에서는 사용자가 로그인할 때 올바른 값으로 설정되도록 하는 것이 중요합니다. 이 변수 대부분은 시스템 초기화 중에 설정됩니다. 그 정의는 /etc/profile 파일에서 읽거나 기본값으로 설정됩니다.

시스템 배터리 검사

시스템이 시간을 자꾸 잃으면 배터리가 닳았거나 연결이 끊긴 것이 원인일 수 있습니다.

  1. 시스템 배터리 상태를 알아보려면 다음 diag 명령을 입력합니다.
text
diag -B -c
  1. Diagnostics 주 메뉴가 나오면 Problem Determination 옵션을 고릅니다. 배터리 연결이 끊겼거나 닳았으면 SRN(service request number)과 함께 문제 메뉴가 나옵니다. Problem Summary Form의 항목 4에 SRN을 기록하고 하드웨어 서비스 조직에 문제를 보고합니다.

시스템 배터리가 동작한다면, date나 setclock 명령을 잘못 실행했거나 실행에 실패해 시스템 시간이 잘못 재설정되었을 수 있습니다.

시스템 시계 설정

시스템 시계는 시스템 이벤트의 시간을 기록하고, 시스템 이벤트를 예약하게 하며(예: 새벽 3시에 하드웨어 진단 실행), 파일을 처음 만든 때나 마지막으로 저장한 때를 알려 줍니다.

date 명령으로 시스템 시계를 설정합니다. setclock 명령으로 시간 서버에 연락해 시간과 날짜를 설정합니다.

date 명령

date 명령은 날짜와 시간을 보여 주거나 설정합니다.

시스템이 현재 날짜와 시간을 무엇으로 알고 있는지 보려면 다음 명령을 입력합니다.

text
/usr/bin/date

주의: 둘 이상의 사용자가 시스템을 쓰고 있을 때는 날짜를 바꾸지 않습니다.

Date 매개변수로 날짜를 설정할 때 다음 형식을 쓸 수 있습니다.

  • mmddHHMMYYyy
  • mmddHHMM[yy]

Date 매개변수의 변수는 다음과 같이 정의합니다.

변수 뜻
mm 달 번호
dd 그 달의 날 번호
HH 하루 중 시(24시간제)
MM 분 번호
YY 네 자리 연도의 앞 두 자리
yy 연도의 뒤 두 자리

root 권한으로 date 명령을 써서 현재 날짜와 시간을 설정할 수 있습니다. 예:

text
date 021714252002

이렇게 하면 날짜를 2002년 2월 17일로, 시간을 14:25로 설정합니다. date 명령에 관한 자세한 정보는 Commands Reference, Volume 2의 설명을 봅니다.

setclock 명령

setclock 명령은 네트워크의 시간 서버에 현재 시간을 요청해 시간과 날짜를 보여 주거나 설정합니다.

시스템의 날짜와 시간을 보려면 다음을 입력합니다.

text
/usr/sbin/setclock

setclock 명령은 시간 서버의 첫 응답을 받아, 거기 있는 달력 시계 값을 바꿔 로컬 날짜와 시간으로 보여 줍니다. 시간 서버가 응답하지 않거나 네트워크가 동작하지 않으면 setclock 명령은 그렇다는 메시지를 보여 주고 날짜와 시간 설정을 바꾸지 않습니다.

참고: inetd 데몬을 실행하는 호스트는 어느 것이든 시간 서버 역할을 할 수 있습니다.

root 권한으로 setclock 명령을 써서 시간 서버 호스트에 인터넷 TIME 서비스 요청을 보내고 그에 따라 로컬 날짜와 시간을 설정할 수 있습니다. 예:

text
setclock TimeHost

여기서 TimeHost는 시간 서버의 호스트 이름이나 IP 주소입니다.

Olson 시간대 지원과 설정(6.1)

AIX 6.1부터 Olson 데이터베이스와 맞는 시간대 값을 지원합니다.

이전 AIX 릴리스가 지원한 POSIX 시간대 규격은 일광 절약 시간 같은 시간대 규칙의 변경을 충분히 다루지 못합니다. Olson 데이터베이스는 시간대 규칙의 역사 기록을 유지하므로, 특정 지역의 규칙이 바뀌어도 AIX가 현재와 과거의 날짜와 시간을 모두 올바르게 해석합니다.

POSIX 규격을 따르는 시간대 정의도 여전히 AIX가 지원하고 인식합니다. AIX는 TZ 환경 변수를 확인해 Olson 시간대 값과 맞는지 판단합니다. TZ 환경 변수가 Olson 시간대 값과 맞지 않으면 AIX는 POSIX 규격 규칙을 따릅니다.

TZ 환경 변수에 관한 자세한 내용은 Environment file을 봅니다.

Olson이 정의한 값으로 시간대를 설정하려면 다음 SMIT 경로를 씁니다. System Environments > Change / Show Date, Time and Time Zone > Change Time Zone Using System Defined Values.

오늘의 메시지 설정

오늘의 메시지(message of the day)는 사용자가 시스템에 로그인할 때마다 나옵니다.

설치된 소프트웨어 버전 번호나 현재 시스템 소식 같은 정보를 모든 사용자에게 전하는 편리한 방법입니다. 오늘의 메시지를 바꾸려면 좋아하는 편집기로 /etc/motd 파일을 편집합니다.

영어 원문

System environment variable setup

The system environment is primarily the set of variables that define or control certain aspects of process execution.

They are set or reset each time a shell is started. From the system-management point of view, it is important to ensure the user is set up with the correct values at login. Most of these variables are set during system initialization. Their definitions are read from the /etc/profile file or set by default.

Testing the system battery

If your system is losing track of time, the cause might be a depleted or disconnected battery.

  1. To determine the status of your system battery, type the following diag command:
text
diag -B -c
  1. When the Diagnostics main menu appears, select the Problem Determination option. If the battery is disconnected or depleted, a problem menu will be displayed with a service request number (SRN). Record the SRN on Item 4 of the Problem Summary Form and report the problem to your hardware service organization.

If your system battery is operational, your system time might have been reset incorrectly because either the date or setclock command was run incorrectly or unsuccessfully.

Related concepts

“Setting up the system clock” The system clock records the time of system events, allows you to schedule system events (such as running hardware diagnostics at 3:00 a.m.), and tells when you first created or last saved files.

Setting up the system clock

The system clock records the time of system events, allows you to schedule system events (such as running hardware diagnostics at 3:00 a.m.), and tells when you first created or last saved files.

Use the date command to set your system clock. Use the setclock command to set the time and date by contacting a time server.

Related tasks

“Testing the system battery” If your system is losing track of time, the cause might be a depleted or disconnected battery.

date command:

The date command displays or sets the date and time.

Enter the following command to determine what your system recognizes as the current date and time:

text
/usr/bin/date

Attention: Do not change the date when the system is running with more than one user.

The following formats can be used when setting the date with the Date parameter:

  • mmddHHMM[YYyy] (default)

  • mmddHHMM[yy]

The variables to the Date parameter are defined as follows:

  • mm — Specifies the number of the month.
  • dd — Specifies the number of the day in the month.
  • HH — Specifies the hour in the day (using a 24-hour clock).
  • MM — Specifies the minute number.
  • YY — Specifies the first two digits of a four-digit year.
  • yy — Specifies the last two numbers of the year.

With root authority, you can use the date command to set the current date and time. For example:

text
date 021714252002

Sets the date to Feb. 17, 2002, and time to 14:25. For more information about the date command, see its description in Commands Reference, Volume 2.

setclock command:

The setclock command displays or sets the time and date by requesting the current time from a time server on a network.

To display your system's date and time, enter:

text
/usr/sbin/setclock

The setclock command takes the first response from the time server, converts the calendar clock reading found there, and shows the local date and time. If no time server responds, or if the network is not operational, the setclock command displays a message to that effect and leaves the date and time settings unchanged.

Note: Any host running the inetd daemon can act as a time server.

With root authority, you can use the setclock command to send an Internet TIME service request to a time server host and sets the local date and time accordingly. For example:

text
setclock TimeHost

Where TimeHost is the host name or IP address of the time server.

Related information

setclock command

Olson time zone support and setup

Beginning with AIX 6.1, support for time zone values consistent with the Olson database are provided.

The POSIX time zone specification supported in previous AIX releases, does not adequately handle changes to time zone rules such as daylight saving time. The Olson database maintains a historical record of time zone rules, so that if the rules change in a specific location, AIX interprets dates and time correctly both in the present and in the past.

Time zone definitions conforming to the POSIX specification are still supported and recognized by AIX. AIX checks the TZ environment variable to determine if the environment variable matches an Olson time zone value. If the TZ environment variable does not match an Olson time zone value, AIX then follows the POSIX specification rules.

For more details about the TZ environment variable, refer to Environment file.

To set the time zone using Olson defined values, use the following SMIT path: System Environments > Change / Show Date, Time and Time Zone > Change Time Zone Using System Defined Values.

Message of the day setup

The message of the day is displayed every time a user logs in to the system.

It is a convenient way to communicate information to all users, such as installed software version numbers or current system news. To change the message of the day, use your favorite editor to edit the /etc/motd file.