[AIX 운영 체제와 장치 관리 29] BSD 시스템 관리자 참조 — 4.3 BSD와 AIX의 차이, 파일 비교표, 계정·백업·시작·페이징·네트워크·암호 파일 관리, 성능 조정

핵심 정리

  • AIX는 네트워크 데몬을 /etc/rc.local이 아니라 /etc/inittab이 부르는 /etc/rc.tcpip에서 시작하며, SRC가 돌면 TCP/IP 데몬도 SRC 아래에서 실행됩니다. smit setbootup_option으로 BSD 방식 rc 구성으로 바꿀 수 있습니다.
  • 구성 데이터는 스탠자 형식 ASCII 파일이나 ODM(/etc/objrepos)에 저장하며, ODM 명령을 직접 쓰는 것은 다른 방법이 실패할 때만 합니다. 디스크는 물리 볼륨·볼륨 그룹·논리 볼륨이고 파일 시스템 목록은 /etc/filesystems의 스탠자입니다.
  • 암호화한 암호는 /etc/security/passwd, 나머지 보안 정보는 /etc/security/user·limits에 있습니다. /bin/sh는 /bin/ksh에 대한 하드 링크이며 셸 스크립트의 setuid·setgid는 지원하지 않습니다.
  • AIX의 backup·restore·rdump는 BSD dump·restore와 형식이 같지만 인수 앞에 -를 붙입니다. 시작은 System V 방식 /etc/inittab이며 chitab·lsitab·mkitab·rmitab와 telinit q를 씁니다.
  • 사용자당 최대 프로세스 기본값은 40이며 chdev -l sys0 -a maxuproc=100으로 바꿉니다. vmstat·iostat는 지원하지만 systat과 load average는 지원하지 않습니다.
항목 내용
버전 AIX 6.1 (5.3판과 거의 같음)
원문 Operating system and device management — 5.3판 475490쪽, 6.1판 312324쪽
관련 명령어 odmget, smit setbootup_option, crfs, varyonvg, backup, restore, rdump, chitab, mkitab, chps, lsps, mkps, no, iptrace, pwdck, usrck, mkpasswd, lsattr, chdev
관련 파일 /etc/rc.tcpip, /etc/inittab, /etc/objrepos, /etc/filesystems, /etc/security/passwd, /etc/qconfig, /etc/rc.net, /etc/rc.bsdnet, /etc/rc.nfs

이 부록은 4.3 BSD UNIX나 System V 운영 체제에 익숙한 시스템 관리자를 위한 것입니다. 그 시스템과 AIX의 차이점과 공통점을 설명합니다.

이 부록에서 다루는 주제는 다음과 같습니다.

영어 원문

BSD systems reference

This appendix is for system administrators who are familiar with 4.3 BSD UNIX or System V operating systems. This information explains the differences and the similarities between those systems and AIX.

Topics discussed in this appendix are:

BSD 개념

BSD(Berkeley Software Distribution)를 다루기 전에 BSD와 AIX의 차이 몇 가지를 알아야 합니다.

BSD 시스템 관리자를 위한 AIX 소개

다음은 BSD 시스템 관리자가 AIX 관리를 시작하는 데 도움이 되는 팁입니다.

  • 그래픽 콘솔에서 root로 로그인해 시작합니다.
  • 시스템에 익숙해질 때까지 시스템 콘솔에서 시스템을 관리합니다. 원격 터미널보다 시스템 콘솔에서 작업하는 것이 쉽습니다. 익숙해지면 xterm이나 ASCII 터미널에서 원격으로 작업할 수 있습니다.
  • 시스템 관리 작업에 AIX의 여러 기능을 활용합니다.
    • SMIT(System Management Interface Tool) — 시스템 관리자와 구성·관리 명령 사이의 인터페이스로, 대부분의 시스템 관리 작업을 도와줍니다.
    • ODM(Object Data Manager) — ODM 데이터베이스의 객체에 접근하는 루틴을 제공합니다. ODM 데이터베이스에는 장치 구성 정보가 들어 있습니다.
    • SRC(System Resource Controller) — 단일 인터페이스로 데몬과 다른 시스템 자원에 접근하고 제어합니다.

관련 개념

  • 많은 장치 구성 — 장치에는 프린터, 드라이브, 어댑터, 버스, 인클로저 같은 하드웨어와 error·null 특수 파일 같은 의사 장치가 있습니다. 장치 드라이버는 /usr/lib/drivers 디렉터리에 있습니다.
  • 시스템 자원 제어기

4.3 BSD와 AIX의 주요 차이

다음은 AIX와 4.3 BSD 시스템의 주요 차이를 요약한 것입니다.

AIX에서는 네트워크 데몬을 /etc/rc.local 파일이 아니라 /etc/rc.tcpip 파일에서 시작합니다. /etc/rc.tcpip 셸 스크립트는 /etc/rc 파일이 아니라 /etc/inittab 파일에서 호출합니다.

SRC가 실행 중이면 TCP/IP 데몬은 SRC 제어 아래에서 실행됩니다. TCP/IP 데몬을 SRC 제어 아래에서 실행하지 않으려면 smit setbootup_option 빠른 경로로 시스템을 BSD 방식 rc 구성으로 바꿉니다.

4.3 BSD에 있는 다음 네트워크 관리 기능을 AIX도 지원합니다.

  • 커널 수준 SYSLOG 기록 기능
  • UNIX 도메인 소켓의 접근 권한

구성 데이터 저장

4.3 BSD는 보통 구성 데이터를 ASCII 파일에 저장합니다. 관련 정보는 같은 줄에 두며 레코드 처리(정렬과 검색)는 ASCII 파일에서 바로 할 수 있습니다. 레코드 길이는 다를 수 있고 줄 바꿈으로 끝납니다. 4.3 BSD는 커질 수 있는 일부 ASCII 파일을 데이터베이스(dbm) 형식으로 바꾸는 도구를 제공합니다. 관련 라이브러리 함수는 dbm 파일 쌍이 있으면 그것을, 없으면 원래 ASCII 파일을 찾습니다.

AIX의 일부 구성 데이터도 ASCII 파일에 저장하지만 흔히 스탠자 형식입니다. 스탠자는 여러 줄로 묶어 저장한 관련 정보 묶음입니다. 각 정보에는 파일 내용을 이해하기 쉽게 레이블이 붙습니다.

AIX는 암호와 사용자 정보의 dbm 판도 지원합니다. 또 /etc/passwd, /etc/group, /etc/inittab 파일은 정보를 스탠자가 아닌 전통 형식으로 저장하는 AIX 파일의 예입니다.

AIX의 다른 구성 데이터는 ODM이 관리하는 파일에 저장합니다. Web-based System Manager나 SMIT로 ODM 파일의 정보를 다루고 볼 수 있습니다. ODM 명령으로 직접 볼 수도 있습니다. ODM 파일을 조회하려면 다음 명령을 씁니다.

  • odmget
  • odmshow

다음 ODM 명령은 ODM 파일을 바꿉니다.

  • odmadd
  • odmcreate
  • odmdrop
  • odmchange
  • odmdelete

주의: ODM 파일을 잘못 바꾸면 시스템이 실패하고 다시 시작하지 못할 수 있습니다. Web-based System Manager나 SMIT가 만드는 작업별 명령이 실패할 때만 ODM 파일에 ODM 명령을 직접 씁니다.

구성 관리

AIX 시스템이 시작하면 구성 관리자가 구성별 명령 묶음을 호출합니다. 이 명령을 메서드라고 합니다. 메서드는 시스템의 장치를 식별하고 /etc/objrepos 디렉터리의 해당 ODM 파일을 갱신합니다. /dev의 장치 특수 파일은 미리 설치돼 있지 않습니다. 하드 디스크용 같은 일부 특수 파일은 시작 구성 과정에서 자동으로 만들어집니다. ASCII 터미널용 같은 다른 특수 파일은 시스템 관리자가 Web-based System Manager Devices 응용 프로그램이나 SMIT Devices 메뉴로 만들어야 합니다. 이 정보는 나중에 시스템이 쓰도록 ODM에 유지됩니다.

디스크 관리

AIX에서 디스크 드라이브는 물리 볼륨, 파티션은 논리 볼륨이라고 합니다. 4.3 BSD처럼 물리 볼륨 하나에 논리 볼륨이 여럿 있을 수 있습니다. 그러나 4.3 BSD와 달리 AIX의 논리 볼륨 하나는 여러 물리 볼륨에 걸칠 수 있습니다. 그러려면 여러 물리 볼륨을 볼륨 그룹으로 만들고 그 볼륨 그룹에 논리 볼륨을 만듭니다.

AIX에서 파일 시스템과 볼륨 관리에 쓰는 명령은 다음과 같습니다.

  • crfs
  • varyonvg
  • varyoffvg
  • lsvg
  • importvg
  • exportvg

다음 4.3 BSD 명령도 쓸 수 있습니다.

  • mkfs
  • fsck
  • fsdb
  • mount
  • umount

이 명령의 4.3 BSD와 AIX 차이는 BSD 4.3 시스템 관리자를 위한 파일 시스템 절에서 다룹니다. 4.3 BSD는 파일 시스템 목록을 /etc/fstab 파일에 둡니다. AIX는 파일 시스템마다 /etc/filesystems 파일에 스탠자를 둡니다.

tn3270 명령

tn3270 명령은 telnet 명령에 대한 링크지만 /etc/map3270 파일과 현재 TERM 환경 변수 값으로 3270 키보드 대응을 제공합니다. 그래서 tn3270 명령은 BSD판과 똑같이 동작합니다.

tn3270, telnet, tn 명령의 기본 이스케이프 시퀀스를 바꾸려면 명령을 시작하기 전에 TNESC 환경 변수를 설정합니다.

새 명령

새 구성과 디스크 관리 체계를 다루려고 AIX에는 4.3 BSD 관리자에게 새로운 명령이 약 150개 있습니다.

시작

AIX는 장치의 자동 식별과 구성을 지원합니다. 그래서 시작 과정이 4.3 BSD 시스템과 아주 다릅니다. 커널에 더해 부트 파일 시스템 이미지와 이전 기본 장치 구성 정보를 RAM 디스크에 적재합니다. 시작 첫 단계에서는 논리 볼륨에 접근할 수 있을 만큼 구성 정보를 적재하고 확인합니다. 페이징 공간 장치를 커널에 알리고 하드 디스크의 루트 파일 시스템을 검사합니다. 이때 운영 체제는 루트 파일 시스템을 RAM 디스크에서 하드 디스크로 바꾸고, 다른 장치 구성을 포함한 시작 절차를 마칩니다.

사용자 인증

4.3 BSD와 SVR4 이전 AT&T UNIX 운영 체제는 암호화한 암호를 포함한 모든 사용자 인증 정보를 /etc/passwd 파일에 저장합니다. 전통적으로 /etc/passwd 파일은 누구나 읽을 수 있었습니다.

SVR4 시스템에서는 암호화한 암호를 /etc/passwd 파일에서 빼서 /etc/shadow 파일에 저장합니다. /etc/shadow 파일은 root 권한 사용자와 신뢰 프로그램(/bin/login 등)만 읽을 수 있습니다.

AIX는 암호화한 암호를 /etc/security/passwd 파일에 저장합니다. /etc/security 디렉터리의 다른 파일로는 user와 limits가 있습니다. 이 세 파일이 사용자가 시스템에 접근하는 방법(rlogin이나 telnet 명령 등)과 사용자 자원 한도(파일 크기, 주소 공간 등)를 정합니다.

인쇄

대부분의 4.3 BSD 인쇄 명령을 조금 다르게 지원합니다. 한 가지 차이는 AIX의 구성 파일이 /etc/qconfig 파일이라는 점입니다.

AIX의 라인 인쇄 시스템은 4.3 BSD 라인 인쇄 시스템과 함께 동작할 수 있어, 4.3 BSD 시스템에 인쇄 작업을 보내거나 4.3 BSD 시스템이 보낸 작업을 인쇄할 수 있습니다.

셸

AIX는 Bourne 셸, C 셸, Korn 셸을 지원합니다. Bourne 셸 프로그램의 전체 경로 이름은 /bin/bsh입니다. /bin/sh 파일은 /bin/ksh 파일에 대한 하드 링크입니다. 이 파일은 관리자가 바꿀 수 있습니다.

AIX는 어떤 셸에서든 셸 스크립트의 setuid나 setgid를 지원하지 않습니다.

참고

  1. AIX에는 /bin/sh에 의존하는 셸 스크립트가 없습니다. 그러나 다른 시스템의 많은 셸 스크립트는 /bin/sh가 Bourne 셸이라는 데 의존합니다.
  2. Bourne 셸과 Korn 셸은 비슷하지만 Korn 셸이 Bourne 셸의 완전한 상위 집합은 아닙니다.

관련 참조

  • BSD 4.3 시스템 관리자를 위한 시스템 관리 명령

4.3 BSD, SVR4, AIX의 파일 비교표

다음 표는 4.3 BSD, SVR4, AIX의 파일 이름과 기능을 비교합니다.

표 61. 파일 비교표

4.3 BSD 파일 SVR4 파일 AIX 파일 데이터베이스 형(odm/dbm)
L-Devices Devices Devices no
L-dialcodes Dialcodes Dialcodes no
L.cmds Permissions Permissions no
L.sys Systems Systems no
USERFILE Permissions Permissions no
aliases mail/namefiles aliases aliasesDB/DB dbm
fstab vfstab filesystems no
ftpusers ftpusers ftpusers no
gettytab N/A
group group group no
hosts hosts hosts no
hosts.equiv hosts.equiv hosts.equiv no
inetd.conf inetd.conf inetd.conf no
map3270 N/A map3270 no
motd motd motd no
mtab mnttab N/A no
named.boot named.boot named.boot no
named.ca named.ca no
named.hosts named.data(참고 보기) no
named.local named.local no
named.pid named.pid named.pid no
named.rev named.rev no
networks networks networks no
passwd passwd passwd no
printcap qconfig qconfig
protocols protocols no
remote remote remote no
resolv.conf resolv.conf resolv.conf no
sendmail.cf sendmail.cf sendmail.cf sendmail.cfDB neither
services services no
shells shells N/A
stab N/A
syslog.conf syslog.conf no
syslog.pid syslog.pid no
termcap terminfo terminfo
ttys ttys N/A yes odm
types N/A
utmp utmp utmp
vfont N/A
vgrindefs vgrindefs
wtmp wtmp wtmp

참고: named.ca, named.hosts, named.local, named.rev 파일 이름은 named.boot 파일에서 사용자가 정할 수 있습니다. 그러나 AIX 문서에서는 이 파일들에 이 이름을 씁니다.

이름과 주소 해석

libc 라이브러리의 gethostbyname과 gethostbyaddr 서브루틴은 DNS(Domain Name Service), NIS(Network Information Services, 예전 이름 Yellow Pages), /etc/hosts 데이터베이스를 지원합니다.

/etc/resolv.conf 파일이 있으면 늘 네임 서버를 먼저 확인합니다. 이름이 해석되지 않고 NIS가 실행 중이면 NIS를 확인합니다. NIS가 실행 중이 아니면 /etc/hosts 파일을 확인합니다.

BSD 4.3 시스템 관리자를 위한 온라인 문서와 man 명령

AIX는 man -k, apropos, whatis 명령을 지원하지만, 이 명령이 쓰는 데이터베이스는 먼저 catman -w 명령으로 만들어야 합니다.

man 명령은 먼저 /usr/man/cat? 파일에서 일반 텍스트 페이지를 찾고, 다음으로 /usr/man/man? 파일에서 nroff 형식 페이지를 찾습니다. 새 man 페이지는 일반 텍스트나 nroff 형식으로 더할 수 있습니다.

참고

  • man 명령의 텍스트 페이지는 시스템과 함께 제공되지 않습니다. catman 명령이 이 텍스트 페이지로 데이터베이스를 만듭니다. 페이지는 /usr/man/cat? 파일의 일반 텍스트나 /usr/man/man? 파일의 nroff 형식일 수 있습니다.
  • man 명령이 nroff 형식 페이지를 읽으려면 nroff 명령을 쓸 수 있도록 Text Formatting 라이선스 프로그램이 설치돼 있어야 합니다.

자세한 내용은 man, apropos, whatis, catman 명령을 봅니다.

BSD 4.3 시스템 관리자를 위한 NFS와 NIS(예전 Yellow Pages)

다음은 BSD 4.3 시스템 관리자를 위한 NFS와 NIS 설명입니다.

NFS(Network File System)와 NIS 데몬은 /etc/rc.nfs 파일에서 시작합니다. 그러나 NFS와 NIS 데몬을 시작하기 전에 /etc/rc.tcpip 파일에서 portmap 데몬을 시작해야 합니다. 기본적으로 /etc/rc.nfs 파일은 /etc/inittab 파일이 호출하지 않습니다. /etc/inittab 파일에 /etc/rc.nfs 스크립트를 호출하는 줄을 더하면 /etc/rc.tcpip 스크립트 뒤에 호출해야 합니다.

NIS가 활성이면 /etc/passwd 파일의 +::(더하기, 콜론, 콜론) 항목 앞에 root 항목을, /etc/group 파일의 +:: 항목 앞에 system 항목을 넣습니다. 그래야 시스템이 NIS 서버와 통신할 수 없을 때도 시스템 관리자가 root로 로그인해 변경할 수 있습니다.

NFS는 Web-based System Manager(wsm을 입력하고 Network 선택)나 SMIT 빠른 경로 smit nfs로 구성합니다. Web-based System Manager와 SMIT 메뉴는 NIS(예전 Yellow Pages)를 NIS라고 부릅니다. 많은 NFS와 NIS 명령은 /etc와 /usr/etc 디렉터리에 있습니다.

일부 NFS 환경에서는 arch 명령으로 기계 계열과 종류를 식별합니다. 예를 들어 IBM RS/6000을 쓴다면 계열(CPU)에 power 식별자를, 종류(기계)에 ibm6000 식별자를 지정합니다.

BSD 4.3 시스템 관리자를 위한 사용자 암호

AIX의 /bin/passwd 명령을 root 사용자로 쓰면 현재 root 사용자 암호를 묻습니다.

다음은 /bin/passwd 명령을 쓰는 예입니다.

text
# passwd cslater
Changing password for "cslater"
Enter root’s Password or
cslater’s Old password:
cslater’s New password:
Re-enter cslater’s
new password:
#

4.3 BSD판은 현재 root 사용자 암호를 묻지 않습니다. 다음은 4.3 BSD판의 예입니다.

text
# passwd cslater
New password:
Retype new password:
#
영어 원문

BSD concepts

Before you start working with Berkeley Software Distribution (BSD) you need to understand some of the difference between BSD and AIX.

Introduction to AIX for BSD system managers

The following are tips to help Berkeley Software Distribution (BSD) system managers get started managing AIX.

  • Start by logging in as root at the graphics console.

  • Perform system management from the system console until you become experienced with the system. It is easier to work from the system console than a remote terminal. Once you are experienced with the system, you can work remotely from an xterm or an ASCII terminal.

  • Take advantage of the several AIX facilities for system management tasks. They include: – System Management Interface Tool (SMIT). SMIT provides an interface between system managers and configuration and management commands. SMIT can help system managers perform most system administration tasks. – The Object Data Manager (ODM). The ODM provides routines that access objects from the ODM databases. The ODM databases contain device configuration information – The System Resource Controller (SRC). The SRC provides access and control of daemons and other system resources through a single interface.

Related concepts

Configuration of a large number of devices Devices include hardware components such as, printers, drives, adapters, buses, and enclosures, as well as pseudo-devices, such as the error special file and null special file. Device drivers are located in the /usr/lib/drivers directory. System Resource Controller The System Resource Controller (SRC) provides a set of commands and subroutines to make it easier for the system manager and programmer to create and control subsystems.

Major differences between 4.3 BSD and AIX

The following is a summary of the major differences between AIX and 4.3 BSD systems.

On AIX, the network daemons are started from the /etc/rc.tcpip file, not the /etc/rc.local file. The /etc/rc.tcpip shell script is invoked from the /etc/inittab file, not the /etc/rc file.

If the System Resource Controller (SRC) is running, the TCP/IP daemons run under SRC control. If you do not want the TCP/IP daemons running under SRC control, use the smit setbootup_option fast path to change the system to BSD-style rc configuration.

These network management functions available on 4.3 BSD are supported by AIX:

  • Kernel-level SYSLOG logging facilities

  • Access rights for UNIX domain sockets.

Configuration data storage

4.3 BSD usually stores configuration data in ASCII files. Related pieces of information are kept on the same line and record processing (sorting and searching) can be done on the ASCII file itself. Records can vary in length and are terminated by a line feed. 4.3 BSD provides tools to convert some potentially large ASCII files to a database (dbm) format. Relevant library functions search the pair of dbm files if they exist, but search the original ASCII file if the dbm files are not found.

Some configuration data for AIX is stored in ASCII files, but often in a stanza format. A stanza is a set of related pieces of information stored in a group of several lines. Each piece of information has a label to make the contents of the file more understandable.

AIX also supports dbm versions of password and user information. Furthermore, the /etc/passwd, /etc/group, and /etc/inittab files are examples of files for AIX where the information is stored in traditional form rather than in stanza form.

Other configuration data for AIX are stored in files maintained by the Object Data Manager (ODM). Web-based System Manager or the System Management Interface Tool (SMIT) can manipulate and display information in ODM files. Alternatively, you can use the ODM commands directly to view these files. To query the ODM files, use the following commands:

  • odmget

  • odmshow.

The following ODM commands alter ODM files:

  • odmadd

  • odmcreate

  • odmdrop

  • odmchange

  • odmdelete.

Attention: Altering ODM files incorrectly can cause the system to fail, and might prevent you from successfully restarting the system. Only use ODM commands directly on ODM files when task-specific commands, such as those generated by Web-based System Manager or SMIT, are unsuccessful.

Configuration management

When a system running AIX starts up, a set of configuration-specific commands are invoked by the Configuration Manager. These configuration-specific commands are called methods. Methods identify the devices on the system and update the appropriate ODM files in the /etc/objrepos directory. Device special files in the /dev directly are not preinstalled. Some special files, such as those for hard disks, are created automatically during the startup configuration process. Other special files, such as those for ASCII terminals, must be created by the system administrator by using the Web-based System Manager Devices application or the SMIT Devices menu. This information is retained in the ODM for later use by the system.

Disk management

In AIX, disk drives are referred to as physical volumes. Partitions are referred to as logical volumes. As in 4.3 BSD, a single physical volume can have multiple logical volumes. However, unlike 4.3 BSD, a single logical volume in AIX can span multiple physical volumes. To do this, you must make several physical volumes into a volume group and create logical volumes on the volume group.

Commands in AIX used for file system and volume management include:

  • crfs

  • varyonvg

  • varyoffvg

  • lsvg

  • importvg

  • exportvg.

The following 4.3 BSD commands are also available:

  • mkfs

  • fsck

  • fsdb

  • mount

  • umount.

Differences between these commands for 4.3 BSD and for AIX are discussed in File systems for BSD 4.3 system managers. 4.3 BSD maintains a list of file systems in the /etc/fstab file. AIX maintains a stanza for each file system in the /etc/filesystems file.

The tn3270 command

The tn3270 command is a link to the telnet command, but it uses the /etc/map3270 file and the current TERM environment variable value to provide 3270 keyboard mappings. Thus, the tn3270 command operates exactly like the BSD version.

If you want to change the escape sequences from the defaults used by the tn3270, telnet, or tn commands, set the TNESC environment variable before starting these commands.

New commands

To handle new configuration and disk management systems, AIX has about 150 commands that are new to 4.3 BSD administrators.

Startup

AIX supports automatic identification and configuration of devices. Consequently, the startup process is very different from 4.3 BSD systems. In addition to the kernel, an image of a boot file system and the previous base device configuration information is loaded to a RAM disk. In the first phase of startup, sufficient configuration information is loaded and checked to permit accessing logical volumes. The paging space device is identified to the kernel and the hard disk root file system is checked. At this time, the operating system changes the root file system from the RAM disk to the hard disk and completes the startup procedure, including configuring other devices.

User authorization

4.3 BSD, and versions of AT&T UNIX operating systems before SVR4, store all user authentication information, including encrypted passwords, in the /etc/passwd file. Traditionally, the /etc/passwd file could be read by all.

On SVR4 systems, encrypted passwords are removed from the /etc/passwd file and stored in the /etc/shadow file. Only users with root authority and trusted programs (such as the /bin/login program) can read the /etc/shadow file.

AIX stores encrypted passwords in the /etc/security/passwd file. Other files in the /etc/security directory are the user and limits files. These three files define the way a user is allowed to access the system (such as using the rlogin or telnet commands) and the user's resource limits (such as file size and address space).

Printing

Most 4.3 BSD printing commands are supported with minor differences. One difference is that the /etc/qconfig file is the configuration file in AIX.

The line printing system for AIX can interoperate with the 4.3 BSD line printing system, both for submitting print jobs to 4.3 BSD systems and for printing jobs submitted from a 4.3 BSD system.

Shells

AIX supports the Bourne shell, C shell and Korn shell. The full path name for the Bourne shell program is /bin/bsh. The /bin/sh file is a hard link to the /bin/ksh file. This file can be changed by the administrator.

AIX does not support setuid or setgid for shell scripts in any shell.

Note

  1. AIX has no shell scripts that rely on the /bin/sh. However, many shell scripts from other systems rely on /bin/sh being the Bourne shell.

  2. Although the Bourne shell and Korn shell are similar, the Korn shell is not a perfect superset of the Bourne shell.

Related reference

Commands for system administration for BSD 4.3 system managers This list contains commands that are specifically for administering the environment for AIX.

File comparison table for 4.3 BSD, SVR4, and AIX

The following table compares file names and functions between 4.3 BSD, SVR4, and AIX.

Table 61. File Comparison Table

4.3 BSD File SVR4 File File for AIX Database Type (odm/dbm)
L-Devices Devices Devices no
L-dialcodes Dialcodes Dialcodes no
L.cmds Permissions Permissions no
L.sys Systems Systems no
USERFILE Permissions Permissions no
aliases mail/namefiles aliases aliasesDB/DB dbm
fstab vfstab filesystems no
ftpusers ftpusers ftpusers no
gettytab N/A
group group group no
hosts hosts hosts no
hosts.equiv hosts.equiv hosts.equiv no
inetd.conf inetd.conf inetd.conf no
map3270 N/A map3270 no
motd motd motd no
mtab mnttab N/A no
named.boot named.boot named.boot no
named.ca named.ca no
named.hosts named.data (See note) no
named.local named.local no
named.pid named.pid named.pid no
named.rev named.rev no
networks networks networks no
passwd passwd passwd no
printcap qconfig qconfig
protocols protocols no
remote remote remote no
resolv.conf resolv.conf resolv.conf no
sendmail.cf sendmail.cf sendmail.cf sendmail.cfDB neither
services services no
shells shells N/A
stab N/A
syslog.conf syslog.conf no
syslog.pid syslog.pid no
termcap terminfo terminfo
ttys ttys N/A yes odm
types N/A
utmp utmp utmp
vfont N/A
vgrindefs vgrindefs
wtmp wtmp wtmp

Note: The file names named.ca, named.hosts, named.local, and named.rev are user definable in the named.boot file. However, these are the names used for these files in the documentation for AIX.

Name and address resolution

The gethostbyname and gethostbyaddr subroutines in the libc library provide support for Domain Name Service, Network Information Services (NIS, formerly called Yellow Pages), and the /etc/hosts database.

If the /etc/resolv.conf file exists, the name server is always checked first. If the name is not resolved and NIS is running, NIS is checked. If NIS is not running, the /etc/hosts file is checked.

Online documentation and man command for BSD 4.3 system managers:

AIX supports the man-k, apropos, and whatis commands, but the database used by these commands must first be created with the catman-w command.

The man command first searches for flat text pages in the /usr/man/cat? files. Next, it searches nroff-formatted pages in /usr/man/man? files. New man pages can be added in flat text or nroff form.

Note

  • The man command text pages are not provided with the system. The catman command creates the database from these text pages. These pages can be either flat text pages stored in the /usr/man/cat? files or nroff-formatted pages stored the in /usr/man/man? files.

  • The Text Formatting licensed program must be installed for the nroff command to be available for the man command to read nroff-formatted man pages.

For more information about these commands, see man, apropos, whatis, and catman.

NFS and NIS (formerly Yellow Pages) for BSD 4.3 system managers:

The following describes NFS and NIS for BSD 4.3 system managers.

Network File System (NFS) and Network Information Services (NIS) daemons are started from the /etc/rc.nfs file. However, before the NFS and NIS daemons can be started, the portmap daemon must be started in the /etc/rc.tcpip file. By default, the /etc/rc.nfs file is not invoked by the /etc/inittab file. If you add a line in the /etc/inittab file to invoke the /etc/rc.nfs script, it should be invoked after the /etc/rc.tcpip script.

If NIS is active, include a root entry prior to the +:: (plus sign, colon, colon) entry in the /etc/passwd file and a system entry prior to the +:: entry in the /etc/group file. This allows a system administrator to log in as root and make changes if the system is unable to communicate with the NIS server.

NFS can be configured by using Web-based System Manager (type wsm, then select Network), or the SMIT fast path, smit nfs. The Web-based System Manager and SMIT menus refer to NIS (formerly Yellow Pages) as NIS. Many of the NFS and NIS commands are found in the /etc and /usr/etc directory.

Some NFS environments use an arch command to identify machine families and types of machines. For example if you are using the IBM® RS/6000, specify the power identifier for family (CPU), and the ibm6000 identifier for type (machine).

User passwords for BSD 4.3 system managers

When you use the /bin/passwd command for AIX as the root user, you are prompted for the current root user password.

An example of using the /bin/passwd command follows:

text
# passwd cslater
Changing password for "cslater"
Enter root’s Password or
cslater’s Old password:
cslater’s New password:
Re-enter cslater’s
new password:
#

The 4.3 BSD version does not prompt for the current root user password. An example of the 4.3 BSD version follows:

text
# passwd cslater
New password:
Retype new password:
#

BSD 관리

성능 측정, 인쇄, 시스템 관리에 쓸 수 있는 BSD 명령이 여럿 있습니다.

BSD 4.3 시스템 관리자를 위한 계정

AIX의 /usr/lib/acct 디렉터리의 계정 파일과 /usr/lib/sa 디렉터리의 시스템 활동 보고 도구는 AT&T System V Release 4(SVR4)의 것과 같으며 4.3 BSD 계정 유틸리티가 더해져 있습니다.

많은 계정 명령이 /usr/lib/acct 디렉터리에 있습니다. 시스템 계정을 시작하려면 /usr/lib/acct/startup 명령을 씁니다. 계정이 시작되지 않으면 lastcomm(1) 같은 명령은 정보를 돌려줄 수 없습니다.

AIX는 다음 4.3 BSD 계정 기능을 제공합니다.

명령 설명
last(1) 사용자와 터미널의 마지막 로그인을 알려 줍니다.
lastcomm(1) 마지막으로 실행한 명령을 역순으로 보여 줍니다.
acct(3) 프로세스 계정을 켜고 끕니다.
ac(8) 로그인 계정
accton(8) 시스템 계정을 켜거나 끕니다.
sa(8) 시스템 계정 파일을 전반적으로 관리합니다.

AIX는 다음 SVID(System V Interface Definition) Issue II 계정 명령과 라이브러리 함수도 제공합니다.

명령 설명
acctcms(1) 계정 레코드로 명령 사용 요약을 만듭니다.
acctcom(1) 고른 프로세스 계정 레코드 요약을 보여 줍니다.
acctcon1(1) 로그인·로그오프 레코드를 세션 레코드로 바꿉니다.
acctcon2(1) 로그인·로그오프 레코드를 총 계정 레코드로 바꿉니다.
acctdisk(1) diskusg(1) 명령 출력으로 총 계정 레코드를 만듭니다.
acctmerg(1) 총 계정 파일을 중간 파일로 합칩니다.
accton(1) 계정을 켭니다.
acctprc1(1) acct(3) 명령의 계정 정보를 처리합니다.
acctprc2(1) acctprc1(1) 명령의 출력을 총 계정 레코드로 처리합니다.
acctwtmp(1) 접속 시간 계정 레코드를 다룹니다.
chargefee(1) 로그인 이름에 요금을 청구합니다.
ckpacct(1) /usr/adm/pacct 파일 크기를 확인합니다.
diskusg(1) 디스크 계정 정보를 만듭니다.
dodisk(1) 디스크 계정을 합니다.
fwtmp(1) 바이너리 레코드(wtmp 파일)를 서식 있는 ASCII로 바꿉니다. 참고: wtmp 파일은 /var/adm 디렉터리에 있습니다.
lastlogin(1) 각 사람이 마지막으로 로그인한 날짜를 갱신합니다.
monacct(1) 월간 요약 파일을 만듭니다.
prctmp(1) acctcon1(1) 명령이 만든 세션 레코드 파일을 출력합니다.
prdaily(1) 어제 계정 정보 보고서를 서식화합니다.
prtacct(1) 총 계정 파일을 서식화해 출력합니다.
runacct(1) 일별 계정을 실행합니다.
shutacct(1) 시스템 종료 때 호출돼 계정을 멈추고 이유를 기록합니다.
startup(1) 시스템 초기화 때 호출돼 계정을 시작합니다.
turnacct(1) 프로세스 계정을 켜거나 끕니다.
wtmpfix(1) wtmp 형식 파일의 시각·날짜 스탬프를 바로잡습니다.

BSD 4.3 시스템 관리자를 위한 백업

BSD 4.3 시스템 관리자는 데이터를 백업할 수 있습니다.

tar와 cpio 명령으로 시스템 사이에 데이터를 옮길 수 있습니다. AIX의 tar 명령은 4.3 BSD tar 명령과 완전히 호환되지 않습니다. AIX의 tar 명령은 파이프에서 읽으면 -B 플래그(블록 입력)가 필요합니다. AT&T cpio 명령은 이 판과 호환됩니다.

AIX는 dump와 restore 명령 형식으로 읽고 쓸 수 있습니다. 예를 들어 다음 구문의 AIX backup 명령은

text
backup -0uf Device Filesystemname

다음 구문의 4.3 BSD dump 명령과 같습니다.

text
dump 0uf Device Filesystemname

마찬가지로 다음 구문의 AIX restore 명령은

text
restore -mivf Device

다음 구문의 4.3 BSD restore 명령과 같습니다.

text
restore ivf Device

AIX에는 4.3 BSD rdump와 rrestore 명령도 있습니다. 두 판의 유일한 차이는 AIX에서는 각 인수 앞에 -(대시)를 붙여야 한다는 것입니다. 예를 들어 다음 명령은

text
rdump -0 -f orca:/dev/rmt0 /dev/hd2

다음 4.3 BSD 명령과 같습니다.

text
rdump 0f orca:/dev/rmt0 /dev/hd2

다음 구문의 AIX backup 명령은

text
backup -0f /dev/rmt0 /dev/hd2

다음 구문의 4.3 BSD dump 명령과 같습니다.

text
dump 0f /dev/rmt0 /dev/hd2

IBM이 아닌 SCSI 테이프 지원

AIX는 IBM이 아닌 SCSI 테이프 드라이브를 직접 지원하지 않습니다. 그러나 IBM SCSI 드라이버를 쓰는 자체 헤더와 인터페이스를 더할 수 있습니다.

관련 개념

  • 시스템 백업 — 시스템을 쓰기 시작하면 다음으로 파일 시스템, 디렉터리, 파일을 백업해야 합니다. 백업해 두면 하드 디스크가 고장 나도 파일이나 파일 시스템을 복원할 수 있습니다.

관련 정보

  • 지원하지 않는 장치를 시스템에 더하기

BSD 4.3 시스템 관리자를 위한 시작

다음은 BSD 4.3 시스템 관리자를 위한 AIX 시스템 시작 설명입니다.

4.3 BSD 시스템에서 init 프로그램은 시작 절차의 마지막 단계입니다. init 프로그램의 주된 역할은 쓸 수 있는 터미널 포트마다 프로세스를 만드는 것입니다. 쓸 수 있는 터미널 포트는 /etc/ttys 파일을 읽어 찾습니다.

System V에서는 init 프로그램을 시스템 초기화 때 시작합니다. init 프로세스는 /etc/inittab 파일의 항목에 따라 프로세스를 시작합니다.

AIX는 System V 초기화 절차를 따릅니다. /etc/inittab 파일은 직접 편집하거나, telinit 명령을 쓰거나, 다음 명령으로 편집할 수 있습니다.

명령 설명
chitab(1) /etc/inittab 파일의 레코드를 바꿉니다.
lsitab(1) /etc/inittab 파일의 레코드를 나열합니다.
mkitab(1) /etc/inittab 파일에 레코드를 만듭니다.
rmitab(1) /etc/inittab 파일의 레코드를 지웁니다.

/etc/inittab 파일의 변경은 다음에 시스템을 재부팅하거나 telinit q 명령을 실행할 때 효과를 냅니다.

BSD 4.3 시스템 관리자를 위한 파일 찾기와 살펴보기

AIX는 다음 4.3 BSD 파일 명령을 지원합니다.

  • which
  • whereis
  • what
  • file

AIX는 find 명령의 4.3 BSD 빠른 찾기(fast find) 구문을 지원하지 않습니다. 지금은 대체 기능이 없습니다. 다음 ffind 셸 스크립트로 그 기능을 흉내 낼 수 있습니다.

text
#!/bin/bsh
PATH=/bin
for dir in /bin /etc /lib /usr
do
find $dir -print | egrep $1
done

ffind 스크립트의 구문은 다음과 같습니다.

text
ffind Filename

BSD 4.3 시스템 관리자를 위한 페이징 공간

다음 명령은 페이징 공간(스왑 공간이라고도 함) 관리를 돕습니다.

명령 설명
chps(1) 페이징 공간의 속성을 바꿉니다.
lsps(1) 페이징 공간의 속성을 나열합니다.
mkps(1) 시스템에 페이징 공간을 더합니다.
rmps(1) 시스템에서 페이징 공간을 지웁니다.
swapoff(1) 페이징 공간 하나 이상을 비활성화합니다.
swapon(1) 페이징과 스와핑에 쓸 장치를 더 지정합니다.

큰 페이징 공간이 필요하면 하드 디스크마다 페이징 논리 볼륨을 하나씩 둡니다. 그러면 여러 디스크 드라이브에 걸쳐 페이징을 스케줄할 수 있습니다.

4.3 BSD ASCII 구성을 허용하도록 기본 시작 바꾸기

AIX의 네트워크 인터페이스는 SMIT와 ODM 파일로, 또는 4.3 BSD ASCII 구성 파일로 관리할 수 있습니다.

4.3 BSD ASCII 구성 파일로 네트워크 인터페이스를 관리하려면 /etc/rc.net 파일에서 다음 제목 아래의 명령 주석을 풉니다.

text
# Part II - Traditional
Configuration

그런 다음 단순 파일 구성과 SRC 지원을 함께 원하면 /etc/rc.net 파일을 편집해 hostname, ifconfig, route 명령의 주석을 풀고 알맞은 매개변수를 넣습니다.

SRC 지원 없이 단순 파일 구성을 원하면 smit setbootup_option 빠른 경로로 시스템을 BSD 방식 rc 구성으로 바꿉니다. 이 옵션은 시스템이 시작할 때 /etc/rc.bsdnet 파일을 쓰도록 구성합니다. /etc/rc.bsdnet 파일도 편집해 hostname, ifconfig, route 명령의 주석을 풀고 알맞은 매개변수를 넣어야 합니다.

ifconfig와 netstat 명령의 추가 옵션

AIX의 ifconfig 명령에는 다음 옵션이 더 있습니다.

옵션 설명
mtu 로컬 네트워크(와 로컬 서브넷)에서 쓰는 MTU와 원격 네트워크에 쓰는 MTU를 지정합니다. 이더넷과 다른 네트워크와의 호환성을 최대로 하려면 토큰링과 이더넷의 기본 mtu 값을 모두 1500으로 설정합니다.
allcast 토큰링 브로드캐스트 전략을 설정합니다. 설정하면 토큰링 브리지를 통한 연결성을 최적화합니다. (-allcast로) 해제하면 링의 초과 트래픽을 최소화합니다.

AIX의 netstat 명령에는 -v 플래그가 있습니다. netstat -v 명령은 송신 바이트 수, 송신 오류 수, 수신 바이트 수, 수신 오류 수 같은 드라이버 통계를 출력합니다. 자세한 내용은 ifconfig와 netstat 명령을 봅니다.

추가 네트워크 관리 명령

AIX는 다음 명령도 지원합니다.

  • securetcpip — 보안을 강화하는 통제된 접근 모드를 켜는 셸 스크립트입니다. tftp, rcp, rlogin, rsh 같은 안전하지 않은 TCP/IP 프로그램 여럿의 실행을 막고 .netrc 파일 사용을 제한합니다.
  • gated — SNMP용 MIB 지원을 제공합니다.
  • no — 다음을 포함한 네트워크 옵션을 설정합니다.
    • dogticks — ifwatchdog 루틴의 타이머 단위
    • subnetsarelocal — 패킷 주소가 로컬 네트워크에 있는지 판단
    • ipsendredirects — 커널이 리디렉트 신호를 보낼지
    • ipforwarding — 커널이 패킷을 전달할지
    • tcp_ttl — TCP 패킷의 TTL
    • udp_ttl — UDP 패킷의 TTL
    • maxttl — RIP 패킷의 TTL
    • ipfragttl — IP 조각의 TTL
    • lowclust — 클러스터 mbuf 풀의 낮은 수위
    • lowmbuf — mbuf 풀의 낮은 수위
    • thewall — mbuf와 클러스터 mbuf 풀에 할당하는 최대 메모리
    • arpt_killc — 비활성 완전 ARP 항목을 지우기까지의 시간(분)
  • iptrace — 인터넷 프로토콜에 대한 인터페이스 수준 패킷 추적을 제공합니다.
  • ipreport — 추적을 사람이 읽을 수 있는 형태로 서식화합니다. 사용 예는 다음과 같습니다.
text
iptrace -i en0 /tmp/iptrace.log
# kill iptrace daemon
kill `ps ax | grep iptrace | awk '{ print $1 }'`
ipreport /tmp/iptrace.log | more

BSD 4.3 암호 파일 가져오기

BSD 4.3 암호 파일을 AIX로 가져올 수 있습니다. 다음 단계를 따릅니다.

  1. BSD 4.3 암호 파일을 /etc/passwd 파일로 복사하고 다음을 입력합니다.
text
pwdck -y ALL
  1. 새 사용자마다 /etc/security/limits 파일에 빈 스탠자를 넣어 갱신합니다. usrck 명령이 이 일을 하지만, /etc/group 파일을 /etc/passwd 파일과 함께 가져오지 않으면 usrck 명령이 문제를 일으킬 수 있습니다. 주의: /etc/security/limits 파일을 고치면 stack이 65,536바이트를 넘으면 안 됩니다. 넘으면 usrck 명령이 문제를 일으킬 수 있습니다. 스택 크기를 65,536으로 바꾸고 usrck 명령을 다시 실행합니다.
  2. grpck와 usrck 명령을 실행해 그룹과 사용자 속성을 확인합니다.

BSD 4.3 시스템 관리자를 위한 암호 파일 편집

다음은 암호 파일의 항목을 바꾸고 AIX에서 BSD 4.3 방식으로 암호를 관리하는 방법입니다.

AIX에서는 암호 관리에 lsuser, mkuser, chuser, rmuser 명령을 제공합니다. 이 명령은 모두 Web-based System Manager나 SMIT로도 쓸 수 있습니다. 그러나 모두 한 번에 사용자 하나만 다룹니다.

참고: 편집기로 여러 사용자 항목을 한꺼번에 바꾸려면 여러 파일을 동시에 편집해야 합니다. 암호는 /etc/security/passwd 파일에, 인증 정보는 /etc/security/user 파일에, 나머지 사용자 데이터는 /etc/passwd 파일에 저장되기 때문입니다.

AIX는 vipw 명령은 지원하지 않지만 mkpasswd 명령은 지원합니다. 그래도 BSD 4.3 방식으로 AIX 암호를 관리할 수 있습니다. 다음 절차를 따릅니다.

  1. BSD 4.3 암호 파일을 /etc/shadow 파일에 넣습니다.
  2. 다음을 입력해 파일 권한을 바꿉니다.
text
chmod 000 /etc/shadow
  1. 다음 vipw 셸 스크립트를 /etc 디렉터리에 둡니다.
text
-----------------------------------------------------
----
#!/bin/bsh
#
# vipw. Uses pwdck for now. May use usrck someday
#
PATH=/bin:/usr/bin:/etc:/usr/ucb # Add to this if your editor is
                                 # some place else
if [ -f /etc/ptmp ] ; then
                 echo "/etc/ptmp exists. Is someone else using vipw?"
        exit 1
fi
if [ ! -f /`which "$EDITOR" | awk ’{ print $1 }’` ] ; then
        EDITOR=vi
fi
cp /etc/shadow /etc/ptmp
if (cmp /etc/shadow /etc/ptmp) ; then
        $EDITOR /etc/ptmp
else
        echo cannot copy shadow to ptmp
        exit 1
fi
if (egrep "^root:" /etc/ptmp >/dev/null) ; then
        cp /etc/ptmp /etc/shadow ; cp /etc/ptmp /etc/passwd
        chmod 000 /etc/passwd /etc/shadow
        pwdck -y ALL 2>1 >/dev/null # return code 114 may change
                rc=$?
        if [ $rc -eq 114 ]; then
                chmod 644 /etc/passwd
                        rm -f /etc/passwd.dir /etc/passwd.pag
                mkpasswd /etc/passwd
                        # update /etc/security/limits, or ftp
                        # will fail
                else
                         pwdck -y ALL
                fi
else
        echo bad entry for root in ptmp
fi
rm /etc/ptmp
-----------------------------------------------------------
  1. vipw 셸 스크립트나 mkpasswd 명령을 쓴다면 Web-based System Manager, SMIT, mkuser·chuser·rmuser 명령은 mkpasswd 명령을 쓰지 않는다는 점을 알아 둡니다. /etc/passwd.dir과 /etc/passwd.pag 파일을 갱신하려면 다음을 실행해야 합니다.
text
mkpasswd /etc/passwd

주의: IFS 변수 초기화와 trap 문은 setuid 기능에 내재한 보안 구멍을 노리는 흔한 방법 일부를 막습니다. 그러나 vipw와 passwd 셸 스크립트는 호환성이 중요한, 비교적 열린 환경을 위한 것입니다. 더 안전한 환경을 원하면 AIX 표준 명령만 씁니다. 5. 다음 passwd 셸 스크립트를 /usr/ucb 디렉터리에 둡니다.

text
-----------------------------------------------------
#!/bin/ksh
#
# matches changes to /etc/security/passwd file with changes to
#/etc/shadow
#
IFS=" "
PATH=/bin
trap "exit 2" 1 2 3 4 5 6 7 8 10 12 13 14 15 16 17 18 21 22 \
        23 24 25 27 28 29 30 31 32 33 34 35 36 60 61 62
if [ -n "$1" ]; then
        USERNAME=$1
else
        USERNAME=$LOGNAME
fi
if [ -f /etc/ptmp ]; then
        echo password file busy
        exit 1
fi
        trap "rm /etc/ptmp; exit 3" 1 2 3 4 5 6 7 8 10 12 13 \
                14 15 16 17 18 21 22 23 24 25 27 28 29 30 31 \
                32 33 34 35 36 60 61 62
if (cp /etc/security/passwd /etc/ptmp) ; then
        chmod 000 /etc/ptmp else
        rm -f /etc/ptmp exit 1
fi
if ( /bin/passwd $USERNAME ) ; then
        PW=` awk ’ BEGIN { RS = "" }
                $1 == user { print $4 } ’ user="$USERNAME:" \
/etc/security/passwd `
else
        rm -f /etc/ptmp
        exit 1
fi
rm -f /etc/ptmp
awk -F: ’$1 == user { print $1":"pw":"$3 ":"$4":"$5":"$6":"$7 }
        $1 != user { print $0 }’ user="$USERNAME" pw="$PW" \
                /etc/shadow > /etc/ptmp
chmod 000 /etc/ptmp
mv -f /etc/ptmp /etc/shadow
---------------------------------------------------------
  1. 다음을 입력해 passwd 스크립트의 권한을 바꿉니다.
text
chmod 4711 /usr/ucb/passwd
  1. 각 사용자의 PATH 환경 변수가 /bin 디렉터리보다 /usr/ucb 디렉터리를 먼저 찾도록 지정돼 있는지 확인합니다.
영어 원문

Administering BSD

There are multiple commands for BSD you can use to measure performance, print, and manage your system.

Accounting for BSD 4.3 system managers

The accounting files in the /usr/lib/acct directory and the system activity reporting tools in the /usr/lib/sa directory for AIX are identical to those available with AT&T System V Release 4 (SVR4) with the addition of 4.3 BSD accounting utilities.

Many of the accounting commands are in the /usr/lib/acct directory. To begin system accounting, use the /usr/lib/acct/startup command. If accounting is not started, commands such as lastcomm(1) cannot return information.

AIX provides these 4.3 BSD accounting facilities:

  • last(1) — Indicates last logins of users and terminals
  • lastcomm(1) — Shows in reverse order the last commands executed
  • acct(3) — Enables and disables process accounting
  • ac(8) — Login accounting
  • accton(8) — Turns system accounting on or off
  • sa(8) — Generally maintains system accounting files.

AIX also provides these System V Interface Definition (SVID) Issue II accounting commands and library functions:

  • acctcms(1) — Produces command usage summaries from accounting records
  • acctcom(1) — Displays selected process-accounting record summaries
  • acctcon1(1) — Converts login/logoff records to session records
  • acctcon2(1) — Converts login/logoff records to total accounting records
  • acctdisk(1) — Generates total accounting records from diskusg(1) command output
  • acctmerg(1) — Merges total accounting files into an intermediary file
  • accton(1) — Turns on accounting
  • acctprc1(1) — Processes accounting information from acct(3) command
  • acctprc2(1) — Processes output of acctprc1(1) command into total accounting records
  • acctwtmp(1) — Manipulates connect-time accounting records
  • chargefee(1) — Charges to login name
  • ckpacct(1) — Checks size of /usr/adm/pacct file
  • diskusg(1) — Generates disk accounting information
  • dodisk(1) — Performs disk accounting
  • fwtmp(1) — Converts binary records (wtmp file) to formatted ASCII. Note: The wtmp file is in the /var/adm directory.
  • lastlogin(1) — Updates last date on which each person logged in
  • monacct(1) — Creates monthly summary files
  • prctmp(1) — Prints session record file produced by acctcon1(1) command
  • prdaily(1) — Formats a report of yesterday's accounting information
  • prtacct(1) — Formats and prints any total accounting file
  • runacct(1) — Runs daily accounting
  • shutacct(1) — Called by system shutdown to stop accounting and log the reason
  • startup(1) — Called by system initialization to start accounting
  • turnacct(1) — Turns process accounting on or off
  • wtmpfix(1) — Corrects time/date stamps in a file using wtmp format

Backup for BSD 4.3 system managers

BSD 4.3 system managers can back up data.

The tar and cpio commands can move data between systems. The tar command for AIX is not fully compatible with the 4.3 BSD tar command. The tar command for AIX requires the -B flag (blocking input) if it is reading from a pipe. The AT&T cpio command is compatible with this version.

AIX can read and write in dump and restore command format. For example, the backup command for AIX with the syntax:

text
backup -0uf Device Filesystemname

is the same as the 4.3 BSD dump command with the syntax:

text
dump 0uf Device Filesystemname

Similarly, the restore command for AIX with the syntax:

text
restore -mivf Device

is the same as the 4.3 BSD restore command with the syntax:

text
restore ivf Device

AIX also has the 4.3 BSD rdump and rrestore commands. The only difference in the two versions is that for AIX, each argument must be preceded by a - (dash). For example, the following command:

text
rdump -0 -f orca:/dev/rmt0 /dev/hd2

is equivalent to the 4.3 BSD command:

text
rdump 0f orca:/dev/rmt0 /dev/hd2

The backup command for AIX with the following syntax:

text
backup -0f /dev/rmt0 /dev/hd2

is equivalent to the 4.3 BSD dump command with this syntax:

text
dump 0f /dev/rmt0 /dev/hd2

Non-IBM SCSI tape support

AIX does not directly support non-IBM SCSI tape drives. However, you can add your own header and interface that use the IBM SCSI driver.

Related concepts

System backup Once your system is in use, your next consideration should be to back up the file systems, directories, and files. If you back up your file systems, you can restore files or file systems in the event of a hard disk crash. There are different methods for backing up information.

Related information

Adding an Unsupported Device to the System

Startup for BSD 4.3 system managers

The following discusses AIX system startup for BSD 4.3 system managers.

On 4.3 BSD systems, the init program is the last step in the startup procedure. The main role of the init program is to create processes for each available terminal port. The available terminal ports are found by reading the /etc/ttys file.

On System V, the init program is started at system initialization. The init process starts processes according to entries in the /etc/inittab file.

AIX follows the System V initialization procedure. You can edit the /etc/inittab file by directly editing the file, using the telinit command, or by using the following commands:

  • chitab(1) — Changes records in the /etc/inittab file
  • lsitab(1) — Lists records in the /etc/inittab file
  • mkitab(1) — Makes records in the /etc/inittab file
  • rmitab(1) — Removes records in the /etc/inittab file

Changes made to the /etc/inittab file take effect the next time the system is rebooted, or when the telinit q command is run.

Finding and examining files for BSD 4.3 system managers

The following is a list of the BSD file commands that AIX supports.

AIX supports the following 4.3 BSD file commands:

  • which

  • whereis

  • what

  • file.

AIX does not support the 4.3 BSD fast find syntax of the find command. At this time, there is no replacement function. The following ffind shell script can be used to simulate the functionality:

text
#!/bin/bsh
PATH=/bin
for dir in /bin /etc /lib /usr
do
find $dir -print | egrep $1
done

The syntax for the ffind script is:

text
ffind Filename

Paging space for BSD 4.3 system managers

The following commands assist in managing paging space (also known as swap space).

  • chps(1) — Changes attributes of a paging space
  • lsps(1) — List attributes of a paging space
  • mkps(1) — Add an additional paging space to the system
  • rmps(1) — Removes a paging space from the system
  • swapoff(1) — Deactivates one or more paging spaces
  • swapon(1) — Specifies additional devices for paging and swapping

If a large paging space is required, place one paging logical volume for each hard disk. This allows scheduling of paging across multiple disk drives.

Changing the default startup to permit 4.3 BSD ASCII configuration:

You can administer network interfaces for AIX through the SMIT and ODM files, or through 4.3 BSD ASCII configuration files.

To administer network interfaces through 4.3 BSD ASCII configuration files, uncomment the commands in the /etc/rc.net file below the heading:

text
# Part II - Traditional
Configuration

Then if you want flat file configuration and SRC support, edit the /etc/rc.net file and uncomment the hostname, ifconfig, and route commands with the appropriate parameters.

If you want flat file configuration without SRC support, use the smit setbootup_option fast path to change the system to BSD-style rc configuration. This option configures the system to use the /etc/rc.bsdnet file at startup. You also have to edit the /etc/rc.bsdnet file and uncomment the hostname, ifconfig, and route commands with the appropriate parameters.

Additional options for ifconfig and netstat commands

The following is a list of additional options for the ifconfig and netstat commands.

The ifconfig command for AIX has the following additional options:

mtu The mtu variable specifies the maximum transmission unit (MTU) used on the local network (and local subnets) and the MTU used for remote networks. To maximize compatibility with Ethernet and other networks, set both the Token-Ring and Ethernet default mtu value to 1500.

allcast

The allcast flag sets the Token-Ring broadcast strategy. Setting the allcast flag optimizes connectivity through Token-Ring bridges. Clearing the allcast flag (by specifying -allcast) minimizes excess traffic on the ring.

The netstat command for AIX has the -v flag. The netstat -v command prints driver statistics such as transmit byte count, transmit error count, receive byte count, and receive error count. For more information about the ifconfig and netstat commands, see ifconfig and netstat.

Additional network management commands

The following additional commands are supported on AIX.

  • securetcpip — The securetcpip shell script enables controlled access mode, which provides enhanced network security. It disallows the running of several unsecured TCP/IP programs, such as the tftp, rcp, rlogin, and rsh programs. It also restricts the use of the .netrc file.
  • gated — The gated command provides MIB support for SNMP.
  • no — The no command sets network options that include: dogticks Sets timer granularity for ifwatchdog routines subnetsarelocal Determines if packet address is on the local network ipsendredirects Specifies whether the kernel should send redirect signals ipforwarding Specifies whether the kernel should forward packets tcp_ttl Specifies the time-to-live for Transmission Control Protocol (TCP) packets udp_ttl Specifies the time-to-live for User Datagram Protocol (UDP) packets maxttl Specifies the time-to-live for Routing Information Protocol (RIP) packets ipfragttl Specifies the time-to-live for Internet Protocol (IP) fragments lowclust Specifies a low water mark for cluster mbuf pool lowmbuf Specifies a low water mark for the mbuf pool thewall Specifies the maximum amount of memory that is allocated to the mbuf and cluster mbuf pool arpt_killc Specifies the time in minutes before an inactive complete Address Resolution Protocol (ARP) entry is deleted
  • iptrace — The iptrace command provides interface-level packet tracing for Internet protocols.
  • ipreport — The ipreport command formats the trace into human-readable form. An example of using this command is the following: iptrace -i en0 /tmp/iptrace.log # kill iptrace daemon kill 'ps ax | grep iptrace | awk ’{ print $1 }’' ipreport /tmp/iptrace.log | more

Importing a BSD 4.3 password file

You can import a BSD 4.3 password file into AIX.

To import a BSD 4.3 password file, perform the following steps: 1. Copy the BSD 4.3 password file to the /etc/passwd file and enter:

text
pwdck -y ALL
  1. Update the /etc/security/limits file with a null stanza for any new users. The usrck command does this, but using the usrck command can cause problems unless the /etc/group file is imported with the /etc/passwd file. For more information about the usrck command, see usrck. Attention: If the /etc/security/limits file is modified, the stack must not exceed 65,536 bytes. If it does, running the usrck command can cause problems. Change the stack size to 65,536 and run usrck command again.

  2. Run the grpck and usrck commands to verify group and user attributes.

Editing the password file for BSD 4.3 system managers

The following explains how to change entries in the password file and how to administer passwords on AIX in a BSD 4.3 manner.

In AIX, the lsuser, mkuser, chuser, and rmuser commands are provided for managing passwords. All of these commands can be used by running Web-based System Manager or SMIT. However, all of these commands deal with only one user at a time.

For more information about these commands, see lsuser, mkuser, chuser, and rmuser.

Note: Using an editor to change several user name entries at one time requires editing of several files simultaneously, because passwords are stored in the /etc/security/passwd file, authorization information is stored in the /etc/security/user file, and the remaining user data is stored in the /etc/passwd file.

AIX does not support the vipw command but does support the mkpasswd command. However, you can still administer passwords in AIX in a BSD 4.3 manner. Use the following procedure:

  1. Put a BSD 4.3 password file in the /etc/shadow file.

  2. Change the permissions to the file by entering:

text
chmod 000 /etc/shadow
  1. Place the following vipw shell script in the /etc directory:

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

  1. If you use the vipw shell script or the mkpasswd command, be aware that Web-based System Manager, SMIT, and the mkuser, chuser, and rmuser commands do not use the mkpasswd command. You must run:
text
mkpasswd /etc/passwd

to update the /etc/passwd.dir and /etc/passwd.pag files.

Attention: Initialization of the IFS variable and the trap statements guard against some of the common methods used to exploit security holes inherent in the setuid feature. However, the vipw and passwd shell scripts are intended for relatively open environments where compatibility is an important consideration. If you want a more secure environment, use only the standard commands for AIX.

  1. Put the following passwd shell script in the /usr/ucb directory:

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

  1. Change the permissions to the passwd script by entering:
text
chmod 4711 /usr/ucb/passwd
  1. Ensure that each user PATH environmental variable specifies that the /usr/ucb directory be searched before the /bin directory.

BSD 4.3 시스템 관리자를 위한 성능 측정과 조정

다음은 AIX 장치 속성과 성능 측정·조정 설명입니다.

AIX의 모든 장치에는 속성이 있습니다. 장치 속성을 보려면 다음을 입력합니다.

text
lsattr -E -l devicename

값이 True인 속성은 다음 명령으로 바꿀 수 있습니다(원문 그대로. 실제로는 사용자가 바꿀 수 있음 열이 True인 속성).

text
chdev -l devicename -a attr=value

주의: 장치 매개변수를 잘못 바꾸면 시스템이 손상될 수 있습니다.

기본적으로 사용자당 최대 프로세스 수는 40입니다. 창을 동시에 많이 여는 사용자에게는 너무 낮을 수 있습니다. 다음 명령으로 시스템 전체 값을 바꿀 수 있습니다(원문의 hdev는 chdev의 오타).

text
hdev -l sys0 -a maxuproc=100

이 예는 최대 수를 100으로 바꿉니다. 새 값은 시스템을 다시 시작하면 설정됩니다(원문 그대로).

이 속성과 다른 시스템 속성의 현재 설정을 보려면 다음을 입력합니다.

text
lsattr -E -l sys0

maxmbuf 속성은 현재 mbuf 서비스가 지원하지 않습니다.

AIX는 vmstat와 iostat 명령을 지원하지만 systat 명령이나 load average는 지원하지 않습니다. 자세한 내용은 vmstat와 iostat 명령을 봅니다.

영어 원문

Performance measurement and tuning for BSD 4.3 system managers

Thie following discusses AIX device attributes and performance measurement and tuning.

All devices on AIX have attributes associated with them. To view device attributes, enter:

text
lsattr -E -l devicename

Any attributes with the value True can be modified with the command:

text
chdev -l devicename -a attr=value

Attention: Changing device parameters incorrectly can damage your system.

By default, the maximum number of processes per user is 40. The default value might be too low for users who have many windows open simultaneously. The following command can be used to change the value systemwide:

text
hdev -l sys0 -a maxuproc=100

This example changes the maximum number to 100. The new value is set once the system has restarted.

To view the current setting of this and other system attributes, type:

text
lsattr -E -l sys0

The maxmbuf attribute is not currently supported by the mbuf services.

AIX supports the vmstat and iostat commands, but not the systat command or load averages. For more information about these commands, see vmstat and iostat.